Exception in thread "main" java.lang.RuntimeException: starting java failed with [1] : Failed to start Elasticsearch

Hi, I'm using Elasticsearch 7.6.1, after installing Elasticsearch 7.6.1 rpm. I'm unable to start elasticsearch service.

Error
[@o* ~] sudo systemctl status elasticsearch ● elasticsearch.service - Elasticsearch Loaded: loaded (/etc/systemd/system/elasticsearch.service; enabled; vendor preset: disabled) Drop-In: /etc/systemd/system/elasticsearch.service.d └─override.conf Active: failed (Result: exit-code) since Sat 2020-05-09 18:26:27 WAT; 8min ago Docs: http://www.elastic.co Process: 29632 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p {PID_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)
Main PID: 29632 (code=exited, status=1/FAILURE)

May 09 18:26:26 username systemd[1]: Starting Elasticsearch...
May 09 18:26:27 userbane elasticsearch[29632]: Exception in thread "main" java.lang.RuntimeException: starting java failed with [1]
May 09 18:26:27 username elasticsearch[29632]: output:
May 09 18:26:27 username elasticsearch[29632]: error:
May 09 18:26:27 username systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
May 09 18:26:27 username systemd[1]: Failed to start Elasticsearch.
May 09 18:26:27 username systemd[1]: Unit elasticsearch.service entered failed state.
May 09 18:26:27 username systemd[1]: elasticsearch.service failed.

I noticed my I couldn't find the tmp dir in my ES_HOME, but i can see it on my other ES node

However I have specify the path on /etc/sysconfig/elasticsearch

################################
# Elasticsearch
################################

# Elasticsearch home directory
#ES_HOME=/usr/share/elasticsearch

# Elasticsearch Java path
#JAVA_HOME=

# Elasticsearch configuration directory
ES_PATH_CONF=/etc/elasticsearch

# Elasticsearch PID directory
#PID_DIR=/var/run/elasticsearch

# Additional Java OPTS
ES_JAVA_OPTS=**/usr/share/elasticsearch/tmp**

# Configure restart on package upgrade (true, every other setting will lead to not restarting)
#RESTART_ON_UPGRADE=true

################################
# Elasticsearch service
################################

# SysV init.d
#
# The number of seconds to wait before checking if Elasticsearch started successfully as a daemon process
ES_STARTUP_SLEEP_TIME=5

################################
# System properties
################################

# Specifies the maximum file descriptor number that can be opened by this process
# When using Systemd, this setting is ignored and the LimitNOFILE defined in
# /usr/lib/systemd/system/elasticsearch.service takes precedence
#MAX_OPEN_FILES=65535

# The maximum number of bytes of memory that may be locked into RAM
# Set to "unlimited" if you use the 'bootstrap.memory_lock: true' option
# in elasticsearch.yml.
# When using systemd, LimitMEMLOCK must be set in a unit file such as
# /etc/systemd/system/elasticsearch.service.d/override.conf.
#MAX_LOCKED_MEMORY=unlimited

# Maximum number of VMA (Virtual Memory Areas) a process can own
# When using Systemd, this setting is ignored and the 'vm.max_map_count'
# property is set at boot time in /usr/lib/sysctl.d/elasticsearch.conf
#MAX_MAP_COUNT=262144
~
~

I need help pls

Check /var/log/elasticsearch/elasticsearch.log, it should have more information.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.