转:https://blog.csdn.net/chen_2890/article/details/83895646
启动报错:
NoNodeAvailableException[None of the configured nodes are available: [{#transport#-1}{WpoLGaIYQHmKquVBXnof_Q}{127.0.0.1}{127.0.0.1:9300}]
解决方法:
find / -name elasticsearch.yml 找到yml文件,编辑
在yml文件尾部加上
http.cors.enabled: true
http.cors.allow-origin: “*”
node.master: true
node.data: true
properties配置文件spring.data.elasticsearch.cluster-name、名称需与安装的ElasticSearch名称相同。否则也会报以上错误
重启elasticsearch即可