# Unable to start elasticsearch service

**URL:** <https://discuss.elastic.co/t/unable-to-start-elasticsearch-service/312083>\
**Category:** Elasticsearch\
**Created:** [August 15, 2022, 10:30am UTC](https://discuss.elastic.co/t/unable-to-start-elasticsearch-service/312083 "2022-08-15T10:30:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alice\_Walker](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alice_walker/32/99542_2.png) [@Alice\_Walker](https://discuss.elastic.co/u/Alice_Walker)\
**Post date:** [August 15, 2022, 10:30am UTC](https://discuss.elastic.co/t/unable-to-start-elasticsearch-service/312083/1 "2022-08-15T10:30:30Z")

</div>

Unable to start elastisearch service on AWS EC2 instances.

systemctl start elasticsearch  
Job for elasticsearch.service failed because a fatal signal was delivered to the control process. See "systemctl status elasticsearch.service" and "journalctl -xe" for details.

systemctl status elasticsearch.service  
● elasticsearch.service - Elasticsearch  
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)  
Active: failed (Result: signal) since Mon 2022-08-15 10:28:15 UTC; 49s ago  
Docs: [http://www.elastic.co](http://www.elastic.co)  
Process: 2377 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID\_DIR}/elasticsearch.pid --quiet (code=killed, signal=KILL)  
Main PID: 2377 (code=killed, signal=KILL)

Aug 15 10:28:13 ip-172-31-81-96.ec2.internal systemd[1]: Starting Elasticsearch...  
Aug 15 10:28:14 ip-172-31-81-96.ec2.internal elasticsearch[2377]: OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in ve...lease.  
Aug 15 10:28:15 ip-172-31-81-96.ec2.internal systemd[1]: elasticsearch.service: main process exited, code=killed, status=9/KILL  
Aug 15 10:28:15 ip-172-31-81-96.ec2.internal systemd[1]: Failed to start Elasticsearch.  
Aug 15 10:28:15 ip-172-31-81-96.ec2.internal systemd[1]: Unit elasticsearch.service entered failed state.  
Aug 15 10:28:15 ip-172-31-81-96.ec2.internal systemd[1]: elasticsearch.service failed.  
Hint: Some lines were ellipsized, use -l to show in full.

## journalctl -xe Aug 15 10:28:15 ip-172-31-81-96.ec2.internal kernel: [3259] 0 3259 27710 259 245760 0 -1000 sshd Aug 15 10:28:15 ip-172-31-81-96.ec2.internal kernel: [3263] 0 3263 180962 1862 147456 0 0 ssm-agent-worke Aug 15 10:28:15 ip-172-31-81-96.ec2.internal kernel: [3296] 0 3296 1068 26 53248 0 0 acpid Aug 15 10:28:15 ip-172-31-81-96.ec2.internal kernel: [1030] 89 1030 22610 254 204800 0 0 pickup Aug 15 10:28:15 ip-172-31-81-96.ec2.internal kernel: [1924] 0 1924 37127 330 331776 0 0 sshd Aug 15 10:28:15 ip-172-31-81-96.ec2.internal kernel: [2326] 1000 2326 37127 329 319488 0 0 sshd Aug 15 10:28:15 ip-172-31-81-96.ec2.internal kernel: [2327] 1000 2327 31185 247 90112 0 0 bash Aug 15 10:28:15 ip-172-31-81-96.ec2.internal kernel: [2353] 0 2353 59951 269 311296 0 0 sudo Aug 15 10:28:15 ip-172-31-81-96.ec2.internal kernel: [2354] 0 2354 47623 119 204800 0 0 su Aug 15 10:28:15 ip-172-31-81-96.ec2.internal kernel: [2355] 0 2355 31184 247 86016 0 0 bash Aug 15 10:28:15 ip-172-31-81-96.ec2.internal kernel: [2374] 0 2374 34860 49 118784 0 0 systemctl Aug 15 10:28:15 ip-172-31-81-96.ec2.internal kernel: [2375] 0 2375 3834 30 77824 0 0 systemd-tty-ask Aug 15 10:28:15 ip-172-31-81-96.ec2.internal kernel: [2377] 995 2377 389937 213311 1884160 0 0 java Aug 15 10:28:15 ip-172-31-81-96.ec2.internal kernel: oom-kill:constraint=CONSTRAINT\_NONE,nodemask=(null),cpuset=/,mems\_allowed=0,global\_oom,task\_memcg=/,ta Aug 15 10:28:15 ip-172-31-81-96.ec2.internal kernel: Out of memory: Killed process 2377 (java) total-vm:1559748kB, anon-rss:853240kB, file-rss:4kB, shmem-r Aug 15 10:28:15 ip-172-31-81-96.ec2.internal systemd[1]: elasticsearch.service: main process exited, code=killed, status=9/KILL Aug 15 10:28:15 ip-172-31-81-96.ec2.internal systemd[1]: Failed to start Elasticsearch. -- Subject: Unit elasticsearch.service has failed -- Defined-By: systemd -- Support: [systemd-devel Info Page](http://lists.freedesktop.org/mailman/listinfo/systemd-devel)

## -- Unit elasticsearch.service has failed.

-- The result is failed.  
Aug 15 10:28:15 ip-172-31-81-96.ec2.internal systemd[1]: Unit elasticsearch.service entered failed state.  
Aug 15 10:28:15 ip-172-31-81-96.ec2.internal systemd[1]: elasticsearch.service failed.  
Aug 15 10:28:47 ip-172-31-81-96.ec2.internal dhclient[2886]: XMT: Solicit on eth0, interval 125840ms.

---

<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:** [August 16, 2022, 12:26am UTC](https://discuss.elastic.co/t/unable-to-start-elasticsearch-service/312083/2 "2022-08-16T00:26:59Z")

</div>

Welcome to our community! 😃

You will need to check your full Elasticsearch log to see what is happening there.  
Please also format your code/logs/config using the `</>` button, or markdown style back ticks. It helps to make things easy to read which helps us help you 🙂

---

<div class="post-metadata">

**Author:** ![cheshirecat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cheshirecat/32/109532_2.png) [@cheshirecat](https://discuss.elastic.co/u/cheshirecat)\
**Post date:** [August 17, 2022, 7:50am UTC](https://discuss.elastic.co/t/unable-to-start-elasticsearch-service/312083/3 "2022-08-17T07:50:03Z")

</div>

Hello there!  
In your log we can see:

> [@Alice\_Walker](#):
>
> Out of memory: Killed process 2377 (java)

My question is:  
how did you set up heap memory size?  
You can check it in file:

```auto
/etc/elasticsearch/jvm.options

```

Lines:

```auto
## -Xms4g
## -Xmx4g

```

should be uncommented and values should be set for your needs.

---

<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:** [September 14, 2022, 7:50am UTC](https://discuss.elastic.co/t/unable-to-start-elasticsearch-service/312083/4 "2022-09-14T07:50:19Z")

</div>

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