启动后elasticsearch.bat,访问9200失败,提示连接被重置

如果启动后,访问9200失败,提示连接被重置,就在ElasticSearch下的config目录中的elasticsearch.yml下滑到最低端,将xpack.security.enabled: false修改为false以及 xpack.security.http.ssl: enabled: false修改为false

Enable security features

xpack.security.enabled: false
1
2
Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
enabled: false
keystore.path: certs/http.p12
1
2
3
4
同样的ElasticSearch下的config目录中的elasticsearch.yml文件下的Network 中的network.host: x.x.x.x修改为#network.host: 0.0.0.0(也可以是本机ip地址或者127.0.0.1,0.0.0.0表示谁都可以访问)

---------------------------------- Network -----------------------------------

By default Elasticsearch is only accessible on localhost. Set a different

address here to expose this node on the network:

network.host: 0.0.0.0

1
2
3
4
5
6
最后:保存退出并重启Elasticsearch,双击ElasticSearch下的bin目录中的elasticsearch.bat启动
————————————————

posted @ 2022-08-03 11:35  #卧龙先生#  阅读(437)  评论(0编辑  收藏  举报