Node-RED + Elasticsearch

(Nicolas Prange) #1

I am trying to send data from Node-RED to Elasticsearch, but I receive the following error:

Elasticsearch ERROR: 2018-07-17T14:30:15Z
Error: Request error, retrying
HEAD http://localhost/twitterr/tweets/1 => connect ECONNREFUSED
at Log.error (/home/workdb/.node-red/node_modules/elasticsearch/src/lib/log.js:225:56)
at checkRespForFailure (/home/workdb/.node-red/node_modules/elasticsearch/src/lib/transport.js:258:18)
at HttpConnector. (/home/workdb/.node-red/node_modules/elasticsearch/src/lib/connectors/http.js:157:7)
at ClientRequest.bound (/home/workdb/.node-red/node_modules/elasticsearch/node_modules/lodash/dist/lodash.js:729:21)
at emitOne (events.js:116:13)
at ClientRequest.emit (events.js:211:7)
at Socket.socketErrorListener (_http_client.js:387:9)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at emitErrorNT (internal/streams/destroy.js:64:8)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)

Elasticsearch WARNING: 2018-07-17T14:30:15Z
Unable to revive connection: http://localhost/

Elasticsearch WARNING: 2018-07-17T14:30:15Z
No living connections

17 Jul 11:30:15 - [error] [es-exists:cee9ae59.c86a2] Error: No Living connection

Anyone knows how to fix this?

(Thomas Dasch) #2

Hey Nicolas,

Are you sure your Elasticsearch node is up and running? You can curl it?

(Nicolas Prange) #3

Hey Thomas, thank you for the reply!
I made some tests in the terminal using node.js as elasticsearch guide ( tells, and everything goes well.
Now I'm trying to connect Node-RED to Elasticsearch for send data from a function in Node-RED to Elasticsearch for use this data in Kibana.
I am using some libraries from Node-RED to connect with ES, but I thing that I am missing something.
Sometime after some changes, I received this error:
"ReferenceError: documentType is not defined", and I been wondering, is it an error in Node-RED or ES? :confused:

(Thomas Dasch) #4


Node-RED is beyond my scope, so please bear with me as I attempt humble troubleshooting. FYI, the pictures are really hard to see unforunately. I'm glad to hear things are up and running now and you have connectivity! I've found this flow, which may be the very one you are using, if not it might be worth a quick look. Based on the error it sounds like you're not defining the document type. Referencing that link I provided, it looks like regardless of the usage, create/delete/search/etc..., msg.documentType should be set in an incoming message unless it was configured in the node.

(Nicolas Prange) #5

haha, no problems.
I got it and I will try.

After some changes, I get the following error:
"RangeError: Maximum call stack size exceeded"

ohhh lord o/

(system) #6

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