1.Permission Denied
异常原因:使用的是root用户解压的elasticsearchxxx.tar.gz,然后使用es用户启动。
解决办法:删除已经解压的安装包,使用es用户登录,重新上传压缩包并解压后重启。
2.ERROR: [2] bootstrap checks failed
max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
max file descriptors [65535] for elasticsearch process is too low, increase to at least [65536]
解决办法:
1)vim config/elasticsearch.yml
新增 network.host: 0.0.0.0 (允许所有主机访问)
2)使用root用户(切记root用户) vim /etc/security/limits.conf
添加如下内容:
* soft nofile 65536
* hard nofile 65536
3)使用root用户 vim /etc/sysctl.conf
添加或修改为如下内容:
vm.max_map_count=655360
保存后执行 sysctl -p
4)操作完成之后,一定要关闭当前会话,重新使用连接工具如xshell登录虚拟机或者服务器,再次启动es即可
Elasticsearch启动异常
最新推荐文章于 2023-01-12 14:59:41 发布