zoukankan      html  css  js  c++  java
  • 启动elasticsearch报错

    could not find java; set JAVA_HOME or ensure java is in PATH

    首先需要安装java

    1、yum list installed |grep java  查看当前有没有装

    有的话先卸载

    yum -y remove java-1.8.0-openjdk*        *表时卸载所有openjdk相关文件输入  

    yum -y remove tzdata-java.noarch         卸载tzdata-java  

    安装java

    yum  install  java-1.8.0-openjdk   java-1.8.0-openjdk-devel

    启动

    sudo -iu www-data /usr/local/elasticsearch/bin/elasticsearch -d #-d为后台启动

    如果还有报错的话

    Exception in thread "main" java.nio.file.AccessDeniedException: /usr/local/elasticsearch/config/jvm.

    则要为当前用户添加权限

    chown www-data /usr/local/elasticsearch -R

    启动时,突然服务又停止的话,查看日志

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

    解决方法:

    1、vi /etc/sysctl.conf

    设置fs.file-max=655350

    保存之后sysctl -p使设置生效

    2、vi /etc/security/limits.conf 新增

    * soft nofile 655350

    * hard nofile 655350

    如报一下错误

    max number of threads [3820] for user [www-data] is too low, increase to at least [4096]

    修改如下:

    1、修改配置文件/etc/security/limits.conf

    * soft nproc 10240

    * hard nproc 10240

    * soft nofile 10240

    * hard nofile 10240

    2、然后重启即可

    其中nofile对应open_files

    nproc对应max_user_processes

    通过 ulimit -a可以查看max_user_processes

    搭建集群时,启动节点报错

    [node-2] failed to send join request to master [{node-1}{EQwLRT_kSm6sI4KPwsMkKw}{ya57_AoaRaeQbCzJKShWMw}{172.16.100.199}{172.16.100.199:9300}], reason [RemoteTransportException[[node-1][172.16.100.199:9300][internal:discovery/zen/join]]; nested: IllegalArgumentException[can't add node {node-2}{EQwLRT_kSm6sI4KPwsMkKw}{DDv-R-CITnePbZNmPb_1Fw}{172.16.100.201}{172.16.100.201:9300}, found existing node {node-1}{EQwLRT_kSm6sI4KPwsMkKw}{ya57_AoaRaeQbCzJKShWMw}{172.16.100.199}{172.16.100.199:9300} with the same id but is a different node instance]; ]

    解决方法如下,节点data文件下的文件清空

  • 相关阅读:
    Sql Server--如何自动备份数据
    Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Chinese_PRC_CI_AI" in the equal to operation.
    GET方法和POST方法的区别,Get方法到底可传递的字符串的最大长度是多少?
    Specialization For SCCM
    Fullscreen API:全屏操作
    How to enable remote connections to SQL Server
    Advanced Installer
    ajax跨域请求webservice webconfig配置
    SharePoint Resize app
    Sharepoint 开启App 配置App
  • 原文地址:https://www.cnblogs.com/nr-zhang/p/9051680.html
Copyright © 2011-2022 走看看