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.

Geting 502 Bad Gateway error when trying to open Ambari

Geting 502 Bad Gateway error when trying to open Ambari

New Contributor

Hi, I kept getting 502 Bad Gateway nginx/1.15.7 error when I tried to open Ambari with myIP:8080. I'm using a Mac OS system. Is there any way i can fix it? 

Thanks!

5 REPLIES 5

Re: Geting 502 Bad Gateway error when trying to open Ambari

Super Mentor

@yvettew 

Can you please share the output of the following curl command from the host where you are running the browser?  Just want to see if there are any Network proxy added in front of Ambari which is causing the 502 error?

 

# curl -iLv -u "admin:admin" -H "X-Requested-By: ambari" -X GET http://$AMBARI_HOSTNAME:8080/api/v1/check

 

Please replace the admin:admin with your ambari admin username and password and also the $AMBARI_HOSTNAME with the actual FQDN of ambari server.  Please share the output of the above curl command . 

 

Also please check your browser setting if it has any Network proxy setting added to it?

Re: Geting 502 Bad Gateway error when trying to open Ambari

New Contributor

Hi, thank you for replying back to my question.

I am new to all of these. Could you make it more clear where should I run this command? 

I'm using Mac system, should i type and run them in the terminal? or somewhere in the browser?

 

Sorry for this dumb questions. 

Highlighted

Re: Geting 502 Bad Gateway error when trying to open Ambari

Super Mentor

@yvettew 

Yes, please try to run the same Curl command from the MAC laptop where you are opening Browser.

Also please check your browser settings to see if it has any network proxy setting added or not?

Re: Geting 502 Bad Gateway error when trying to open Ambari

New Contributor

Hi,

 

I checked the settings for my Chrome. there is nothing checked under Proxy setting. 

 

I tried your command in Terminal, but it didn't provide any feedback.

Re: Geting 502 Bad Gateway error when trying to open Ambari

Super Mentor

@yvettew 

One thing is for sure here is that Ambari is not giving 502 bad gateway error here.


Ambari server runs on Jetty Server (Not on nginx)  So definitely the error which you are getting in your browser is not coming from ambari server.     It mist be coming from some nginx server as we see

502 Bad Gateway nginx/1.15.7

.

Whatever output was generated from the curl command can you share that same.  Even if it is blank output can you please share the screenshot of the error or the browser debugger console output ?

# curl -iLv -u admin:admin -H "X-Requested-By: ambari" -X GET http://$AMBARI_HOSTNAME:8080/api/v1/check

 

 

.