# ES fails to start on reboot with systemctl but starts fine manually

**URL:** <https://discuss.elastic.co/t/es-fails-to-start-on-reboot-with-systemctl-but-starts-fine-manually/205174>\
**Category:** Elasticsearch\
**Created:** [October 25, 2019, 3:39am UTC](https://discuss.elastic.co/t/es-fails-to-start-on-reboot-with-systemctl-but-starts-fine-manually/205174 "2019-10-25T03:39:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Quin\_Tran](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/quin_tran/32/56567_2.png) [@Quin\_Tran](https://discuss.elastic.co/u/Quin_Tran)\
**Post date:** [October 25, 2019, 3:39am UTC](https://discuss.elastic.co/t/es-fails-to-start-on-reboot-with-systemctl-but-starts-fine-manually/205174/1 "2019-10-25T03:39:57Z")

</div>

So I had ES installed in local directory, and I had indices there. I decided to use deb package and installed it system wide (running under elasticsearch user)

Then I went and found the data directory of new instance. I configured new es to run on same port as old and disabled the old one

Then I went and copied the data/nodes directory to new instance's data directory (after removing old directory) so now both old and new ES data directories are identical

I have enabled systemctl

```
systemctl daemon-reload && systemctl enable elasticsearch

```

But when I reboot the system it throws an error

```
[2019-10-25T14:02:17,539][INFO][o.e.n.Node] [myserver.com] stopping ...
[2019-10-25T14:02:17,666][INFO][o.e.x.w.WatcherService] [myserver.com] stopping watch service, reason [shutdown initiated]
[2019-10-25T14:02:17,668][INFO][o.e.x.w.WatcherLifeCycleService] [myserver.com] watcher has stopped and shutdown
[2019-10-25T14:02:17,828][INFO][o.e.x.m.p.l.CppLogMessageHandler] [myserver.com] [controller/5021] [Main.cc@150] Ml controller exiting
[2019-10-25T14:02:17,829][INFO][o.e.x.m.p.NativeController] [myserver.com] Native controller process has stopped - no new native processes can be started
[2019-10-25T14:02:17,848][DEBUG][o.e.a.a.i.s.TransportIndicesStatsAction] [myserver.com] failed to execute [indices:monitor/stats] on node [e1tNwwKsRI2ID8UqgyGszA]
org.elasticsearch.transport.SendRequestTransportException: [myserver.com][127.0.0.1:9300][indices:monitor/stats[n]]
  at org.elasticsearch.transport.TransportService.sendRequestInternal(TransportService.java:704) ~[elasticsearch-7.4.1.jar:7.4.1]
  at org.elasticsearch.xpack.security.transport.SecurityServerTransportInterceptor.sendWithUser(SecurityServerTransportInterceptor.java:162) ~[?:?]
  at org.elasticsearch.xpack.security.transport.SecurityServerTransportInterceptor.access$300(SecurityServerTransportInterceptor.java:53) ~[?:?]
  [... skipped stack trace - i am sure it's not going to add anything to the solution]
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
  at java.lang.Thread.run(Thread.java:830) [?:?]
Caused by: org.elasticsearch.transport.TransportException: TransportService is closed stopped can't send request
  at org.elasticsearch.transport.TransportService.sendRequestInternal(TransportService.java:686) ~[elasticsearch-7.4.1.jar:7.4.1]
  ... 28 more
[2019-10-25T14:02:17,848][DEBUG][o.e.a.a.c.n.s.TransportNodesStatsAction] [myserver.com] failed to execute on node [e1tNwwKsRI2ID8UqgyGszA]
org.elasticsearch.transport.SendRequestTransportException: [myserver.com][127.0.0.1:9300][cluster:monitor/nodes/stats[n]]
  at org.elasticsearch.transport.TransportService.sendRequestInternal(TransportService.java:704) ~[elasticsearch-7.4.1.jar:7.4.1]
  at org.elasticsearch.xpack.security.transport.SecurityServerTransportInterceptor.sendWithUser(SecurityServerTransportInterceptor.java:162) ~[?:?]
  at org.elasticsearch.xpack.security.transport.SecurityServerTransportInterceptor.access$300(SecurityServerTransportInterceptor.java:53) ~[?:?]
  at org.elasticsearch.xpack.security.transport.SecurityServerTransportInterceptor$1.sendRequest(SecurityServerTransportInterceptor.java:129) ~[?:?]
  at org.elasticsearch.transport.TransportService.sendRequest(TransportService.java:602) ~[elasticsearch-7.4.1.jar:7.4.1]
  at org.elasticsearch.transport.TransportService.sendRequest(TransportService.java:590) ~[elasticsearch-7.4.1.jar:7.4.1]
  at org.elasticsearch.action.support.nodes.TransportNodesAction$AsyncAction.start(TransportNodesAction.java:182) ~[elasticsearch-7.4.1.jar:7.4.1]
  [... skipped stack trace - i am sure it's not going to add anything to the solution]
  at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:129) ~[elasticsearch-7.4.1.jar:7.4.1]
  at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:64) ~[elasticsearch-7.4.1.jar:7.4.1]

```

But I can start manually with no problems

```
service elasticsearch start
```

---

<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:** [November 22, 2019, 3:39am UTC](https://discuss.elastic.co/t/es-fails-to-start-on-reboot-with-systemctl-but-starts-fine-manually/205174/2 "2019-11-22T03:39:57Z")

</div>

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