# Elasticsearch Service won't startup on reboot

**URL:** <https://discuss.elastic.co/t/elasticsearch-service-wont-startup-on-reboot/222502>\
**Category:** Elasticsearch\
**Created:** [March 6, 2020, 6:59pm UTC](https://discuss.elastic.co/t/elasticsearch-service-wont-startup-on-reboot/222502 "2020-03-06T18:59:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![edster](https://avatars.discourse-cdn.com/v4/letter/e/da6949/32.png) [@edster](https://discuss.elastic.co/u/edster)\
**Post date:** [March 6, 2020, 6:59pm UTC](https://discuss.elastic.co/t/elasticsearch-service-wont-startup-on-reboot/222502/1 "2020-03-06T18:59:04Z")

</div>

Hello,

We are running our elastic servers on Ubuntu 16.x servers. The services have been enabled. The version of elastic 7.2. Entire path has been included in the .service file and it was installed as a tar file. The symbolic link to start the service is correct/has the proper path because the service file can be found. However, on reboot when checking the status this is the message it shows

> ● elasticsearch.service  
> Loaded: not-found (Reason: No such file or directory)  
> Active: inactive (dead)

When trying to start the service this error comes up.

> Failed to start elasticsearch.service: Unit elasticsearch.service not found.

The only way to fix it is to do a daemon-reload, however, on previous test servers this is not needed as the service is able to start on server reboot, by itself.

The logs for elasticsearch show nothing and neither does the journalctl -u elasticsearch

---

<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:** [March 8, 2020, 9:36pm UTC](https://discuss.elastic.co/t/elasticsearch-service-wont-startup-on-reboot/222502/2 "2020-03-08T21:36:06Z")

</div>

Where did you get the service file from?

---

<div class="post-metadata">

**Author:** ![edster](https://avatars.discourse-cdn.com/v4/letter/e/da6949/32.png) [@edster](https://discuss.elastic.co/u/edster)\
**Post date:** [March 10, 2020, 3:57pm UTC](https://discuss.elastic.co/t/elasticsearch-service-wont-startup-on-reboot/222502/3 "2020-03-10T15:57:01Z")

</div>

The service file came from a debian package. Same OSS version. The idea was to also have it set up as a service/enable it in case the server reboots. It has worked before. But for some reason now it won't. It is 7.2 version.

---

<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:** [March 10, 2020, 7:44pm UTC](https://discuss.elastic.co/t/elasticsearch-service-wont-startup-on-reboot/222502/4 "2020-03-10T19:44:58Z")

</div>

You'd be better off using the DEB installer if you can.

Have you checked your system level logs to see if it shows anything?

---

<div class="post-metadata">

**Author:** ![edster](https://avatars.discourse-cdn.com/v4/letter/e/da6949/32.png) [@edster](https://discuss.elastic.co/u/edster)\
**Post date:** [March 10, 2020, 8:00pm UTC](https://discuss.elastic.co/t/elasticsearch-service-wont-startup-on-reboot/222502/5 "2020-03-10T20:00:07Z")

</div>

Well I tried using the DEB before but it wasn't working properly and we also settled on being able to keep everything in a custom location. We've already installed and even included OpenDistro for this and because of a very tight timeline we don't have anymore time to change it. We've checked the system level logs, however, there doesn't seem any extra information on this. We've checked the daemon.log file and other logs found within /var/log/all/ but not sure what more this could be.

---

<div class="post-metadata">

**Author:** ![edster](https://avatars.discourse-cdn.com/v4/letter/e/da6949/32.png) [@edster](https://discuss.elastic.co/u/edster)\
**Post date:** [March 12, 2020, 3:39pm UTC](https://discuss.elastic.co/t/elasticsearch-service-wont-startup-on-reboot/222502/6 "2020-03-12T15:39:59Z")

</div>

We were able to fix it. It seems for some reason the location of the service file was causing issues. So we moved it in to the /lib/systemd/system directory. Reenabled from there and did a daemon reload.

---

<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:** [April 9, 2020, 3:40pm UTC](https://discuss.elastic.co/t/elasticsearch-service-wont-startup-on-reboot/222502/7 "2020-04-09T15:40:03Z")

</div>

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