# Delay starting Kibana until Elasticsearch fully up

**URL:** <https://discuss.elastic.co/t/delay-starting-kibana-until-elasticsearch-fully-up/42580>\
**Category:** Kibana\
**Created:** [February 24, 2016, 11:32am UTC](https://discuss.elastic.co/t/delay-starting-kibana-until-elasticsearch-fully-up/42580 "2016-02-24T11:32:30Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![hvisage](https://avatars.discourse-cdn.com/v4/letter/h/7ba0ec/32.png) [@hvisage](https://discuss.elastic.co/u/hvisage)\
**Post date:** [February 24, 2016, 11:32am UTC](https://discuss.elastic.co/t/delay-starting-kibana-until-elasticsearch-fully-up/42580/1 "2016-02-24T11:32:30Z")

</div>

Hi there,

It appears that I have a elasticsearch starting too slow for kibana, and tuning variables in config/kibana.yml didn't work. Any help in how to convince Kibana to wait longer for Elasticsearch to startup?

See the /var/log/kibana/kibana/stdout below:

> {"name":"Kibana","hostname":"kibana-elastic-host","pid":336,"level":50,"err":"Request error, retrying -- connect ECONNREFUSED","msg":"","time":"2016-02-24T11:25:57.794Z","v":0}  
> {"name":"Kibana","hostname":"kibana-elastic-host","pid":336,"level":40,"msg":"Unable to revive connection: [http://localhost:9200/","time":"2016-02-24T11:25:57.810Z","v](http://localhost:9200/%22,%22time%22:%222016-02-24T11:25:57.810Z%22,%22v)":0}  
> {"name":"Kibana","hostname":"kibana-elastic-host","pid":336,"level":40,"msg":"No living connections","time":"2016-02-24T11:25:57.810Z","v":0}  
> {"name":"Kibana","hostname":"kibana-elastic-host","pid":336,"level":30,"msg":"Unable to connect to elasticsearch at [http://localhost:9200](http://localhost:9200). Retrying in 2.5 seconds.","time":"2016-02-24T11:25:57.817Z","v":0}  
> {"name":"Kibana","hostname":"kibana-elastic-host","pid":336,"level":40,"msg":"Unable to revive connection: [http://localhost:9200/","time":"2016-02-24T11:26:00.320Z","v](http://localhost:9200/%22,%22time%22:%222016-02-24T11:26:00.320Z%22,%22v)":0}  
> {"name":"Kibana","hostname":"kibana-elastic-host","pid":336,"level":40,"msg":"No living connections","time":"2016-02-24T11:26:00.320Z","v":0}  
> {"name":"Kibana","hostname":"kibana-elastic-host","pid":336,"level":30,"msg":"Unable to connect to elasticsearch at [http://localhost:9200](http://localhost:9200). Retrying in 2.5 seconds.","time":"2016-02-24T11:26:00.320Z","v":0}  
> {"name":"Kibana","hostname":"kibana-elastic-host","pid":336,"level":40,"msg":"Unable to revive connection: [http://localhost:9200/","time":"2016-02-24T11:26:02.821Z","v](http://localhost:9200/%22,%22time%22:%222016-02-24T11:26:02.821Z%22,%22v)":0}  
> {"name":"Kibana","hostname":"kibana-elastic-host","pid":336,"level":40,"msg":"No living connections","time":"2016-02-24T11:26:02.821Z","v":0}  
> {"name":"Kibana","hostname":"kibana-elastic-host","pid":336,"level":30,"msg":"Unable to connect to elasticsearch at [http://localhost:9200](http://localhost:9200). Retrying in 2.5 seconds.","time":"2016-02-24T11:26:02.821Z","v":0}  
> {"name":"Kibana","hostname":"kibana-elastic-host","pid":336,"level":40,"msg":"Unable to revive connection: [http://localhost:9200/","time":"2016-02-24T11:26:05.324Z","v](http://localhost:9200/%22,%22time%22:%222016-02-24T11:26:05.324Z%22,%22v)":0}  
> {"name":"Kibana","hostname":"kibana-elastic-host","pid":336,"level":40,"msg":"No living connections","time":"2016-02-24T11:26:05.325Z","v":0}  
> {"name":"Kibana","hostname":"kibana-elastic-host","pid":336,"level":30,"msg":"Unable to connect to elasticsearch at [http://localhost:9200](http://localhost:9200). Retrying in 2.5 seconds.","time":"2016-02-24T11:26:05.325Z","v":0}  
> {"name":"Kibana","hostname":"kibana-elastic-host","pid":336,"level":40,"msg":"Unable to revive connection: [http://localhost:9200/","time":"2016-02-24T11:26:07.926Z","v](http://localhost:9200/%22,%22time%22:%222016-02-24T11:26:07.926Z%22,%22v)":0}  
> {"name":"Kibana","hostname":"kibana-elastic-host","pid":336,"level":40,"msg":"No living connections","time":"2016-02-24T11:26:07.926Z","v":0}  
> {"name":"Kibana","hostname":"kibana-elastic-host","pid":336,"level":30,"msg":"Unable to connect to elasticsearch at [http://localhost:9200](http://localhost:9200). Retrying in 2.5 seconds.","time":"2016-02-24T11:26:07.926Z","v":0}  
> {"name":"Kibana","hostname":"kibana-elastic-host","pid":336,"level":30,"msg":"Elasticsearch is still initializing the kibana index... Trying again in 2.5 second.","time":"2016-02-24T11:26:10.508Z","v":0}  
> {"name":"Kibana","hostname":"kibana-elastic-host","pid":336,"level":50,"err":{"message":"Request Timeout after 30000ms","name":"Error","stack":"Error: Request Timeout after 30000ms\n at null. (/opt/kibana-4.1.2-linux-x64/src/node\_modules/elasticsearch/src/lib/transport.js:282:15)\n at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)"},"msg":"","time":"2016-02-24T11:26:43.044Z","v":0}  
> {"name":"Kibana","hostname":"kibana-elastic-host","pid":336,"level":60,"err":{"message":"Request Timeout after 30000ms","name":"Error","stack":"Error: Request Timeout after 30000ms\n at null. (/opt/kibana-4.1.2-linux-x64/src/node\_modules/elasticsearch/src/lib/transport.js:282:15)\n at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)"},"msg":"","time":"2016-02-24T11:26:43.044Z","v":0}

---

<div class="post-metadata">

**Author:** ![LeeDr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leedr/32/9289_2.png) [@LeeDr](https://discuss.elastic.co/u/LeeDr)\
**Post date:** [February 25, 2016, 4:22pm UTC](https://discuss.elastic.co/t/delay-starting-kibana-until-elasticsearch-fully-up/42580/2 "2016-02-25T16:22:05Z")

</div>

Hi,

Is Kibana exiting after that error, or is it still trying?

What version of Kibana are you running?

On the latest 4.4.1 release, with Elasticsearch not running, Kibana keeps trying forever. I think older versions did this as well. I'm testing with the default kibana.yml which has all the timeouts commented-out so they're using the default values.

What in your situation is causing both Elasticsearch and Kibana to be started at the same time? Is it when you reboot your system? If so, what OS are you running on?

Regards,  
Lee

---

<div class="post-metadata">

**Author:** ![hvisage](https://avatars.discourse-cdn.com/v4/letter/h/7ba0ec/32.png) [@hvisage](https://discuss.elastic.co/u/hvisage)\
**Post date:** [February 25, 2016, 5:59pm UTC](https://discuss.elastic.co/t/delay-starting-kibana-until-elasticsearch-fully-up/42580/3 "2016-02-25T17:59:48Z")

</div>

-Yes, Kibana totally _EXITS_ after that last line

- F\*^#$%\*(^ systemd starts them (perhaps ES after kibana)

- Debian 8.3

- kibana-4.12-linux-x64 can't go higher 'cause ElasticSearch 1.7.3 'cause  
of Logstash on the remote that we can't upgrade yet ☹

---

<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:** [February 25, 2016, 8:08pm UTC](https://discuss.elastic.co/t/delay-starting-kibana-until-elasticsearch-fully-up/42580/4 "2016-02-25T20:08:54Z")

</div>

You don't need to upgrade Logstash if you are using the HTTP protocol.  
So if you aren't then change and upgrade everything else 😃

---

<div class="post-metadata">

**Author:** ![hvisage](https://avatars.discourse-cdn.com/v4/letter/h/7ba0ec/32.png) [@hvisage](https://discuss.elastic.co/u/hvisage)\
**Post date:** [February 26, 2016, 5:09am UTC](https://discuss.elastic.co/t/delay-starting-kibana-until-elasticsearch-fully-up/42580/5 "2016-02-26T05:09:04Z")

</div>

That is the problem. Logstash is not using http ; (  
Thus, how do I convince Kibana 4.1.2 to WAIT LONGER??

---

<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:** [February 26, 2016, 6:47am UTC](https://discuss.elastic.co/t/delay-starting-kibana-until-elasticsearch-fully-up/42580/6 "2016-02-26T06:47:52Z")

</div>

The change for LS to use HTTP is simple, the change you want for KB is not. Not without an upgrade when it'll just auto-retry.

---

<div class="post-metadata">

**Author:** ![hvisage](https://avatars.discourse-cdn.com/v4/letter/h/7ba0ec/32.png) [@hvisage](https://discuss.elastic.co/u/hvisage)\
**Post date:** [February 27, 2016, 8:21pm UTC](https://discuss.elastic.co/t/delay-starting-kibana-until-elasticsearch-fully-up/42580/7 "2016-02-27T20:21:43Z")

</div>

> warkolm [http://discuss.elastic.co/users/warkolm](http://discuss.elastic.co/users/warkolm) Mark Walkom  
> [http://discuss.elastic.co/users/warkolm](http://discuss.elastic.co/users/warkolm)  
> February 25
> 
> You don't need to upgrade Logstash if you are using the HTTP protocol.  
> So if you aren't then change and upgrade everything else [image: 😃]

Hmmm... is Logstash 1.5.4 able to connect to Elasticsearch (recent that is)  
using HTTP?  
I've just found the reason (bitten by Logstash 2.1 yet again) why I'm not  
on the latest logstash:  
the plugins used are dog slow on 2.1 while they all fly on 1.5.4 (I recall  
tracking it to a jRuby issue)

SO the consensus is there are no way to have kibana wait a tad _longer_ for  
Elasticsearch when they are started together at boot?

> ## Visit Topic [http://discuss.elastic.co/t/delay-starting-kibana-until-elasticsearch-fully-up/42580/4](http://discuss.elastic.co/t/delay-starting-kibana-until-elasticsearch-fully-up/42580/4) or reply to this email to respond
> 
> Previous Replies  
> hvisage [http://discuss.elastic.co/users/hvisage](http://discuss.elastic.co/users/hvisage)  
> February 25
> 
> -Yes, Kibana totally _EXITS_ after that last line
> 
> - 
> 
> ## F\*^#$%\*(^ systemd starts them (perhaps ES after kibana)
> 
> ## Debian 8.3
> 
> kibana-4.12-linux-x64 can't go higher 'cause Elasticsearch 1.7.3  
> 'cause of Logstash on the remote that we can't upgrade yet [image:  
> ☹]
> 
> * * *
> 
> Visit Topic  
> [http://discuss.elastic.co/t/delay-starting-kibana-until-elasticsearch-fully-up/42580/4](http://discuss.elastic.co/t/delay-starting-kibana-until-elasticsearch-fully-up/42580/4)  
> or reply to this email to respond
> 
> To stop receiving notifications for this particular topic, click here  
> [http://discuss.elastic.co/t/delay-starting-kibana-until-elasticsearch-fully-up/42580/unsubscribe](http://discuss.elastic.co/t/delay-starting-kibana-until-elasticsearch-fully-up/42580/unsubscribe).  
> To unsubscribe from these emails, change your user preferences  
> [http://discuss.elastic.co/my/preferences](http://discuss.elastic.co/my/preferences)

Hendrik Visage  
Envisage Systems / Envisage Cloud Solutions  
084-612-5345 or 083-675-5506  
hvisage@envisage.co.za

---

<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:** [February 28, 2016, 12:35am UTC](https://discuss.elastic.co/t/delay-starting-kibana-until-elasticsearch-fully-up/42580/8 "2016-02-28T00:35:17Z")

</div>

Not unless you hack it.

---

<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:** [July 6, 2017, 2:00pm UTC](https://discuss.elastic.co/t/delay-starting-kibana-until-elasticsearch-fully-up/42580/9 "2017-07-06T14:00:52Z")

</div>


