# Elasticsearch service times out, although cluster appears to be working properly

**URL:** <https://discuss.elastic.co/t/elasticsearch-service-times-out-although-cluster-appears-to-be-working-properly/256391>\
**Category:** Elasticsearch\
**Created:** [November 23, 2020, 6:46pm UTC](https://discuss.elastic.co/t/elasticsearch-service-times-out-although-cluster-appears-to-be-working-properly/256391 "2020-11-23T18:46:43Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jtbis](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@jtbis](https://discuss.elastic.co/u/jtbis)\
**Post date:** [November 23, 2020, 6:46pm UTC](https://discuss.elastic.co/t/elasticsearch-service-times-out-although-cluster-appears-to-be-working-properly/256391/1 "2020-11-23T18:46:43Z")

</div>

I am facing an issue where systemd doesn't appear to realize that Elasticsearch has started successfully after updating to 6.8.0. The cluster shows green, the application can write to it and there are no errors in the logfile, but systemd kills it after `TimeoutStartSec` is exceeded. I've tried increading `TimeoutStartSec`, without success.

---

<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:** [November 23, 2020, 11:12pm UTC](https://discuss.elastic.co/t/elasticsearch-service-times-out-although-cluster-appears-to-be-working-properly/256391/2 "2020-11-23T23:12:00Z")

</div>

Welcome to our community! 😃

Can you post the systemd output and the Elasticsearch log from startup?

---

<div class="post-metadata">

**Author:** ![jtbis](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@jtbis](https://discuss.elastic.co/u/jtbis)\
**Post date:** [November 23, 2020, 11:47pm UTC](https://discuss.elastic.co/t/elasticsearch-service-times-out-although-cluster-appears-to-be-working-properly/256391/3 "2020-11-23T23:47:17Z")

</div>

Systemd output:

```
● elasticsearch.service - Elasticsearch
   Loaded: loaded (/etc/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
   Active: failed (Result: timeout) since Mon 2020-11-23 18:36:30 EST; 18s ago
     Docs: https://www.elastic.co
  Process: 11871 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=143)
 Main PID: 11871 (code=exited, status=143)

Nov 23 18:34:58 damnation systemd[1]: Starting Elasticsearch...
Nov 23 18:34:58 damnation elasticsearch[11871]: warning: Falling back to java on path. This behavior is deprecated. Specify JAVA_HOME
Nov 23 18:36:28 damnation systemd[1]: elasticsearch.service: Start operation timed out. Terminating.
Nov 23 18:36:30 damnation systemd[1]: Failed to start Elasticsearch.
Nov 23 18:36:30 damnation systemd[1]: elasticsearch.service: Unit entered failed state.
Nov 23 18:36:30 damnation systemd[1]: elasticsearch.service: Failed with result 'timeout'.

```

Elasticsearch log doesn't fit so its [here](https://pastebin.com/w8WhGKP0).

I set `TimeoutStartSec=infinity` and its currently running fine, other than systemd not realizing it.

---

<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:** [November 23, 2020, 11:59pm UTC](https://discuss.elastic.co/t/elasticsearch-service-times-out-although-cluster-appears-to-be-working-properly/256391/4 "2020-11-23T23:59:03Z")

</div>

You can see from the Elasticsearch log that it doesn't become available till `18:35:53`, when things turn green.

Have you tried restarting it again to see if it times out, or does it do it _every_ time?

---

<div class="post-metadata">

**Author:** ![jtbis](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@jtbis](https://discuss.elastic.co/u/jtbis)\
**Post date:** [November 24, 2020, 1:00am UTC](https://discuss.elastic.co/t/elasticsearch-service-times-out-although-cluster-appears-to-be-working-properly/256391/5 "2020-11-24T01:00:42Z")

</div>

It times out every time. I’ve tried setting TimeoutStartSec as high as 1000. ES starts up long before systemd times out, but it always ends up timing out.

---

<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:** [November 24, 2020, 1:01am UTC](https://discuss.elastic.co/t/elasticsearch-service-times-out-although-cluster-appears-to-be-working-properly/256391/6 "2020-11-24T01:01:19Z")

</div>

What OS and what version?

---

<div class="post-metadata">

**Author:** ![jtbis](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@jtbis](https://discuss.elastic.co/u/jtbis)\
**Post date:** [November 24, 2020, 12:28pm UTC](https://discuss.elastic.co/t/elasticsearch-service-times-out-although-cluster-appears-to-be-working-properly/256391/7 "2020-11-24T12:28:04Z")

</div>

Ubuntu 16.04 and ES 6.8.0.

---

<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:** [December 22, 2020, 12:28pm UTC](https://discuss.elastic.co/t/elasticsearch-service-times-out-although-cluster-appears-to-be-working-properly/256391/8 "2020-12-22T12:28:06Z")

</div>

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