美文网首页
es启动报错

es启动报错

作者: 奇点一氪 | 来源:发表于2020-04-14 09:55 被阅读0次

    es启动

    访问http://120.27.16.18:9200/,访问不到
    需要添加
    network.publish_host: 120.27.16.18配置 ip为服务器地址;

    [2020-04-13T18:22:04,183][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [iZm5e4lh6e5qfekreixzfoZ] uncaught exception in thread [main]
    org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: can not run elasticsearch as root
    

    是没设置elsearch权限

    遇到得问题

    http://ip:9200/ 无法访问
    vim config/elasticsearch.yml

    • 增加
      network.host: 0.0.0.0

    重启 es 异常

    ERROR: [5] bootstrap checks failed
    [1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
    [2]: max number of threads [1024] for user [es] is too low, increase to at least [4096]
    [3]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
    [4]: failed to install; check the logs and fix your configuration or disable system call filters at your own risk
    [5]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
    [2019-04-09T09:51:29,228][INFO ][o.e.n.Node ] [localhost.localdomain] stopping ...
    [2019-04-09T09:51:29,264][INFO ][o.e.n.Node ] [localhost.localdomain] stopped
    [2019-04-09T09:51:29,265][INFO ][o.e.n.Node ] [localhost.localdomain] closing ...
    [2019-04-09T09:51:29,320][INFO ][o.e.n.Node ] [localhost.localdomain] closed
    [2019-04-09T09:51:29,323][INFO ][o.e.x.m.p.NativeController] [localhost.localdomain] Native controller process has stopped - no new native processes can be started

    • 主要出现下面三个错误
      切换root用户
      [root@localhost ~]# vi /etc/security/limits.conf
      在文件的末尾加上
      elsearch soft nofile 65536
      elsearch hard nofile 65536
      elsearch soft nproc 4096
      elsearch hard nproc 4096

    重启es 异常

    ERROR: [3] bootstrap checks failed
    [1]: max number of threads [1024] for user [es] is too low, increase to at least [4096]
    [2]: system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk
    [3]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured

    vi /etc/security/limits.d/90-nproc.conf
    修改

    •      soft    nproc     1024
      

    •      soft    nproc     4096
      

    修改下面文件加上内容
    [root@localhost security]# vi /etc/sysctl.conf
    vm.max_map_count = 655360
    对于上面的内容让其生效
    [root@localhost security]# sysctl -p
    vm.max_map_count = 655360

    重启es 异常

    ERROR: [2] bootstrap checks failed
    [1]: system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk
    [2]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured

    在 elasticsearch.yml中添加配置项:bootstrap.system_call_filter为false:

    bootstrap.memory_lock: false
    bootstrap.system_call_filter: false

    然后启动./elasticsearch

    相关文章

      网友评论

          本文标题:es启动报错

          本文链接:https://www.haomeiwen.com/subject/ujwnmhtx.html