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. Flask最强攻略 - 跟DragonFire学Flask - 第二篇 Flask 中的 Render Redirect HttpResponse

    1.Flask中的HTTPResponse 在Flask 中的HttpResponse 在我们看来其实就是直接返回字符串 2.Flask中的Redirect 每当访问"/redi" ...

  2. JS数组存储(两个数组相等,一个改变,另一个跟着改变)

    数组是一种引用数据类型,数组引用变量只是一个引用,数组元素和数组变量在内存里是分开存放的实际的数组元素被存储在堆(heap)内存中:数组引用变量是一个引用类型的变量,被存储在栈(stack)内存中. ...

  3. NSLog无法使用

    iOS/macos 中 #import<foundation/foundation.h> nslog不能用 如果项目中包含c/c++程序代码 将其后缀修改成.m .mm 将项目的build ...

  4. 890. Find and Replace Pattern找出匹配形式的单词

    [抄题]: You have a list of words and a pattern, and you want to know which words in words matches the ...

  5. java得到当前日期的前一天或后一天

    public String getNextDay(String startdate) throws ParseException{ Date date = (new SimpleDateFormat( ...

  6. SecureCRT问题

    使用SecureCRT 与虚拟机进行通信,提示The remote system refused the connection 解决:由于缺少SSH服务器端 sudo apt-get install ...

  7. React-router4 第七篇 Recursive Paths 递归路径

    https://reacttraining.com/react-router/web/example/recursive-paths import React from 'react' import ...

  8. PHP开发——环境安装

    PHP环境 Apache IDE的选择

  9. Python之路(第二十八篇) 面向对象进阶:类的装饰器、元类

    一.类的装饰器 类作为一个对象,也可以被装饰. 例子 def wrap(obj): print("装饰器-----") obj.x = 1 obj.y = 3 obj.z = 5 ...

  10. Java-static关键字解析

    static关键字是很多朋友在编写代码和阅读代码时碰到的比较难以理解的一个关键字,也是各大公司的面试官喜欢在面试时问到的知识点之一.下面就先讲述一下static关键字的用法和平常容易误解的地方,最后列 ...