启动后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
Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
  enabled: false
  keystore.path: certs/http.p12

同样的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

最后:保存退出并重启Elasticsearch,双击ElasticSearch下的bin目录中的elasticsearch.bat启动

你可能感兴趣的:(ElasticSearch,elasticsearch,搜索引擎)