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.

Ambari Server not running. Stale PID File at: /var/run/ambari-server/ambari-server.pid

Ambari Server not running. Stale PID File at: /var/run/ambari-server/ambari-server.pid

New Contributor

I am installing ambari-server and complete the setup of ambari-server. but when am going to start ambari-server it is started but after some time status showing it is not running.

Checking the log file getting below mentioned ERROR.

Caused by: java.net.UnknownHostException: server1: Temporary failure in name resolution at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1295) at java.net.InetAddress.getLocalHost(InetAddress.java:1471) ... 36 more 30 Jun 2016 17:32:45,807 ERROR [main] AmbariServer:720 - Error stopping the server java.lang.NullPointerException at org.apache.ambari.server.controller.AmbariServer.stop(AmbariServer.java:718) at org.apache.ambari.server.controller.AmbariServer.main(AmbariServer.java:821)

please check and revert me if you have any solution.

Thanks in advance.

7 REPLIES 7

Re: Ambari Server not running. Stale PID File at: /var/run/ambari-server/ambari-server.pid

@dharmaraj sonawane

it seems that your ambari-server is not able to resolve the hostname correctly.

can you check the output of hostname -f on ambari-server host, bind your ip address to hostname in /etc/hosts

Re: Ambari Server not running. Stale PID File at: /var/run/ambari-server/ambari-server.pid

New Contributor

Thank's Rajkumar for reply..

I already enter's ip's with hostname in host file and it is warning. Error is some thing different.

Thanks,

Dharmaraj.

Re: Ambari Server not running. Stale PID File at: /var/run/ambari-server/ambari-server.pid

@dharmaraj sonawane

What is the output of the following URL: http://ambariserver:8080/api/v1/clusters/YOUR_CLUSTER_NAME/hosts

Please change the "YOUR_CLUSTER_NAME" in the above URL.

Also as you mentioned that the ambari-server is not running after some time ...which indicates that there is some other issue. Can you please post few more lines form your ambari-server.log?

Re: Ambari Server not running. Stale PID File at: /var/run/ambari-server/ambari-server.pid

New Contributor

Thanks Joy for the reply..

After rebooting the server my issue got resolved.

Now it is working fine.

Thanks.

Re: Ambari Server not running. Stale PID File at: /var/run/ambari-server/ambari-server.pid

New Contributor

@joy

am facing the same issue again. i was restarted my nodes for some different requirement from the point of server restart am not able to start my ambari-server. Its started but in few seconds showing not running.please check the attachments.ambari-server-log.png

Re: Ambari Server not running. Stale PID File at: /var/run/ambari-server/ambari-server.pid

@dharmaraj sonawane

Looks like you posted your new query here:

https://community.hortonworks.com/questions/44521/ambari-server-not-running-stale-pid-file-at-varrun...

Which indicates that you are getting NoClassDefFoundError "org.json.simple.JSONObject" in your screenshot (ambari-server.log) and the stackTarce says that it is while Ambari View Registration. So can you please check the following locations to see if you have the "json-simple" JAR present or not? (The version might be different in your case For example in my case it is ambari 2.2.2)

/var/lib/ambari-server/resources/views/work/FILES{1.0.0}/WEB-INF/lib/json-simple-1.1.1.jar
/var/lib/ambari-server/resources/views/work/TEZ{0.7.0.2.3.4.0-460}/WEB-INF/lib/json-simple-1.1.1.jar
/var/lib/ambari-server/resources/views/work/HIVE{1.0.0}/WEB-INF/lib/json-simple-1.1.1.jar
/var/lib/ambari-server/resources/views/work/PIG{1.0.0}/WEB-INF/lib/json-simple-1.1.1.jar
/var/lib/ambari-server/resources/views/work/CAPACITY-SCHEDULER{1.0.0}/WEB-INF/lib/json-simple-1.1.1.jar 
/var/lib/ambari-server/resources/views/work/SLIDER{2.0.0}/WEB-INF/lib/json-simple-1.1.1.jar

Re: Ambari Server not running. Stale PID File at: /var/run/ambari-server/ambari-server.pid

@dharmaraj sonawane

Else try the following move the "work" directory to some other directory and then try restart Ambari server it will recreate the correct "work" directory.

mv /var/lib/ambari-server/resources/views/work  /var/lib/ambari-server/resources/views/work_BAD 
ambari-server restart