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"],记得保存。
  • 相关阅读:
    myisamchk命令修复表操作
    CentOS下的yum upgrade和yum update区别
    CentOS 6.9/7通过yum安装指定版本的MySQL
    Linux下Shell去除空行的方法
    Linux下环境变量设置技巧
    交互设计师如何做运营需求-以网易严选邀请新人功能设计为例
    对应用启动时间的关注和获取
    快速发现并解决maven依赖传递冲突
    mock测试方法及实践改进
    网易杭研易盾实习心得(4)
  • 原文地址:https://www.cnblogs.com/mm163/p/10720759.html
Copyright © 2011-2022 走看看