# Kibana 4 start up is failing with error "Service Unavailable"

**URL:** https://discuss.elastic.co/t/kibana-4-start-up-is-failing-with-error-service-unavailable/26809
**Category:** Kibana
**Created:** [August 4, 2015, 2:57pm UTC](https://discuss.elastic.co/t/kibana-4-start-up-is-failing-with-error-service-unavailable/26809 "2015-08-04T14:57:58Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Kuldip\_Madnani](https://avatars.discourse-cdn.com/v4/letter/k/e9bcb4/32.png) [@Kuldip\_Madnani](https://discuss.elastic.co/u/Kuldip_Madnani)
#### Post date: [August 4, 2015, 2:57pm UTC](https://discuss.elastic.co/t/kibana-4-start-up-is-failing-with-error-service-unavailable/26809/1 "2015-08-04T14:57:59Z")

</div>

I am trying to start Kibana as a service on RHEL 6 but am facing with these error in logs:  
{"name":"Kibana","hostname":"zllt3949","pid":119501,"level":50,"err":{"message":"Service Unavailable","name":"Error","stack":"Error: Service Unavailable\n at respond (/opt/app/kibana/web/src/node\_modules/elasticsearch/src/lib/transport.js:235:15)\n at checkRespForFailure (/opt/app/kibana/web/src/node\_modules/elasticsearch/src/lib/transport.js:203:7)\n at HttpConnector. (/opt/app/kibana/web/src/node\_modules/elasticsearch/src/lib/connectors/http.js:156:7)\n at IncomingMessage.bound (/opt/app/kibana/web/src/node\_modules/elasticsearch/node\_modules/lodash-node/modern/internals/baseBind.js:56:17)\n at IncomingMessage.emit (events.js:117:20)\n at \_stream\_readable.js:944:16\n at process.\_tickCallback (node.js:442:13)"},"msg":"","time":"2015-08-04T14:29:46.126Z","v":0}

But when i query elastic search for cluster status it shows me yellow status.

I tried changing elasticsearch\_preserve\_host to false and increasing my request\_timeout to 10000 as i read in some forums but no impact.

Attaching my configuration file.

 ![](https://us1.discourse-cdn.com/elastic/original/2X/3/327ebffe4bc674ff01ac39209c5c27150e40d04b.jpg)

Anyone can suggest whats the problem

---

<div class="post-metadata">

### Author: ![tbragin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tbragin/32/45166_2.png) [@tbragin](https://discuss.elastic.co/u/tbragin)
#### Post date: [August 5, 2015, 6:39am UTC](https://discuss.elastic.co/t/kibana-4-start-up-is-failing-with-error-service-unavailable/26809/2 "2015-08-05T06:39:41Z")

</div>

This error message means Kibana can't connect to your ES server for some reason. Are the hostname and port settings correct? Looks like right now it points to "localhost" port 9200.

---

<div class="post-metadata">

### Author: ![Kuldip\_Madnani](https://avatars.discourse-cdn.com/v4/letter/k/e9bcb4/32.png) [@Kuldip\_Madnani](https://discuss.elastic.co/u/Kuldip_Madnani)
#### Post date: [August 5, 2015, 3:43pm UTC](https://discuss.elastic.co/t/kibana-4-start-up-is-failing-with-error-service-unavailable/26809/3 "2015-08-05T15:43:36Z")

</div>

The elasticsearch is up and running on the same server with port 9200.The issue happens intermittently.Sometimes it starts perfectly and sometimes it doesnt.Any reason which you can suggest?

---

<div class="post-metadata">

### Author: ![MichaelScofield](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michaelscofield/32/4118_2.png) [@MichaelScofield](https://discuss.elastic.co/u/MichaelScofield)
#### Post date: [August 27, 2015, 8:12am UTC](https://discuss.elastic.co/t/kibana-4-start-up-is-failing-with-error-service-unavailable/26809/4 "2015-08-27T08:12:59Z")

</div>

Did you set

```
gateway.expected_nodes = N

```

however you had just M (\< N) es nodes running?

---

<div class="post-metadata">

### Author: ![kzadora](https://avatars.discourse-cdn.com/v4/letter/k/ec9cab/32.png) [@kzadora](https://discuss.elastic.co/u/kzadora)
#### Post date: [September 10, 2015, 7:39pm UTC](https://discuss.elastic.co/t/kibana-4-start-up-is-failing-with-error-service-unavailable/26809/5 "2015-09-10T19:39:40Z")

</div>

I am observing the same issue as Kuldip and I do not think this has anything to do with ES not starting up properly. The issue is, if Kibana 4 is started immediately after ElasticSearch service is started, Kibana sometimes fails to try "hard enough" to connect to ES.

As far as I understand the documentation this _should_ be solvable by request\_timeout setting (I set it to 120000, or two minutes), but it is not.

The call stack that Kuldip gave you is spot-on. Exception thrown there should be handled if it happens within the request\_timeout period.

What is the proper way to have an engineer take a peek? Should I open an issue about this? (sorry, KIbana/ES newbie)

---

<div class="post-metadata">

### Author: ![sdsunjay](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sdsunjay/32/6469_2.png) [@sdsunjay](https://discuss.elastic.co/u/sdsunjay)
#### Post date: [December 7, 2015, 11:47pm UTC](https://discuss.elastic.co/t/kibana-4-start-up-is-failing-with-error-service-unavailable/26809/6 "2015-12-07T23:47:18Z")

</div>

Was a solution to this problem ever found? I am also facing the same issue. I have 3 instances ("172.31.56.19", "172.31.56.20", "172.31.56.21")of Elasticsearch (not including the one running on the same instance as Kibana). I have Kibana 4.3 running on the same instance as Elasticsearch 2.1.0 (node.master and node.data are set to false).

discovery.zen.ping.multicast.enabled: false discovery.zen.ping.unicast.hosts: ["172.31.5.65", "172.31.56.19", "172.31.56.20", "172.31.56.21"]

This is what I'm seeing in the Elasticsearch log on the Kibana instance:  
`[2015-12-07 23:41:38,103][INFO][cluster.service] [superman_172_31_5_65] detected_master {hulk_172_31_56_20}{RFx_uPKnTRqMPTdVyIJyPw}{172.31.56.20}{172.31.56.20:9300}{max_local_storage_nodes=1}, added {{hulk_172_31_56_20}{RFx_uPKnTRqMPTdVyIJyPw}{172.31.56.20}{172.31.56.20:9300}{max_local_storage_nodes=1},}, reason: zen-disco-receive(from master [{hulk_172_31_56_20}{RFx_uPKnTRqMPTdVyIJyPw}{172.31.56.20}{172.31.56.20:9300}{max_local_storage_nodes=1}])`  
`[2015-12-07 23:41:38,105][INFO][discovery.zen] [superman_172_31_5_65] master_left [{hulk_172_31_56_20}{RFx_uPKnTRqMPTdVyIJyPw}{172.31.56.20}{172.31.56.20:9300}{max_local_storage_nodes=1}], reason [transport disconnected]`  
`[2015-12-07 23:41:38,105][INFO][discovery.zen] [superman_172_31_5_65] failed to send join request to master [{hulk_172_31_56_20}{RFx_uPKnTRqMPTdVyIJyPw}{172.31.56.20}{172.31.56.20:9300}{max_local_storage_nodes=1}], reason [NodeDisconnectedException[[hulk_172_31_56_20][172.31.56.20:9300][internal:discovery/zen/join] disconnected]]`  
`[2015-12-07 23:41:38,105][WARN][discovery.zen] [superman_172_31_5_65] master left (reason = transport disconnected), current nodes: {{spiderman_172_31_56_21}{BqRWYbXgSb6PdRLMNarBvg}{172.31.56.21}{172.31.56.21:9300}{max_local_storage_nodes=1},{ironman_172_31_56_19}{0L4C-MRyQ_iYIZ1ooKYlBg}{172.31.56.19}{172.31.56.19:9300}{max_local_storage_nodes=1},{superman_172_31_5_65}{L7UHgwrwSGiqxkBr_8tbzg}{172.31.5.65}{172.31.5.65:9300}{max_local_storage_nodes=1, data=false, master=false},}`

````auto
[2015-12-07 23:41:38,106][WARN][cluster.service] [superman_172_31_5_65] failed to notify ClusterStateListener```
```java.lang.IllegalStateException: master not available when registering auto-generated license
        at org.elasticsearch.license.plugin.core.LicensesService.requestTrialLicense(LicensesService.java:750)
        at org.elasticsearch.license.plugin.core.LicensesService.clusterChanged(LicensesService.java:484)
        at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:494)
        at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:231)
        at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:194)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)```

Any suggestions?
````

---

<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:07pm UTC](https://discuss.elastic.co/t/kibana-4-start-up-is-failing-with-error-service-unavailable/26809/7 "2017-07-06T14:07:22Z")

</div>


