一、問(wèn)題描述
在Linux中啟動(dòng)ES發(fā)現(xiàn)如下錯(cuò)誤: Native controller process has stopped - no new native processes can be started
,問(wèn)題如下所示:
-
問(wèn)題代碼
[2022-01-30T23:37:59,659][INFO ][o.e.x.m.p.NativeController] [node-1] Native controller process has stopped - no new native proces ses can be started [2022-01-30T23:37:59,663][INFO ][o.e.n.Node ] [node-1] stopping ... [2022-01-30T23:37:59,668][INFO ][o.e.x.w.WatcherService ] [node-1] stopping watch service, reason [shutdown initiated] [2022-01-30T23:37:59,669][INFO ][o.e.x.w.WatcherLifeCycleService] [node-1] watcher has stopped and shutdown [2022-01-30T23:38:00,010][INFO ][o.e.n.Node ] [node-1] stopped [2022-01-30T23:38:00,011][INFO ][o.e.n.Node ] [node-1] closing ... [2022-01-30T23:38:00,030][INFO ][o.e.n.Node ] [node-1] closed
-
問(wèn)題截圖
二、解決辦法
產(chǎn)生這個(gè)問(wèn)題的原因是因?yàn)镋S的安全機(jī)制問(wèn)題,解決辦法如下所示(注意:ES禁止Linux使用root用戶啟動(dòng),因此必須使用非root用戶啟動(dòng)):
-
新增內(nèi)容
vi /etc/security/limits.conf
然后
xxx(你的非root用戶名) soft nofile 65536 xxx(你的非root用戶名) hard nofile 65536 xxx(你的非root用戶名) soft nproc 4096 xxx(你的非root用戶名) hard nproc 4096
-
修改內(nèi)容
cd /etc/security/limits.d
然后
##這兩行是原本的內(nèi)容 * soft nproc 4096 root soft nproc unlimited ## 修改 #將*號(hào)改成用戶名 xxx(你的非root用戶名) soft nproc 4096 root soft nproc unlimited
-
添加內(nèi)容
vi /etc/sysctl.conf
然后在文末添加如下內(nèi)容
vm.max_map_count = 655360
保存退出以后再在
root用戶狀態(tài)下
執(zhí)行一下內(nèi)容:文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-504860.htmlsysctl -p
接下來(lái)切換到非root用戶就可以啟動(dòng)了文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-504860.html
到了這里,關(guān)于ES報(bào)錯(cuò)Native controller process has stopped - no new native processes can be started的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!