Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

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

Solved Go to solution

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

New Contributor
 
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

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

Expert Contributor

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

7 REPLIES 7

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

New Contributor
Highlighted

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

Expert Contributor

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

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

New Contributor

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

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

Expert Contributor

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

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

Mentor

@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

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

Explorer

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.

 

 

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

New Contributor

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

Don't have an account?
Coming from Hortonworks? Activate your account here