Elasticsearch常见错误

一、内存不足

问题:

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

解决:

# 进入config目录,修改jvm.options的配置
-Xms512M
-Xmx512M

二、不能以root启动

问题:

Exception in thread "main" java.nio.file.AccessDeniedException: /software/elasticsearch-6.4.3/config/jvm.options

解决:

chown -R 用户名:用户名 目录名

三、外网不能访问

问题:

# 启动正常,IP不能访问

解决:

# 修改config下面的elasticsearch.yml的配置
network.host: 0.0.0.0
http.port: 9200

四、文件句柄不足

问题:

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]

解决:

# 修改配置文件
vim /etc/security/limits.conf
# 在文件的末尾加上
* soft nofile 65536
* hard nofile 65536
* soft nproc 4096
* hard nproc 4096
# 修改配置文件
vim /etc/security/limits.d/20-nproc.conf
# 在文件的末尾加上
esyonghu   soft    nproc     4096
root       soft    nproc     unlimited
# 修改配置文件
vim /etc/sysctl.conf
# 在文件的末尾加上
vm.max_map_count = 655360
# 使配置文件生效
sysctl -p

五、磁盘使用过高

问题:

low disk watermark [85%]”或“high disk watermark [90%]

解决:

# 修改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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值