# Kibana failing with requestTimeout error

**URL:** <https://discuss.elastic.co/t/kibana-failing-with-requesttimeout-error/189189>\
**Category:** Kibana\
**Created:** [July 6, 2019, 6:19am UTC](https://discuss.elastic.co/t/kibana-failing-with-requesttimeout-error/189189 "2019-07-06T06:19:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shivani\_aggarwal](https://avatars.discourse-cdn.com/v4/letter/s/22d042/32.png) [@shivani\_aggarwal](https://discuss.elastic.co/u/shivani_aggarwal)\
**Post date:** [July 6, 2019, 6:19am UTC](https://discuss.elastic.co/t/kibana-failing-with-requesttimeout-error/189189/1 "2019-07-06T06:19:22Z")

</div>

Hi,

I am using kibana-oss 7.0.1 in kubernetes environment.  
Elasticsearch pods are taking around 2 minutes to come up and form the cluster.

Till then, kibana pod fails with the below error as it is not able to reach Elasticsearch:

> {"type":"log","@timestamp":"2019-07-05T12:05:42Z","tags":["status","plugin:timelion@undefined","info"],"pid":1,"state":"green",message":"Status changed from uninitialized to green - Ready","prevState":"uninitialized","prevMsg":"uninitialized"}  
> {"type":"log","@timestamp":"2019-07-05T12:05:45Z","tags":["status","plugin:elasticsearch@undefined","error"],"pid":1,"state":"rd","message":"Status changed from yellow to red - Request Timeout after 3000ms","prevState":"yellow","prevMsg":"Waiting for Elaticsearch"}  
> {"type":"log","@timestamp":"2019-07-05T12:06:31Z","tags":["status","plugin:elasticsearch@undefined","info"],"pid":1,"state":"gren","message":"Status changed from red to green - Ready","prevState":"red","prevMsg":" **Request Timeout after 3000ms**"}  
> {"type":"log","@timestamp":"2019-07-05T12:07:01Z","tags":["fatal","root"],"pid":1,"message":"{ Error: Request Timeout after 3000ms\n at /usr/share/kibana/node\_modules/elasticsearch/src/lib/transport.js:355:15\n at Timeout. (/usr/share/kiana/node\_modules/elasticsearch/src/lib/transport.js:384:7)\n at ontimeout (timers.js:436:11)\n at tryOnTimeout (timers.js300:5)\n at listOnTimeout (timers.js:263:5)\n at Timer.processTimers (timers.js:223:10)\n status: undefined,\n displayNme: 'RequestTimeout',\n message: 'Request Timeout after 30000ms',\n body: undefined }"}
> 
> FATAL Error: Request Timeout after 30000ms

After the pod restarts once, second time it came up properly as by this time ES is up and is reachable.

I tried increasing the timeout to 3 min using **elasticsearch.requestTimeout: 180000** so that the first time itself, pod doesnt restart due to timeout error.  
With this setting, again kibana failed with a different FATAL error:

> ,"message":"{ [master\_not\_discovered\_exception] null :: {"path":"/.kibana","query":{},"statusCode":503,"response":"{\"error\":{\"root\_cause\":[{\"type\":\"master\_not\_discovered\_exception\",\"reason\":null}],\"type\":\"master\_not\_discovered\_exception\",\"reason\":null},\"status\":503}"}\n at respond (/usr/share/kibana/node\_modules/elasticsearch/src/lib/transport.js:308:15)\n at checkRespForFailure (/usr/share/kibana/node\_modules/elasticsearch/src/lib/transport.js:267:7)\n at HttpConnector. (/usr/share/kibana/node\_modules/elasticsearch/src/lib/connectors/http.js:166:7)\n at IncomingMessage.wrapper (/usr/share/kibana/node\_modules/elasticsearch/node\_modules/lodash/lodash.js:4935:19)\n at IncomingMessage.emit (events.js:194:15)\n at endReadableNT (\_stream\_readable.js:1103:12)\n at process.\_tickCallback (internal/process/next\_tick.js:63:19)\n status: 503,\n displayName: '**ServiceUnavailable',\n message: '[master\_not\_discovered\_exception]** null',\n path: '/.kibana',\n query: {},\n body:\n { error:\n { root\_cause: [Array],\n type: 'master\_not\_discovered\_exception',\n reason: null },\n status: 503 },\n statusCode: 503,\n response:\n '{"error":{"root\_cause":[{"type":"master\_not\_discovered\_exception","reason":null}],"type":"master\_not\_discovered\_exception","reason":null},"status":503}',\n toString: [Function],\n toJSON: [Function] }"}

This happened much before 3 min and by this time, cluster hadn't got formed.

I tried setting **elasticsearch.startupTimeout: 180000** as well. I ended up with the same error. Can you tell me what parameter should be added to delay kibana contacting ES? so that I can avoid this issue?  
Hoping for a quick reply.

---

<div class="post-metadata">

**Author:** ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)\
**Post date:** [July 12, 2019, 7:25pm UTC](https://discuss.elastic.co/t/kibana-failing-with-requesttimeout-error/189189/2 "2019-07-12T19:25:20Z")

</div>

It looks like Elasticsearch is sending the 503 code to Kibana because of its `master_not_discovered_exception`. Kibana should handle this better, but you need to address the Elasticsearch cluster problems.

---

<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:** [August 9, 2019, 7:25pm UTC](https://discuss.elastic.co/t/kibana-failing-with-requesttimeout-error/189189/3 "2019-08-09T19:25:28Z")

</div>

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