Password reset require for elasticsearch 7.17.7

Hi
Please help me to resolve the below issue.

I lost my Elasticsearch password of user elastic .
Now i am trying to reset the password but error is like below-

curl -XPOST "http://localhost:9200/_security/user/elastic/_password" -H "Content-Type: application/json" -d '{
  "password": "CfzkwGPJ0L4uOOTpuK1E"
}'
curl: (7) Failed to connect to localhost port 9200 after 0 ms: Connection refused

Elasticsearch log below

tail -f /var/log/elasticsearch/elasticsearch.log
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1158) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
	at java.lang.Thread.run(Thread.java:1589) [?:?]
	at jdk.internal.misc.InnocuousThread.run(InnocuousThread.java:186) ~[?:?]
[2022-12-08T07:15:12,917][INFO ][o.e.n.Node               ] [ip-172-16-4-208] stopped
[2022-12-08T07:15:12,917][INFO ][o.e.n.Node               ] [ip-172-16-4-208] closing ...
[2022-12-08T07:15:12,929][INFO ][o.e.i.g.DatabaseReaderLazyLoader] [ip-172-16-4-208] evicted [0] entries from cache after reloading database [/tmp/elasticsearch-11390345350643707989/geoip-databases/J3We3-jRRzWKR0SbL-GPwA/GeoLite2-Country.mmdb]
[2022-12-08T07:15:12,930][INFO ][o.e.i.g.DatabaseReaderLazyLoader] [ip-172-16-4-208] evicted [0] entries from cache after reloading database [/tmp/elasticsearch-11390345350643707989/geoip-databases/J3We3-jRRzWKR0SbL-GPwA/GeoLite2-ASN.mmdb]
[2022-12-08T07:15:12,930][INFO ][o.e.i.g.DatabaseReaderLazyLoader] [ip-172-16-4-208] evicted [0] entries from cache after reloading database [/tmp/elasticsearch-11390345350643707989/geoip-databases/J3We3-jRRzWKR0SbL-GPwA/GeoLite2-City.mmdb]
[2022-12-08T07:15:12,934][INFO ][o.e.n.Node               ] [ip-172-16-4-208] closed

The node stopped a while back. You need restart it first. Also, if you don't have password for any users, you might want to start with the elasticsearch-users CLI.

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