Elasticsearch service is not staring

Getting below error while starting elasticsearch service.

Starting elasticsearch: /usr/share/elasticsearch/bin/elasticsearch: line 155: 5243 Killed exec "$JAVA" $JAVA_OPTS $ES_JAVA_OPTS -Des.path.home="$ES_HOME" -cp "$ES_CLASSPATH" org.elasticsearch.bootstrap.Elasticsearch start "$@" 0>&-

Please help me on this.

Hey,

this looks like a package based installation so you should use systemd/init.d to start or stop Elasticsearch, as it properly sets up the environment. If that does not work, then please show us some logfiles or the systemd output.

Alternatively you can download the zip file distribution and first check if that one works.

--Alex