elasticsearch启动常见错误
程序员文章站
2024-03-25 11:23:58
...
错误一
错误内容:
max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
每个进程最大同时打开文件数太小,可通过下面2个命令查看当前数量:
ulimit -Hu
ulimit -Su
修改/etc/security/limits.conf文件,增加配置,用户退出后重新登录生效:
vim /etc/security/limits.conf
增加配置:
es soft nofile 65535
es hard nofile 65537
错误二
错误内容:
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
修改/etc/sysctl.conf文件,增加配置vm.max_map_count=262144
vi /etc/sysctl.conf
使修改的sysctl.conf文件生效的命令:
sysctl -p
错误三
错误内容:
Exception in thread "main" java.nio.file.AccessDeniedException: /usr/local/elasticsearch/elasticsearch-6.2.2-1/config/jvm.options
elasticsearch用户没有该文件夹的权限,执行命令:
chown es /home/skywalking/elasticsearch-7.13.3 -R
错误四
错误内容:
ERROR: [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
修改elasticsearch.yml配置文件,将#cluster.initial_master_nodes: [“node-1”, “node-2”]配置文件中的注释去掉:
cluster.initial_master_nodes: ["node-1", "node-2"]
错误五
错误内容:
java.lang.IllegalStateException: failed to obtain node locks,tried...
在elasticsearch.yml配置文件最后加入node.max_local_storage_nodes: 2
node.max_local_storage_nodes: 2
上述问题绝大多数是由于在elasticsearch.yml配置文件中添加network.host: 0.0.0.0造成的。
上一篇: 2020-08-07
下一篇: css3之移动平台资源