docker_elasticsearch无法设置密码

12/5/2023 clashX翻墙

在docker中使用bin/elasticsearch-setup-passwords interactive会提示

Connection failure to: http://172.19.0.8:9200/_security/_authenticate?pretty failed: Connection refused
ERROR: Failed to connect to elasticsearch at http://172.19.0.8:9200/_security/_authenticate?pretty. Is the URL correct and elasticsearch running?
1
2

这里需要指定一下ip

bin/elasticsearch-setup-passwords interactive -u 'http://ip:9200'
1

然后就可以了

https://www.cnblogs.com/baoshu/p/16128127.htmlbaoshu/p/16128127.html