Node-RED + Elasticsearch

#1

Hi,
I am trying to send data from Node-RED to Elasticsearch, but I receive the following error after deploy the time stamp:

Elasticsearch ERROR: 2018-07-17T14:30:15Z
Error: Request error, retrying
HEAD http://localhost/twitterr/tweets/1 => connect ECONNREFUSED 127.0.0.1:80
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

I am using this library:
node-red-contrib-elasticsearch-continued
0.1.0

Anyone knows how to fix this?

0 Likes

#2

Well my guess - based on the log - is you don’t have a connection to the server and you need to fix that

0 Likes

#3

Thank you for the reply!
When I tested in Node.js everything is ok, but in Node-RED it doens't work :confused:

0 Likes

#4

Ok, maybe I just fix this haha, but there is a new error:

17 Jul 14:00:47 - [error] [get:4c6969c1.2bdd08] ReferenceError: documentType is not defined

My goodness

0 Likes

#5

And where is that error coming from?

Not having your flow (and since I don't even know what 'elasticsearch' search is, it probably wouldn't help) it is hard to guess where that message is from.

You might want to add a 'catch' node connected to a debug node (omplete msg object) and see what that gives you in the debug panel

0 Likes

#6

When I use catch node other nodes doesn't work :confused:



0 Likes

#7

I believe if you look at the debug panel where the error mesage is showing, in the first line it shows the time and node. If you click on the node number, it will highlight which node the message is coming from.

so which node is it?

0 Likes

#8

Have you tried leaving the ID, index and type blank and passing them to the node in the message?

Or open an issue against the node on github.

1 Like

#9

The GET node are making troubles haha.
Well, leaving just Output Elasticsearch node I get another error o///

"RangeError: Maximum call stack size exceeded"

0 Likes

#10

I tried, but I get this error:

TypeError: Unable to build a path with those params. Supply at least index, type, id.

About github, this is a good idea.

0 Likes

#11

so what message did you send ?

0 Likes

#12

No offense, but it seems to me you need to first get a better grasp of Elastic. The errors you report are due to incorrect use of this ( excellent) search engine.

1 Like