• 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"],记得保存。
  • 相关阅读:
    C错误调试:当前不会命中断点。没有与此行关联的可执行代码
    将不同的数据写入不同的文件中
    UMFPACK调用的接口
    求解压力备份()
    用C++实现向量二范数
    编写参考文献的方法
    改写UMFPACK算例中的压缩方式(二)
    div文字多行展示,多出的文字用省略号代替
    Internet Explorer Developer Toolbar 中文
    (转帖)天下第七C#学习笔记(3)
  • 原文地址:https://www.cnblogs.com/mm163/p/10720759.html
Copyright © 2020-2023  润新知