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

**URL:** <https://discuss.elastic.co/t/exception-in-thread-main-java-lang-runtimeexception-starting-java-failed-with-1-failed-to-start-elasticsearch/231857>\
**Category:** Elasticsearch\
**Created:** [May 9, 2020, 5:51pm UTC](https://discuss.elastic.co/t/exception-in-thread-main-java-lang-runtimeexception-starting-java-failed-with-1-failed-to-start-elasticsearch/231857 "2020-05-09T17:51:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![proxx](https://avatars.discourse-cdn.com/v4/letter/p/3d9bf3/32.png) [@proxx](https://discuss.elastic.co/u/proxx)\
**Post date:** [May 9, 2020, 5:51pm UTC](https://discuss.elastic.co/t/exception-in-thread-main-java-lang-runtimeexception-starting-java-failed-with-1-failed-to-start-elasticsearch/231857/1 "2020-05-09T17:51:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 10, 2020, 11:13pm UTC](https://discuss.elastic.co/t/exception-in-thread-main-java-lang-runtimeexception-starting-java-failed-with-1-failed-to-start-elasticsearch/231857/2 "2020-05-10T23:13:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 7, 2020, 11:13pm UTC](https://discuss.elastic.co/t/exception-in-thread-main-java-lang-runtimeexception-starting-java-failed-with-1-failed-to-start-elasticsearch/231857/3 "2020-06-07T23:13:09Z")

</div>

Closed on June 7, 2020, 11:13pm UTC

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