我是靠谱客的博主 烂漫红牛,这篇文章主要介绍Elasticsearch常见错误一、内存不足二、不能以root启动三、外网不能访问四、文件句柄不足五、磁盘使用过高,现在分享给大家,希望可以做个参考。

一、内存不足

问题:

复制代码
1
2
Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000085330000, 2060255232, 0) failed; error='Cannot allocate memory' (errno=12)

解决:

复制代码
1
2
3
4
# 进入config目录,修改jvm.options的配置 -Xms512M -Xmx512M

二、不能以root启动

问题:

复制代码
1
2
Exception in thread "main" java.nio.file.AccessDeniedException: /software/elasticsearch-6.4.3/config/jvm.options

解决:

复制代码
1
2
chown -R 用户名:用户名 目录名

三、外网不能访问

问题:

复制代码
1
2
# 启动正常,IP不能访问

解决:

复制代码
1
2
3
4
# 修改config下面的elasticsearch.yml的配置 network.host: 0.0.0.0 http.port: 9200

四、文件句柄不足

问题:

复制代码
1
2
3
4
5
ERROR: [3] bootstrap checks failed [1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536] [2]: max number of threads [3780] for user [esyonghu] is too low, increase to at least [4096] [3]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

解决:

复制代码
1
2
3
4
5
6
7
8
# 修改配置文件 vim /etc/security/limits.conf # 在文件的末尾加上 * soft nofile 65536 * hard nofile 65536 * soft nproc 4096 * hard nproc 4096
复制代码
1
2
3
4
5
6
# 修改配置文件 vim /etc/security/limits.d/20-nproc.conf # 在文件的末尾加上 esyonghu soft nproc 4096 root soft nproc unlimited
复制代码
1
2
3
4
5
6
7
# 修改配置文件 vim /etc/sysctl.conf # 在文件的末尾加上 vm.max_map_count = 655360 # 使配置文件生效 sysctl -p

五、磁盘使用过高

问题:

复制代码
1
2
low disk watermark [85%]”或“high disk watermark [90%]

解决:

复制代码
1
2
3
# 修改config下面的elasticsearch.yml的配置 cluster.routing.allocation.disk.threshold_enabled: false

作者(Author):小强崽
来源(Source):https://www.wuduoqiang.com/archives/Elasticsearch常见错误
协议(License):署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)
版权(Copyright):商业转载请联系作者获得授权,非商业转载请注明出处。 For commercial use, please contact the author for authorization. For non-commercial use, please indicate the source.

最后

以上就是烂漫红牛最近收集整理的关于Elasticsearch常见错误一、内存不足二、不能以root启动三、外网不能访问四、文件句柄不足五、磁盘使用过高的全部内容,更多相关Elasticsearch常见错误一、内存不足二、不能以root启动三、外网不能访问四、文件句柄不足五、磁盘使用过高内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(79)

评论列表共有 0 条评论

立即
投稿
返回
顶部