启动服务时出现Elasticsearch错误



我有问题启动elasticsearch,启动命令是:

cd /etc/init.d && ./elasticsearch start

/opt/jdk1.8.0_77 uno
JAVA /opt/jdk1.8.0_77/bin/java
Starting elasticsearch:                                    [  OK  ]

但执行状态我得到:"elasticsearch dead but subsys locked"

我尝试删除"elasticsearch",在/var/lock/subsys中,但是,这个文件又生成了。

在日志中说。

java.lang.RuntimeException: Java version: 1.7.0_40 suffers from critical bug https://bugs.openjdk.java.net/browse/JDK-8024830 which can cause data corruption.
Please upgrade the JVM, see http://www.elastic.co/guide/en/elasticsearch/reference/current/_installation.html for current recommendations.
If you absolutely cannot upgrade, please add -XX:-UseSuperWord to the JVM_OPTS environment variable.
Upgrading is preferred, this workaround will result in degraded performance.

但是这个过程是从java 8开始的,

elasticsearch      26918  0.8  1.0 30526952 724324 ?     Sl   Jul03   1:29 /opt/jdk1.8.0_77/bin/java -Xms256m -Xmx1g -Djava.awt.headless=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -XX:+DisableExplicitGC -Dfile.encoding=UTF-8 -Delasticsearch -Des.foreground=yes -Des.path.home=/opt/elasticsearch -cp :/opt/elasticsearch/lib/elasticsearch-1.7.0.jar:/opt/elasticsearch/lib/*:/opt/elasticsearch/lib/sigar/* org.elasticsearch.bootstrap.Elasticsearch

验证java选择

options——config java

确保java 8正在使用中。Elasticsearch至少需要Java 8。

请尝试设置/etc/elasticsearch/elasticsearch.yml中的变量:

路径。数据:数据路径//

路径。工作:工作路径//

路径。日志:/var/log/elasticsearch

path.conf:/etc/elasticsearch

注意:允许访问用户elasticsearch;对于那个文件夹elasticsearch用途:

chown -R elasticsearch/path/to/data

相关内容

  • 没有找到相关文章

最新更新