使用supervior 监控 elasticsearch 进程
elasticsearch引擎在使用中可能会出现后台守护进程挂掉的情况,需要手动启动来恢复正常。
这时则可以引用supervior进程管理工具来监控elasticsearch进程状态,实现进程挂掉自动重启的效果。
vi supervior.conf
1 //elasticsearch进程配置 2 [program:elasticsearch] 3 command=sh /mnt/elasticsearch-6.3.2/bin/elasticsearch 4 stderr_logfile=/var/log/Elastic.err.log 5 stdout_logfile=/var/log/Elastic.out.log 6 environment=JAVA_HOME=/usr/bin/java 7 autostart=true 8 autorestart=true 9 startsecs=1 10 numprocs=1 11 user=elastic
ERROR: [1] bootstrap checks failed
[1]: max file descriptors [65535] for elasticsearch process is too low, increase to at least [65536]
编辑 /etc/security/limits.conf
root soft nofile 65536
root hard nofile 65536
elastic soft nofile 65536
elastic hard nofile 65536