I've configured Elasticsearch in k8s with a separate master, data, and ingest nodes.
xpack.security.enabled
is set to true
I'm trying to connect a Node.js application to Elasticsearch using Elasticsearch-js client but it fails to connect to elastic.
Error looks like this:
ConnectionError: connect ECONNREFUSED
it appears on elasticClient.ping()
There are no other errors logged from my Node.js application, nor errors in ingest nodes logs.
I tried to generate passwords for default users and use basic authentication connecting to elastic:
const elasticClient = new Client({ node: "http://elastic:mypassword@es-ingest.es.svc.cluster.local:9200"});
But with basic auth - there is the same error.