赞
踩
NoNodeAvailableException: None of the configured nodes are available: [{#transport#-1}……
因为我是在 Docker 上面部署的,所以首先查看端口是否配置了映射
使用 docker ps 查看
很明显,我的映射没问题
使用 docker logs [ESID]查看日志
结果发现
ES 的 9300 只映射到了本地
解决办法:
在 elasticsearch.yml 中添加 transport.host: 0.0.0.0 就行了
重新启动 elasticsearch 即可
如果启动失败,且 使用 docker logs [ESID] 查看报以下错误的话
[2018-05-18T17:44:59,658][INFO ][o.e.b.BootstrapChecks ] [gFOuNlS] bound or publishing to a non-loopback address, enforcing bootstrap checks
ERROR: [2] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
解决办法:
1、报【1】 号错的话在 /etc/security/limits.conf 文件内 追加以下内容
* soft nofile 65536
* hard nofile 65536
此文件修改后需要重新登录用户,才会生效
2、报【2】 号错的话在 /etc/sysctl.conf文件内 追加以下内容:
vm.max_map_count=655360
保存后,执行:
sysctl -p
重新启动 ES 即可
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。