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文件下的文件清空。

启动elasticsearch报错的更多相关文章

  1. Docker启动Elasticsearch报错java.nio.file.AccessDeniedException

    报错信息 Caused by: java.nio.file.AccessDeniedException: /usr/share/elasticsearch/data/nodes 问题分析 表面上是说容 ...

  2. Docker启动Elasticsearch报错vm.max_map_count

    报错信息如下 max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144] 临 ...

  3. supervisor 启动ElasticSearch报错问题

    在/etc/elasticsearch/conf.d/新建一个es的配置文件,elasticsearch.conf,这里碰到一个小坑,网上很多文章介绍的是elasticsearch.ini,启动发现找 ...

  4. 启动elasticsearch报错的几种原因及解决方法

    ERROR: [1] bootstrap checks failed [1]: max virtual memory areas vm.max_map_count [65530] is too low ...

  5. 启动elasticsearch报错解决

    说不定以后会不定期更新该文档 1.提示文件描述符数量太少,修改/etc/security/limits.conf文件,添加. * soft nofile 65537 * hard nofile 655 ...

  6. Springboot整合Elasticsearch报错availableProcessors is already set to [4], rejecting [4]

    Springboot整合Elasticsearch报错 今天使用SpringBoot整合Elasticsearch时候,相关的配置完成后,启动项目就报错了. nested exception is j ...

  7. maven 项目启动tomcat报错 java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

    maven项目启动tomcat报错: java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderLi ...

  8. 【转】Eclipse下启动tomcat报错:/bin/bootstrap.jar which is referenced by the classpath, does not exist.

    转载地址:http://blog.csdn.net/jnqqls/article/details/8946964 1.错误: 在Eclipse下启动tomcat的时候,报错为:Eclipse下启动to ...

  9. 学习中的错误——ubuntu 14.04 LTS 启动eclipse报错

    在ubuntu中启动eclipse报错:(Eclipse:15978): GLib-GIO-CRITICAL **: g_dbus_connection_get_unique_name: assert ...

随机推荐

  1. 445. Add Two Numbers II 链表中的数字求和

    [抄题]: You are given two non-empty linked lists representing two non-negative integers. The most sign ...

  2. Mobile Computing: the Next Decade论文 cloudlet薄云

    1 Introduction “Information at your fingertips anywhere, anytime” has been the driving vision of mob ...

  3. 激活prompt

    1.下载SQLPrompt 2. 断网, 打开注册机,拷贝验证码 2. 点击activate, 拷贝代码

  4. hdpi对应分辨率

    ldpi  QVGA (240×320) mdpi  HVGA (320×480) hdpi  WVGA (480×800),FWVGA (480×854) xhdpi  720P(1280*720) ...

  5. eclipse中启动项目报内存溢出问题通过修改配置解决

     标注:添加下面的参数还是挺管用的,本人亲测可试,同时启用两个项目,总是报堆内存不足,加了下面的参数后变可以同时正常运行了. 错误如下: Error occurred during initializ ...

  6. 微擎开发------day01

    微擎的数据常量 $_GPC   -- 全局请求变量 类型: array 说明: 合并请求参数, 包括 $_GET, $_POST, $_COOKIE的内容. 相同键名覆盖规则为 $_COOKIE 覆盖 ...

  7. gd_t , bd_t 结构分析

    在分析板级初始化函数board_init_f 和 board_init_r 之前,先来看一下在uboot中颇为重要的 gd_t, bd_t 结构 bd_t 所对应的定义bd_info 在 arch/a ...

  8. CUDA[3] Samples for accessing shared/global memory

    memory model: programming model: Source:  Udacity Class CS344

  9. 1.8 新特性之 Lambda Expressions

    Lambda expressions are allowed only at source level 1.8 or above The target type of this expression ...

  10. GIS中空间数据和非空间数据