ymk369
ymk369

Reputation: 51

Elasticsearch error to start service

I have problems starting elasticsearch, the command to start is:

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

Out put.

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

but executed status I get: "elasticsearch dead but subsys locked"

I tried deleting "elasticsearch", in /var/lock/subsys but, this file is generated again.

In the log says.

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.

But the process is started with 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

Any help would be appreciated.

Upvotes: 3

Views: 2956

Answers (1)

GURUVEER
GURUVEER

Reputation: 51

Verify java selection

alternatives --config java

Make sure java 8 is in use. Elasticsearch requires at least Java 8.

Please try setting up the variables in /etc/elasticsearch/elasticsearch.yml:

path.data: path/to/data

path.work: path/to/work

path.logs: /var/log/elasticsearch

path.conf: /etc/elasticsearch

Note: Give access to user "elasticsearch" for folder that elasticsearch uses:

chown -R elasticsearch /path/to/data chown -R elasticsearch /path/to/work

Upvotes: 1

Related Questions