Skip to main content
divya_thaore
Silver ⭐️⭐️⭐️
January 10, 2019
Solved

I am getting 502 Bad Gateway while loading the localhost:8080 ambari UI. Please suggest what could be the issue ?

I am getting a 502 Bad Gateway error when I try to load the Apache Ambari UI at localhost:8080.

Scharan
ScharanAnswer
Gold ⭐️
January 10, 2019

@Divya Thaore 502 Bad Gateway error is usually indicating a networking error, Try restart of the browser or try accessing from Incognito mode

8 replies

divya_thaore
Silver ⭐️⭐️⭐️
January 10, 2019
Scharan
Gold ⭐️
ScharanAnswer
Gold ⭐️
January 10, 2019

@Divya Thaore 502 Bad Gateway error is usually indicating a networking error, Try restart of the browser or try accessing from Incognito mode

Translate
divya_thaore
Silver ⭐️⭐️⭐️
January 11, 2019

@scharan : tried incognito too. not working.. i dont think it's browser issue

Translate
Scharan
Gold ⭐️
Gold ⭐️
January 11, 2019

@Divya Thaore Are you see any errors in Browser Inspect element , Also check ambari-server logs

Translate
Shelton
Gold ⭐️⭐️⭐️
January 14, 2019

@Divya Thaore

You are trying to access the sandbox:8080 from your laptop because localhost:8080 translates to your local windows machine. To be able to access sandbox ambari from your Windows machine, you should have an entry in your hosts file in C:\Windows\System32\drivers\etc with the format IP:FQDN:ALIAS for example


# localhost name resolution is handled within DNS itself.
#127.0.0.1 localhost
#::1 localhost
127.0.0.1 sandbox.hortonworks.com sandbox

With the above entry assuming you sandbox IP is correctly you can access your cluster through

http://sandbox:8080

HTH

Translate
axie
Silver ⭐️⭐️⭐️
September 4, 2019

Hi @Shelton 

 

I followed your suggestion and modified HOSTS file in the C:\Windows\System32\drivers\etc on my Windows 7 machine where the VirtualBox/Sandbox is installed, it still prompts me the 502 error.

 

Here are the hosts file:


127.0.0.1 localhost
::1 localhost
127.0.0.1 sandbox.hortonworks.com sandbox

 

I used the Windows7 built-in Resource Monitor to inspect which application is using 8080, and it shows VirtualBox:

port 8080 used by VirtualBox already

Since VirtualBox is where the sandbox resides, there is no way for me to terminate it. How do I then access Ambari from localhost?

 

Thank you very much if you can kindly help me to sort it out at your earliest convenience.

 

 

Translate
hiveravids2
Silver ⭐️⭐️
September 4, 2019

instead of localhost try using the IP address of the server.  That should help

Translate