当前环境:
centos: 7.x
jdk:1.8
user:wenshao
elasticsearch: 6.2.2
1 最大文件描述符太小
[1]: max file descriptors [1024] for elasticsearch process is too low, increase to at least [65536]
1.1 解决方法:
sudo vim /etc/security/limits.conf
# 修改前
* soft nofile 1024
* hard nofile 1024
# 修改后
* soft nofile 65536
* hard nofile 65536
## 修改完成后重新登录当前ssh用户就修改生效了
1.2 解析
*: 匹配所有用户
soft: 软连接文件
hard: 硬连接文件
nofile: 文件打开的值
注意,不能通过ulimit -n进行设置,因为普通用户使用ulimit设置只能设置比当前值更小的值。
2 最大线程数太小
[2]: max number of threads [3903] for user [wenshao] is too low, increase to at least [4096]
2.1 解决方法:
sudo vim /etc/security/limits.conf
# 文件追加 如果存在就修改
* soft nproc 4096
* hard nproc 4096
## 修改完成后重新登录当前ssh用户就修改生效了
2.2 解析
*: 匹配所有用户
soft: 软连接文件
hard: 硬连接文件
nproc: 打开的线程的最大值
有的文档写的为修改/etc/security/limits.d/x-nproc.conf,修改并不能生效。
3 用户拥有的内存权限太小
[3]: max virtual memory areas vm.max_map_count [2621] is too low, increase to at least [262144]
3.1 解决方法:
sudo vim /etc/sysctl.conf
# 文件追加 如果存在就修改
vm.max_map_count = 262144
## 修改完成后执行: sudo sysctl -p并重新登录当前ssh用户就修改生效了
4 logstash启动报错
Java HotSpot(TM) 64-Bit Server VM warning: Option UseParNewGC was deprecated in version 9.0 and will likely be removed in a future release.
Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jruby.util.io.FilenoUtil (file:/data/service/logstash-6.2.2/logstash-core/lib/jars/jruby-complete-9.1.13.0.jar) to method sun.nio.ch.SelChImpl.getFD()
WARNING: Please consider reporting this to the maintainers of org.jruby.util.io.FilenoUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Sending Logstash's logs to /data/service/logstash-6.2.2/logs which is now configured via log4j2.properties
[2018-03-14T14:50:33,417][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"fb_apache", :directory=>"/data/service/logstash-6.2.2/modules/fb_apache/configuration"}
[2018-03-14T14:50:33,482][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"netflow", :directory=>"/data/service/logstash-6.2.2/modules/netflow/configuration"}
[2018-03-14T14:50:34,252][ERROR][org.logstash.Logstash ] java.lang.IllegalStateException: org.jruby.exceptions.RaiseException: (LoadError) Unsupported platform: x86_64-linux
网友评论