NodeJS client not respecting URL option

So I am instantiating the esclient with
const esclient = new require('elasticsearch').Client({ node: "http://10.164.204.92:9200/" , sniffOnStart: false });

But when it decides to run, it's totally ignoring the setting and trying to access localhost.
I don't want that functionality. Why can't I connect to a remote node?
What is going on here?

Elasticsearch ERROR: 2020-03-05T23:53:56Z
Error: Request error, retrying
POST http://localhost:9200/epics/_doc/recrgdRN73MleqAAN => connect ECONNREFUSED 127.0.0.1:9200
at Log.error (/Users/c-robert.baindourov/etl-jira-airtable/packages/elastic-loader/node_modules/elasticsearch/src/lib/log.js:239:56)
at checkRespForFailure (/Users/c-robert.baindourov/etl-jira-airtable/packages/elastic-loader/node_modules/elasticsearch/src/lib/transport.js:298:18)
at HttpConnector. (/Users/c-robert.baindourov/etl-jira-airtable/packages/elastic-loader/node_modules/elasticsearch/src/lib/connectors/http.js:171:7)
at ClientRequest.wrapper (/Users/c-robert.baindourov/etl-jira-airtable/packages/elastic-loader/node_modules/lodash/lodash.js:4929:19)
at ClientRequest.emit (events.js:223:5)
at Socket.socketErrorListener (_http_client.js:406:9)
at Socket.emit (events.js:223:5)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:81:21)

Elasticsearch WARNING: 2020-03-05T23:53:56Z
Unable to revive connection: http://localhost:9200/

Elasticsearch WARNING: 2020-03-05T23:53:56Z
No living connections

(node:75996) UnhandledPromiseRejectionWarning: Error: No Living connections
at sendReqWithConnection (/Users/c-robert.baindourov/etl-jira-airtable/packages/elastic-loader/node_modules/elasticsearch/src/lib/transport.js:266:15)
at next (/Users/c-robert.baindourov/etl-jira-airtable/packages/elastic-loader/node_modules/elasticsearch/src/lib/connection_pool.js:243:7)
at processTicksAndRejections (internal/process/task_queues.js:76:11)
(node:75996) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:75996) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

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