# Kibana 502 Bad gateway in logs

**URL:** <https://discuss.elastic.co/t/kibana-502-bad-gateway-in-logs/75625>\
**Category:** Kibana\
**Created:** [February 19, 2017, 4:19am UTC](https://discuss.elastic.co/t/kibana-502-bad-gateway-in-logs/75625 "2017-02-19T04:19:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![niraj\_kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/niraj_kumar/32/4130_2.png) [@niraj\_kumar](https://discuss.elastic.co/u/niraj_kumar)\
**Post date:** [February 19, 2017, 4:19am UTC](https://discuss.elastic.co/t/kibana-502-bad-gateway-in-logs/75625/1 "2017-02-19T04:19:39Z")

</div>

Hi,

I have successfully installed kibana 5.2 with ES 5.2. I am able to open the UI page but nothing seems to be visible. Just an empty page. Looking at the kibana logs i see the following error. I have no idea what does it mean and why is it feeling. But can tell that it is failing with a 502 bad gateway error. Can anyone point me to the solution.

Post Referred for ES installation:- [ES Installation](https://discuss.elastic.co/t/setting-up-elasticsearch-in-production/75417)

`{"type":"response","@timestamp":"2017-02-19T03:56:51Z","tags":[],"pid":13337,"method":"post","statusCode":502,"req":{"url":"/es_admin/.kibana/index-pattern/_search?stored_fields=","method":"post","headers":{"host":"example.com:5601","content-length":"39","accept":"application/json, text/plain, */*","origin":"http://example.com:5601","kbn-version":"5.2.1","user-agent":"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36","content-type":"application/json","referer":"http://example.com:5601/app/kibana","accept-encoding":"gzip, deflate","accept-language":"en-US,en;q=0.8,hi;q=0.6","connection":"Keep-Alive","x-bluecoat-via":"2a84e0f32f31b460"},"remoteAddress":"xx.xx.xx.xx","userAgent":"xx.xx.xx.xx","referer":"http://example.com:5601/app/kibana"},"res":{" **statusCode":502** ,"responseTime":95,"contentLength":9},"message":"POST /es_admin/.kibana/index-pattern/_search?stored_fields= 502 95ms - 9.0B"}`

--  
Niraj

---

<div class="post-metadata">

**Author:** ![niraj\_kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/niraj_kumar/32/4130_2.png) [@niraj\_kumar](https://discuss.elastic.co/u/niraj_kumar)\
**Post date:** [February 19, 2017, 7:19am UTC](https://discuss.elastic.co/t/kibana-502-bad-gateway-in-logs/75625/2 "2017-02-19T07:19:28Z")

</div>

I finally was able to fix my problem.

---

<div class="post-metadata">

**Author:** ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)\
**Post date:** [February 20, 2017, 10:55am UTC](https://discuss.elastic.co/t/kibana-502-bad-gateway-in-logs/75625/3 "2017-02-20T10:55:55Z")

</div>

Hi @niraj_kumar,

glad to hear it. If you feel like it, please let us know how you solved your problem. Other users encountering the same problem might benefit from reading your solution.

---

<div class="post-metadata">

**Author:** ![niraj\_kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/niraj_kumar/32/4130_2.png) [@niraj\_kumar](https://discuss.elastic.co/u/niraj_kumar)\
**Post date:** [February 21, 2017, 2:21am UTC](https://discuss.elastic.co/t/kibana-502-bad-gateway-in-logs/75625/4 "2017-02-21T02:21:59Z")

</div>

Thanks @weltenwort for replying back.

It was a missing port number in kibana.yml file pointing to ES URL. In my case i just mentioned it as

**elasticsearch.url: "[http://example.com](http://example.com)**"

where as it should be

**elasticsearch.url: "[http://example.com:9200](http://example.com:9200)"**

---

<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:** [March 21, 2017, 2:22am UTC](https://discuss.elastic.co/t/kibana-502-bad-gateway-in-logs/75625/5 "2017-03-21T02:22:38Z")

</div>

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