elasticsearch报错无法创建新进程
“unable to create new native thread”
查看系统版本允许创建进程数
[root@localhost webscan]# cat /proc/sys/kernel/pid_max
32768
解决办法:
vim /etc/security/limits.d/20-nproc.conf
各个版本系统不一样有的可能是90-nproc.conf
设置为 * soft nproc 102400
普通用户启动有限制:
root用户启动可以不做限制:
vi /etc/security/limits.conf
打开文件数
※ soft nofile 32768
※ hard nofile 65536
打开进程数
*soft nproc 32768
*hard nproc 65536
重新启动elasticsearch不再报错。
su -s /bin/bash captain -c ‘/usr/local/elasticsearch-5.6.2/bin/elasticsearch -d’
es 无法启动:
清理es索引日志,重启服务;ok
参考文章:https://blog.csdn.net/qq_36365520/article/details/106231654