# Kibana 502 Bad gateway error

**URL:** <https://discuss.elastic.co/t/kibana-502-bad-gateway-error/250192>\
**Category:** Elastic Training\
**Created:** [September 28, 2020, 1:23pm UTC](https://discuss.elastic.co/t/kibana-502-bad-gateway-error/250192 "2020-09-28T13:23:56Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Krunal\_Patel1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krunal_patel1/32/49908_2.png) [@Krunal\_Patel1](https://discuss.elastic.co/u/Krunal_Patel1)\
**Post date:** [September 28, 2020, 1:23pm UTC](https://discuss.elastic.co/t/kibana-502-bad-gateway-error/250192/1 "2020-09-28T13:23:57Z")

</div>

Hi, I'm taking the "Data Analysis with Kibana (On-Demand)", and I cannot access kibana. When I click the kibana link shown on the page "[http://ec2-X-XXX-XXX-XX.eu-central-1.compute.amazonaws.com/](http://ec2-X-XXX-XXX-XX.eu-central-1.compute.amazonaws.com/)", I get a 502 bad gateway. Can someone please help me?

---

<div class="post-metadata">

**Author:** ![abdon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abdon/32/9195_2.png) [@abdon](https://discuss.elastic.co/u/abdon)\
**Post date:** [September 28, 2020, 1:28pm UTC](https://discuss.elastic.co/t/kibana-502-bad-gateway-error/250192/2 "2020-09-28T13:28:08Z")

</div>

It may take up to 20 minutes for Kibana to start, after you accessed your lab environment. If you see the 502 error, then that means that Kibana has not started yet.

If the problem persists after waiting for 20 minutes, please let us know here, and we can help you troubleshoot.

---

<div class="post-metadata">

**Author:** ![Krunal\_Patel1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krunal_patel1/32/49908_2.png) [@Krunal\_Patel1](https://discuss.elastic.co/u/Krunal_Patel1)\
**Post date:** [September 28, 2020, 2:20pm UTC](https://discuss.elastic.co/t/kibana-502-bad-gateway-error/250192/3 "2020-09-28T14:20:06Z")

</div>

Hi Abdon,

thanks for replying.  
I am still getting same error.

---

<div class="post-metadata">

**Author:** ![abdon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abdon/32/9195_2.png) [@abdon](https://discuss.elastic.co/u/abdon)\
**Post date:** [September 28, 2020, 2:29pm UTC](https://discuss.elastic.co/t/kibana-502-bad-gateway-error/250192/4 "2020-09-28T14:29:45Z")

</div>

Alright. You will have to start Kibana manually then.

1. When you log into your lab environment, you see a Linux terminal. Type the following command and hit enter:

```auto
ssh server1

```

1. When prompted "Are you sure you want to continue connecting", type `yes`
2. Next, stop any running Kibana process by typing the following:

```auto
killall node

```

1. Now, start Kibana by typing the following:

```auto
kibana/bin/kibana

```

You should now see some log messages in your terminal as Kibana starts up. After a while, you should see the following message:

```auto
Server running at http://server1:5601

```

That means Kibana should then be accessible.

---

<div class="post-metadata">

**Author:** ![Krunal\_Patel1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krunal_patel1/32/49908_2.png) [@Krunal\_Patel1](https://discuss.elastic.co/u/Krunal_Patel1)\
**Post date:** [September 28, 2020, 2:41pm UTC](https://discuss.elastic.co/t/kibana-502-bad-gateway-error/250192/5 "2020-09-28T14:41:38Z")

</div>

elastic@ip-xxx-xx-x-xx:~ ssh server1 ssh: connect to host server1 port 22: Connection timed out elastic@ip-xxx-xx-x-xx:~

---

<div class="post-metadata">

**Author:** ![abdon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abdon/32/9195_2.png) [@abdon](https://discuss.elastic.co/u/abdon)\
**Post date:** [September 28, 2020, 2:56pm UTC](https://discuss.elastic.co/t/kibana-502-bad-gateway-error/250192/6 "2020-09-28T14:56:54Z")

</div>

Alright, that explains the issue. There seems to be a problem with your VM.

I have just replaced your VM with a new one. If you log in to the lab environment again, and wait 20 minutes, Kibana should come up.

Unfortunately, replacing the VM means that any work you had done (visualizations that you had saved, etc.) is lost. My apologies for this inconvenience.

---

<div class="post-metadata">

**Author:** ![Krunal\_Patel1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krunal_patel1/32/49908_2.png) [@Krunal\_Patel1](https://discuss.elastic.co/u/Krunal_Patel1)\
**Post date:** [September 28, 2020, 4:01pm UTC](https://discuss.elastic.co/t/kibana-502-bad-gateway-error/250192/7 "2020-09-28T16:01:14Z")

</div>

Thanks Abdon.

It is working now.

---

<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:** [October 28, 2020, 4:01pm UTC](https://discuss.elastic.co/t/kibana-502-bad-gateway-error/250192/8 "2020-10-28T16:01:27Z")

</div>

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