Error: Unable to parse/serialize body - when elastic search not available

In one of the scenario.. i was trying to connect elasticsearch from the kibana. I would like to clarify like below,

  1. every time kibana try to connect elastic search and when it is not available it will give the response like below.

{ Error: No Living connections
at sendReqWithConnection (/opt/ogng/kibana6/node_modules/elasticsearch/src/lib/transport.js:234:15)
at next (/opt/ogng/kibana6/node_modules/elasticsearch/src/lib/connection_pool.js:213:7)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickDomainCallback (internal/process/next_tick.js:218:9)
message: 'No Living connections',
body: undefined,
status: undefined }

  1. in our scenario, we do not connect the elastic search directly we used to call the service call and check the elastic search is available or not.

In that process service response is coming like below and it shows Internal server error.

{ Error: Unable to parse/serialize body
at respond (/opt/ogng/kibana6/node_modules/elasticsearch/src/lib/transport.js:308:17)
at checkRespForFailure (/opt/ogng/kibana6/node_modules/elasticsearch/src/lib/transport.js:280:7)
at HttpConnector. (/opt/ogng/kibana6/node_modules/elasticsearch/src/lib/connectors/http.js:159:7)
at IncomingMessage.bound (/opt/ogng/kibana6/node_modules/elasticsearch/node_modules/lodash/dist/lodash.js:729:21)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickDomainCallback (internal/process/next_tick.js:218:9)
message: 'Unable to parse/serialize body',
body: '{ Error: 'Response convert to String Error', message: 'No Living connections', body: undefined, status: undefined }',
status: 200 }

and shows internal server error. could you please help someone help in this. I feel respone is not JSON and it is not understanding by the KIBANA. not sure.

It's hard to say anything about this issue because it looks like your process is a custom one. It's worth checking if for example, character encoding is working fine. Maybe a tool like WireShark, Charles, Fiddler or Firebug could reveal differences between the good and problematic requests.

okie. is there any way i can track the request and response in the kibana. my intention is to add one more scenario like whenever i get 500 error i would like to handle the scenario. Thanks!!!

Any help @monfera

It's hard to say more based on the above error messages, for example, it's not clear what requests you're making in #1 and in #2; what your infrastructure is; which is why my suggestion was to intercept such traffic with the listed tools and analyze if eg. in the case of #2 the shape, contents and encoding of the request is correct. If you think there's a Kibana bug, please file a bug report with specifics (not just the error message but with all pertinent details ie. exact steps made, expectation and outcome).

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.