# 502 Bad Gateway nginx/1.10.2 Dashboard Error

**URL:** <https://discuss.elastic.co/t/502-bad-gateway-nginx-1-10-2-dashboard-error/74911>\
**Category:** Kibana\
**Created:** [February 13, 2017, 5:31pm UTC](https://discuss.elastic.co/t/502-bad-gateway-nginx-1-10-2-dashboard-error/74911 "2017-02-13T17:31:16Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![ViJaY\_S](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vijay_s/32/42280_2.png) [@ViJaY\_S](https://discuss.elastic.co/u/ViJaY_S)\
**Post date:** [February 13, 2017, 5:31pm UTC](https://discuss.elastic.co/t/502-bad-gateway-nginx-1-10-2-dashboard-error/74911/1 "2017-02-13T17:31:16Z")

</div>

Hello,

Could you please help to fix 502 Bad Gateway nginx/1.10.2 Dashboard Error.

I can able to login with credentials in kibana once login the page displayed like **502 Bad Gateway nginx/1.10.2** Dashboard Error.

Thanks,

Vijay S

---

<div class="post-metadata">

**Author:** ![ViJaY\_S](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vijay_s/32/42280_2.png) [@ViJaY\_S](https://discuss.elastic.co/u/ViJaY_S)\
**Post date:** [February 13, 2017, 5:48pm UTC](https://discuss.elastic.co/t/502-bad-gateway-nginx-1-10-2-dashboard-error/74911/2 "2017-02-13T17:48:14Z")

</div>

additional information,

There is no Cluster its standalone ELK server with enough disk space.

Attached Screen shot of Nginx Error logs,

 ![](https://us1.discourse-cdn.com/elastic/original/2X/e/ef190cc5f3009556488663866e9087c4eb698c24.JPG)

---

<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:** [February 13, 2017, 10:41pm UTC](https://discuss.elastic.co/t/502-bad-gateway-nginx-1-10-2-dashboard-error/74911/3 "2017-02-13T22:41:11Z")

</div>

There could be a lot of reasons for this.

1. Start by checking the Kibana logs to make sure startup was successful. If you've recently installed a plugin in Kibana or changed any settings that control whether a plugin or feature is enabled, startup will take an extra amount of time for the browser resources to be re-bundled (this is called re-optimization)

2. Make sure Kibana is actually up and running by trying to connect to it without going through the proxy. A simple curl command to `localhost` run from the Kibana host might be the easiest way to verify:

```auto
$ curl -i http://localhost:5601
HTTP/1.1 200 OK
kbn-name: kibana
kbn-version: 5.2.0
cache-control: no-cache
content-type: text/html; charset=utf-8
content-length: 217
accept-ranges: bytes
Date: Mon, 13 Feb 2017 22:37:40 GMT
Connection: keep-alive
...

```

1. Make sure the host name for Kibana is configured correctly in the nginx proxy section.

2. Make sure the proxy host is actually able to see Kibana on the network.

If you've verified step 1 and 2, the problem really comes down to an issue with the proxy configuration.

---

<div class="post-metadata">

**Author:** ![ViJaY\_S](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vijay_s/32/42280_2.png) [@ViJaY\_S](https://discuss.elastic.co/u/ViJaY_S)\
**Post date:** [February 13, 2017, 10:45pm UTC](https://discuss.elastic.co/t/502-bad-gateway-nginx-1-10-2-dashboard-error/74911/4 "2017-02-13T22:45:51Z")

</div>

Thanks Tim,

Step 2:  
I executed command the below output

curl -i [http://localhost:5601](http://localhost:5601)  
curl: (7) Failed connect to localhost:5601; Connection refused

---

<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:** [February 13, 2017, 10:51pm UTC](https://discuss.elastic.co/t/502-bad-gateway-nginx-1-10-2-dashboard-error/74911/5 "2017-02-13T22:51:40Z")

</div>

Check the logs to see if there is an error revealing why Kibana couldn't start up. This is your best bet. It could be due to an incorrect config setting, and the log file will tell you.

If the log file doesn't show anything wrong, check the kibana.yml and see if there are `server.host`, `server.port`, or `server.ssl` settings which would mean that you need to use a different hostname other than localhost, a different port, or the HTTPS protocol to connect. You can also try `netstat -l` to figure out if there is an open TCP connection created by Kibana.

---

<div class="post-metadata">

**Author:** ![ViJaY\_S](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vijay_s/32/42280_2.png) [@ViJaY\_S](https://discuss.elastic.co/u/ViJaY_S)\
**Post date:** [February 14, 2017, 11:30pm UTC](https://discuss.elastic.co/t/502-bad-gateway-nginx-1-10-2-dashboard-error/74911/6 "2017-02-14T23:30:13Z")

</div>

Kibana configuration looks good **kibana.yml**.

Iam unable to see those logs in kibana logs path but its configured in the path **/var/log/kibana**

seems to be logs are not generating in the above said path.

I tried **netstat -l** to see any open connection created by kibana on its own but its not.

Iam really struck here can you please guide me to proceed further on troubleshooting towards the fix.

~VJ

---

<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:** [February 15, 2017, 8:09pm UTC](https://discuss.elastic.co/t/502-bad-gateway-nginx-1-10-2-dashboard-error/74911/7 "2017-02-15T20:09:19Z")

</div>

It sounds like Kibana was just never started.

What method are you using to start it? See [https://www.elastic.co/guide/en/kibana/current/rpm.html](https://www.elastic.co/guide/en/kibana/current/rpm.html)

---

<div class="post-metadata">

**Author:** ![ViJaY\_S](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vijay_s/32/42280_2.png) [@ViJaY\_S](https://discuss.elastic.co/u/ViJaY_S)\
**Post date:** [February 15, 2017, 8:21pm UTC](https://discuss.elastic.co/t/502-bad-gateway-nginx-1-10-2-dashboard-error/74911/8 "2017-02-15T20:21:00Z")

</div>

No kibana was running without any issues.

[root@elk-500g-ssd conf.d]# service kibana4 status  
Redirecting to /bin/systemctl status kibana4.service  
● kibana4.service  
Loaded: loaded (/etc/systemd/system/kibana4.service; enabled; vendor preset: disabled)  
Active: active (running) since Tue 2017-02-14 18:35:03 CST; 19h ago  
Main PID: 17042 (node)  
CGroup: /system.slice/kibana4.service  
└─17042 /opt/kibana/bin/../node/bin/node /opt/kibana/bin/../src/bin/kibana.js

Feb 15 14:21:58 elk-500g-ssd kibana4[17042]: {"@timestamp":"2017-02-15T20:21:58.493Z","level":"info","message":"Elasticsearch is still initializing the kib...oduction"}  
Feb 15 14:22:01 elk-500g-ssd kibana4[17042]: {"@timestamp":"2017-02-15T20:22:01.007Z","level":"info","message":"Elasticsearch is still initializing the kib...oduction"}  
Feb 15 14:22:03 elk-500g-ssd kibana4[17042]: {"@timestamp":"2017-02-15T20:22:03.511Z","level":"info","message":"Elasticsearch is still initializing the kib...oduction"}  
Feb 15 14:22:06 elk-500g-ssd kibana4[17042]: {"@timestamp":"2017-02-15T20:22:06.016Z","level":"info","message":"Elasticsearch is still initializing the kib...oduction"}  
Feb 15 14:22:08 elk-500g-ssd kibana4[17042]: {"@timestamp":"2017-02-15T20:22:08.521Z","level":"info","message":"Elasticsearch is still initializing the kib...oduction"}  
Feb 15 14:22:11 elk-500g-ssd kibana4[17042]: {"@timestamp":"2017-02-15T20:22:11.026Z","level":"info","message":"Elasticsearch is still initializing the kib...oduction"}  
Feb 15 14:22:13 elk-500g-ssd kibana4[17042]: {"@timestamp":"2017-02-15T20:22:13.530Z","level":"info","message":"Elasticsearch is still initializing the kib...oduction"}  
Feb 15 14:22:16 elk-500g-ssd kibana4[17042]: {"@timestamp":"2017-02-15T20:22:16.035Z","level":"info","message":"Elasticsearch is still initializing the kib...oduction"}  
Feb 15 14:22:18 elk-500g-ssd kibana4[17042]: {"@timestamp":"2017-02-15T20:22:18.539Z","level":"info","message":"Elasticsearch is still initializing the kib...oduction"}  
Feb 15 14:22:21 elk-500g-ssd kibana4[17042]: {"@timestamp":"2017-02-15T20:22:21.044Z","level":"info","message":"Elasticsearch is still initializing the kib...oduction"}  
Hint: Some lines were ellipsized, use -l to show in full.

---

<div class="post-metadata">

**Author:** ![ViJaY\_S](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vijay_s/32/42280_2.png) [@ViJaY\_S](https://discuss.elastic.co/u/ViJaY_S)\
**Post date:** [February 28, 2017, 5:12pm UTC](https://discuss.elastic.co/t/502-bad-gateway-nginx-1-10-2-dashboard-error/74911/9 "2017-02-28T17:12:47Z")

</div>

Is there any update still we have same issue.

please help!

---

<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:** [February 28, 2017, 5:32pm UTC](https://discuss.elastic.co/t/502-bad-gateway-nginx-1-10-2-dashboard-error/74911/10 "2017-02-28T17:32:16Z")

</div>

Can you provide your `kibana.yml` and nginx config?

---

<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:** [February 28, 2017, 5:37pm UTC](https://discuss.elastic.co/t/502-bad-gateway-nginx-1-10-2-dashboard-error/74911/11 "2017-02-28T17:37:13Z")

</div>

Another thing, try to set up the system without the proxy in place first, to eliminate that complexity. Once Kibana can be confirmed working without the proxy, then add the proxy to the system.

---

<div class="post-metadata">

**Author:** ![ViJaY\_S](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vijay_s/32/42280_2.png) [@ViJaY\_S](https://discuss.elastic.co/u/ViJaY_S)\
**Post date:** [February 28, 2017, 11:51pm UTC](https://discuss.elastic.co/t/502-bad-gateway-nginx-1-10-2-dashboard-error/74911/12 "2017-02-28T23:51:16Z")

</div>

Thanks. I will try kibana with out proxy and update you.

---

<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 28, 2017, 11:51pm UTC](https://discuss.elastic.co/t/502-bad-gateway-nginx-1-10-2-dashboard-error/74911/13 "2017-03-28T23:51:30Z")

</div>

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