zoukankan      html  css  js  c++  java
  • ElasicSearch(2) Linux运行

    1. 改变虚拟机内存大小     cd config/jvm.options

     

    -Xms256m
    -Xmx256m

    1.org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: can not run elasticsearch as root

    不能用root身份登录

    解决办法

    groupadd student
    useradd mm -g student -p 123

    chown -R pp:student elasticsearch-7.0.0

    切换至pp用户登录运行,成功

    ----------------------------------------------------------------------------------------------------------------------------------

    2.Cannot allocate memory'

    无法分配内存

    ----------------------------------------------------------------------------------------------------------------------------------

    3. max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]

    对于elasticsearch进程,max文件描述符[4096]过低,至少增加到[65535]

    vi /etc/security/limits.conf

    添加如下内容:

    * soft nofile 65536

    * hard nofile 65536

    * soft nproc 4096

    * hard nproc 4096

    ----------------------------------------------------------------------------------------------------------------------------------

    4.max number of threads [3758] for user [pp] is too low, increase to at least [4096]

    用户最多线程数[3758][pp]太低,至少增加到[4096]

    cd /etc/security

    cd limits.d/

    vi 20-nproc.conf 

    *  soft    nproc     4096

    -----------------------------------------------------------------------------------------------------------------------------------

    5.max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

    最大虚拟内存区域vm。max_map_count[65530]太低,至少增加到[262144]

    解决:切换到root用户修改配置sysctl.conf

    vi /etc/sysctl.conf 

    添加下面配置:

    vm.max_map_count=655360

    并执行命令:

    sysctl -p

    -----------------------------------------------------------------------------------------------------------------------------------

    6.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

    默认的发现设置不适合生产使用;至少有一个[发现]。seed_hosts,发现。seed_providers,集群。必须配置initial_master_nodes]

    这时候继续编辑elasticsearch.yml文件
    将 #cluster.initial_master_nodes: ["node-1", "node-2"]
    修改为 cluster.initial_master_nodes: ["node-1"],记得保存。
  • 相关阅读:
    Servlet学习总结
    Tomcat学习总结1
    第44周星期日反思
    第44周星期一Tomcat学习2
    第44周星期五忙碌文档的一天
    第44周星期六好文章摘录
    laravel 5.6接入微信第三方授权登陆的主要步骤
    laravel多表登录出现路由调用错误
    cURL error 60: SSL certificate problem...
    传说中Python最难理解的点|看这完篇就够了(装饰器)
  • 原文地址:https://www.cnblogs.com/mm163/p/10720759.html
Copyright © 2011-2022 走看看