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. as3.0 当fla里面有TLF文本的时候,加载声音会出现错误

    问题描述 1.现有制作好的mp3加载包,这个包是相对路径 2.如果fla里面没有TLF文本,可以正常运行 解题思路 1.音频的相对路径和加载TLF文本的路径不一样,fla会优先选择TLF文件,这样mp ...

  2. 解决find命令报错: paths must precede expression

    eg: find . -name *.c -or -name *.cpp 需要将模糊搜索词用引号括起来: find . -name "*.c" -or -name "*. ...

  3. python 迭代器生成

    博客:http://www.cnblogs.com/alex3714/articles/5765046.html 列表生成式 [i*2 for i in range(10)] #创建时就生成,不调用也 ...

  4. js控制easyui文本框例子及控制html例子

    easyui $('#value').textbox('setValue',''); //赋值 $('#value').textbox({required:false});//必填,方框变红 $('# ...

  5. echarts仪表盘

    echarts链接:https://gallery.echartsjs.com/editor.html?c=xkasbcOqh0 代码: var axislineColor = new echarts ...

  6. [leetcode]80. Remove Duplicates from Sorted Array II有序数组去重(单个元素可出现两次)

    Given a sorted array nums, remove the duplicates in-place such that duplicates appeared at most twic ...

  7. node.js中使用http模块创建服务器和客户端

    node.js中的 http 模块提供了创建服务器和客户端的方法,http 全称是超文本传输协议,基于 tcp 之上,属于应用层协议. 一.创建http服务器 const http = require ...

  8. MySQL开发——【数据库、数据表的基本操作】

    启动MySQL服务器端 CMD启动MySQL服务器端 net start(启动)|stop(停止)|restart(重启)服务名称(mysql) 连接MySQL服务器端 CMD连接MySQL服务器端 ...

  9. how to adjust PKG_CONFIG_PATH environment-variable

    PKG_CONFIG_PATH is a environment variable that specifies additional paths in which pkg-config will s ...

  10. boost学习 内嵌类型检测 与 any 的代码练习

    本文是学习 boost源码的一些练习 参考文章来自 刘未鹏 C++的罗浮宫(http://blog.csdn.net/pongba) 目录 http://blog.csdn.net/pongba/ar ...