I have installed Ambari server 2.2.2 with mysql as the DB. The server comes up fine and there are no errors in log file. However, when I try to login from the ambari login page using admin/admin, the page just stays there. And after sometime gives the message "Please check if server is running". There are still no errors in the log file.
I am able to telnet to the server on port 8080.
Curl command gives a tcp_error. I have attached the screenshots, and ambari properties file.
Kindly suggest how to move forward from here.
As you mentioned that "telnet" is working fine on port 8080 but not the CURL.
This indicates that you might have something on your setup which is blocking the "HTTP" requests. (telnet does not use "HTTP" protocol)
So the most probable cause may be some Network Web Proxy present there between your Browser machine and the Ambari Server. Yout HTTP Requests might be passing through that Network proxy and that proxy might be timing out your request to Ambari.
So please try to run the CURL command to contact to AmbariServer once again BUT this time with additional flags like "-ivL"
# curl -iLvk -u admin:admin -H "X-Requested-By: ambari" -X GET http://$AMBARI_FQDN:8080/api/v1/check
Please share the Complete output of the above curl command so that we can see if the request is being passed via any proxy ?
Also you can tail your ambari-server audit log to see if the requests are actually reaching to your ambari server or not? when you try to access ambari UI or make any API call. If you do not see any loggign there then it also indicates that Ambari Server is not culprit here but something in between your browser machine and ambari Server which is restricting the Http access. (Most probable cause can be "Network proxy Setting")
# tail -f /var/log/ambari-server/ambari-audit.log
Thank you @Jay Kumar SenSharma for your quick response!
The curl command indeed shows the request going through a proxy. I have attached the output here:
Unfortunately, I could not find audit log under /var/log/ambari-server. The contents of that directory are as follows:
[root@somehost ambari-server]# pwd
[root@eithadpv111 ambari-server]# ls
ambari-alerts.log ambari-eclipselink.log ambari-server.log
ambari-config-changes.log ambari-server-check-database.log ambari-server.out
Yes, based on the attached "curl-proxy-error.txt" file we see that your requests are going through proxy and that proxy is not allowing your request to passed to AmbariServer.
So you have two alertnatives:
1. Either Disable the proxy. Fir different browser the settings can be seen/altered differently .. for example in Chrome you can try finding it somewhere like here. https://www.enigmasoftware.com/how-to-disable-proxy-settings-browser/
2. Else you will need to contact your Proxy Server admin to get its settings fixed so that it will allow the request for AmbariServer to pass through it.
I removed the proxy, but still i am not able to login to ambari page using admin/admin. It is still giving me the same error "Please check if Ambari server is running".
After removing the proxy, i am getting following output in curl command:
In your latest curl command i still see that the Proxy "proxy-abc.something.com" is being used:
# curl -iLvk -u admin:admin -H "X-Requested-By: ambari" -X GET http://somehost.abc.com:8080/api/v1/check * About to connect() to .......... port 8080 (#0) * Trying xxx.xx.xx.xxx... connected * Connected to proxy-abc.something.com (xxx.xx.xx.xxx) port 8080 (#0)
So please check your environment if any http proxy is set there.
May be you can try with
# curl --noproxy "*" -iLvk -u admin:admin -H "X-Requested-By: ambari" -X GET http://somehost.abc.com:8080/api/v1/check
Also please check your env settings to find out from where is it being added. Most possible places will be as following. I am suspecting that somewhere it might be added as "export http_proxy=proxy-abc.something.com:8080" which you need to remove.
# env | grep -i proxy # grep -i proxy ~/.bash_profile # grep -i proxy /etc/profile # grep -i proxy ~/.bashrc
Hi @Jay Kumar SenSharma,
I have removed the proxy from bashrc and then when I ran the curl command from the server itself, curl command exits with "RUNNING" status. When I run the same command from a local machine, it gives the error: "curl: (56) Recv failure: Connection was aborted".
Does this indicate a firewall could be blocking the request made to ambari server? Kindly have a look at the curl outputs (both from server and local machine) and let me know.