elasticsearch 打开elasticsearch.bat 闪退


一般这种问题都是配置的问题,看看是不是哪里写错了或者编码问题,你可以进入elasticsearch安装目录找到logs目录,打开elasticsearch.log查看详细的报错内容【log目录下的文件可清空,方便排查】

 

 

报错:

[1] bootstrap checks failed
[1]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured

解决方案:

elasticsearchconfig目录下,修改elasticsearch.yml配置文件,将下面的配置加入到该配置文件中:

#配置以下三者,最少其一
#[discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes]
#这里的node-1为node-name配置的值
cluster.initial_master_nodes: ["node-1"] 

我的完整配置:

cluster.name: my-application
node.name: node-1
network.host: 0.0.0.0
http.port: 9200
#这里的node-1为node-name配置的值
cluster.initial_master_nodes: ["node-1"] 
http.cors.enabled: true 
http.cors.allow-origin: "*"
node.master: true
node.data: true

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM