ES报错Native controller process has stopped - no new native processes can be started

ES报错Native controller process has stopped - no new native processes can be started,第1张

ES报错Native controller process has stopped - no new native processes can be started 一、问题描述

在Linux中启动ES发现如下错误: Native controller process has stopped - no new native processes can be started,问题如下所示:

    问题代码

    [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
    

    问题截图

二、解决办法

产生这个问题的原因是因为ES的安全机制问题,解决办法如下所示(注意:ES禁止Linux使用root用户启动,因此必须使用非root用户启动):

    新增内容

    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
    

    修改内容

    cd /etc/security/limits.d
    

    然后

    ##这两行是原本的内容
    *          soft    nproc     4096
    root       soft    nproc     unlimited
    
    ## 修改
    #将*号改成用户名
    xxx(你的非root用户名)   soft    nproc     4096
    root       soft    nproc     unlimited
    

    添加内容

    vi /etc/sysctl.conf 
    

    然后在文末添加如下内容

    vm.max_map_count = 655360
    

    保存退出以后再在 root用户状态下 执行一下内容:

    sysctl -p
    

    接下来切换到非root用户就可以启动了

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5715401.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-17
下一篇 2022-12-17

发表评论

登录后才能评论

评论列表(0条)

保存