# Elasticsearch service will not start on Ubuntu server 18.04

**URL:** https://discuss.elastic.co/t/elasticsearch-service-will-not-start-on-ubuntu-server-18-04/219541
**Category:** Elasticsearch
**Created:** [February 16, 2020, 8:32pm UTC](https://discuss.elastic.co/t/elasticsearch-service-will-not-start-on-ubuntu-server-18-04/219541 "2020-02-16T20:32:09Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![miceffre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/miceffre/32/62832_2.png) [@miceffre](https://discuss.elastic.co/u/miceffre)
#### Post date: [February 16, 2020, 8:32pm UTC](https://discuss.elastic.co/t/elasticsearch-service-will-not-start-on-ubuntu-server-18-04/219541/1 "2020-02-16T20:32:09Z")

</div>

I get the following error: "Job for elasticsearch.service failed because the control process exited with error code." When I try to start elasticsearch on my Ubuntu 18.04 server. I have tried uninstalling and re-installing elasticsearch several times and I always get the same resulting error.

Some system info:  
Operating System: Ubuntu 18.04.4 LTS  
Kernel: Linux 4.15.0-76-generic  
Architecture: x86-64

Java  
openjdk version "11.0.6" 2020-01-14  
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)  
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode)

elasticsearch/stable,now 7.6.0 amd64 [installed]

systemctl status elasticsearch.service

elasticsearch.service - Elasticsearch  
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)  
Drop-In: /etc/systemd/system/elasticsearch.service.d  
└─override.conf  
Active: failed (Result: exit-code) since Sun 2020-02-16 20:21:01 UTC; 8min ago  
Docs: [http://www.elastic.co](http://www.elastic.co)  
Process: 7533 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID\_DIR}/elasticsearch.pid -  
Main PID: 7533 (code=exited, status=1/FAILURE)

Feb 16 20:21:00 archie elasticsearch[7533]: at org.elasticsearch.bootstrap.Elasticsearch.execu  
Feb 16 20:21:00 archie elasticsearch[7533]: at org.elasticsearch.cli.EnvironmentAwareCommand.e  
Feb 16 20:21:00 archie elasticsearch[7533]: at org.elasticsearch.cli.Command.mainWithoutErrorH  
Feb 16 20:21:00 archie elasticsearch[7533]: at org.elasticsearch.cli.Command.main(Command.java  
Feb 16 20:21:00 archie elasticsearch[7533]: at org.elasticsearch.bootstrap.Elasticsearch.main(  
Feb 16 20:21:00 archie elasticsearch[7533]: at org.elasticsearch.bootstrap.Elasticsearch.main(  
Feb 16 20:21:00 archie elasticsearch[7533]: For complete error details, refer to the log at /var/log/e  
Feb 16 20:21:01 archie systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/F  
Feb 16 20:21:01 archie systemd[1]: elasticsearch.service: Failed with result 'exit-code'.  
Feb 16 20:21:01 archie systemd[1]: Failed to start Elasticsearch.

edit /var/log/elasticsearch/gc.log.10

[2020-02-16T20:20:34.745+0000][7604][gc] Using Concurrent Mark Sweep  
[2020-02-16T20:20:34.745+0000][7604][gc,heap,coops] Heap address: 0x00000000c0000000, size: 1024 MB, Compressed Oops mode: 32-bit  
[2020-02-16T20:20:34.851+0000][7604][safepoint] Safepoint "EnableBiasedLocking", Time since last: 53024080 ns, Reaching safepoint: 105157 ns, At safepoint: 62857 ns, Total: 168014 ns  
[2020-02-16T20:20:34.857+0000][7604][gc,heap,exit] Heap  
[2020-02-16T20:20:34.857+0000][7604][gc,heap,exit] par new generation total 153344K, used 8179K [0x00000000c0000000, 0x00000000ca660000, 0x00000000ca660000)  
[2020-02-16T20:20:34.857+0000][7604][gc,heap,exit] eden space 136320K, 6% used [0x00000000c0000000, 0x00000000c07fce60, 0x00000000c8520000)  
[2020-02-16T20:20:34.857+0000][7604][gc,heap,exit] from space 17024K, 0% used [0x00000000c8520000, 0x00000000c8520000, 0x00000000c95c0000)  
[2020-02-16T20:20:34.857+0000][7604][gc,heap,exit] to space 17024K, 0% used [0x00000000c95c0000, 0x00000000c95c0000, 0x00000000ca660000)  
[2020-02-16T20:20:34.857+0000][7604][gc,heap,exit] concurrent mark-sweep generation total 878208K, used 0K [0x00000000ca660000, 0x0000000100000000, 0x0000000100000000)  
[2020-02-16T20:20:34.857+0000][7604][gc,heap,exit] Metaspace used 136K, capacity 4480K, committed 4480K, reserved 1056768K  
[2020-02-16T20:20:34.857+0000][7604][gc,heap,exit] class space used 3K, capacity 384K, committed 384K, reserved 1048576K

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [February 17, 2020, 10:42am UTC](https://discuss.elastic.co/t/elasticsearch-service-will-not-start-on-ubuntu-server-18-04/219541/2 "2020-02-17T10:42:44Z")

</div>

Hey,

can you share more output where you saw that exception stack trace, the last few lines are not enough. You can use `journalctl` to do that, see [https://www.elastic.co/guide/en/elasticsearch/reference/current/rpm.html#rpm-running-systemd](https://www.elastic.co/guide/en/elasticsearch/reference/current/rpm.html#rpm-running-systemd)

My assumption here, is that a bootstrap check fails, however if that happens, there is usually a detailed explanation or a link in the error message itself, so taking a closer look at the logs usually helps.

--Alex

---

<div class="post-metadata">

### Author: ![miceffre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/miceffre/32/62832_2.png) [@miceffre](https://discuss.elastic.co/u/miceffre)
#### Post date: [February 17, 2020, 1:38pm UTC](https://discuss.elastic.co/t/elasticsearch-service-will-not-start-on-ubuntu-server-18-04/219541/3 "2020-02-17T13:38:47Z")

</div>

Sure, I will work on getting you that right now. I have seen some references to the bootstrap in the /var/.../escluster01.log. I will work on getting you the full dump but for now here is the last timestamped error from the dump.  
[2020-02-16T17:14:38,075][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [es-archie] uncaught exception in thread [main]  
org.elasticsearch.bootstrap.StartupException: ElasticsearchException[Failure running machine learning native code. This could be due to running on an unsupported OS or distribution, missing OS libraries, or a problem with the temp directory. To bypass this problem by running Elasticsearch without machine learning functionality set [xpack.ml.enabled: false].]

---

<div class="post-metadata">

### Author: ![miceffre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/miceffre/32/62832_2.png) [@miceffre](https://discuss.elastic.co/u/miceffre)
#### Post date: [February 17, 2020, 1:41pm UTC](https://discuss.elastic.co/t/elasticsearch-service-will-not-start-on-ubuntu-server-18-04/219541/4 "2020-02-17T13:41:05Z")

</div>

oh... I have not tried the logs recommended solution yet either. [xpack.ml.enabled:false]

systemctl status elasticsearch.service

> <https://gist.github.com/miceffre/5a5b9a608c9a5f95898c4041e442ccca>

journalctl --since "1 hour ago"

> <https://gist.github.com/miceffre/7b173bb83d1024cb2713e02f6e31b032>

---

<div class="post-metadata">

### Author: ![miceffre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/miceffre/32/62832_2.png) [@miceffre](https://discuss.elastic.co/u/miceffre)
#### Post date: [February 17, 2020, 9:02pm UTC](https://discuss.elastic.co/t/elasticsearch-service-will-not-start-on-ubuntu-server-18-04/219541/5 "2020-02-17T21:02:16Z")

</div>

I was able to fix the configuration to enable the elasticsearch server to start by updating the elasticsearch.yml file with the following:

# ------------------------------ Machine Learning ------------------------------

# 

xpack.ml.enabled: false

# 

The computer I'm using is an older PC and this disables the machine learning feature that is enabled by default.

---

<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: [March 16, 2020, 9:02pm UTC](https://discuss.elastic.co/t/elasticsearch-service-will-not-start-on-ubuntu-server-18-04/219541/6 "2020-03-16T21:02:20Z")

</div>

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