Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

ambari agent not running

avatar
Contributor

Hi

 

By mistake i deleted one file in ambari agent that is

rm -f /run/ambari-agent/ambari-agent.pid

 

after that its showing this error

 

ambari-agent restart
Restarting ambari-agent
Verifying Python version compatibility...
Using python /usr/bin/python
ambari-agent is not running. No PID found at /run/ambari-agent/ambari-agent.pid
Verifying Python version compatibility...
Using python /usr/bin/python
Checking for previously running Ambari Agent...
Checking ambari-common dir...
Starting ambari-agent
Verifying ambari-agent process status...
ERROR: ambari-agent start failed. For more details, see /var/log/ambari-agent/ambari-agent.out:
====================
No handlers could be found for logger "root"
Failed to start ping port listener of: Could not open port 8670 because port already used by another process:
UID PID PPID C STIME TTY TIME CMD
root 23758 23754 0 Aug19 pts/4 00:00:17 /usr/bin/python /usr/lib/ambari-
====================
Agent out at: /var/log/ambari-agent/ambari-agent.out
Agent log at: /var/log/ambari-agent/ambari-agent.log

 

 

 

1 ACCEPTED SOLUTION

avatar
Master Mentor
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
9 REPLIES 9

avatar
Expert Contributor

Hi @Manoj690 ,

 

Try to find the ambari agent pid and kill is manually.

Below cmds will usefull

# ps aux | grep main.py | grep -v grep

# kill PID

 

Once the process is killed then you can start the agent.

 

Please accept the answer once issue resolved.

 

avatar
Contributor

Hi

i tried this

 

ps aux | grep main.py | grep -v grep
root 12998 0.0 0.1 164276 28588 pts/4 T Aug19 0:00 /usr/bin/python /usr/lib/ambari-agent/lib/ambari_agent/main.py stop
root 23758 0.0 0.1 232796 23640 pts/4 Sl Aug19 0:32 /usr/bin/python /usr/lib/ambari-agent/lib/ambari_agent/main.py start


 kill PID
bash: kill: PID: arguments must be process or job IDs

avatar
Expert Contributor

Use below cmds, PID means pid of the process.

kill12998

kill 23758

 

Restart ambari agent

avatar
Contributor

Still same error

 

ambari-agent restart
Restarting ambari-agent
Verifying Python version compatibility...
Using python /usr/bin/python
ambari-agent is not running. No PID found at /run/ambari-agent/ambari-agent.pid
Verifying Python version compatibility...
Using python /usr/bin/python
Checking for previously running Ambari Agent...
Checking ambari-common dir...
Starting ambari-agent
Verifying ambari-agent process status...
ERROR: ambari-agent start failed. For more details, see /var/log/ambari-agent/ambari-agent.out:
====================
No handlers could be found for logger "root"
Failed to start ping port listener of: Could not open port 8670 because port already used by another process:
UID PID PPID C STIME TTY TIME CMD
root 23758 23754 0 Aug19 pts/4 00:00:43 /usr/bin/python /usr/lib/ambari-
====================
Agent out at: /var/log/ambari-agent/ambari-agent.out
Agent log at: /var/log/ambari-agent/ambari-agent.log

avatar
Expert Contributor

kill the process which is using port 8670

 

netstat -tulpn | grep 8670

kill -9 <process pid>

avatar
Contributor

still same error. can you tell me your contact in private messages(email or phone)

avatar
Master Mentor
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login

avatar
Contributor

can you tell me solution for this

 

ambari-server restart

 

Using python /usr/bin/python
Restarting ambari-server
Ambari Server is not running
Ambari Server running with administrator privileges.
Organizing resource files at /var/lib/ambari-server/resources...
Ambari database consistency check started...
Server PID at: /var/run/ambari-server/ambari-server.pid
Server out at: /var/log/ambari-server/ambari-server.out
Server log at: /var/log/ambari-server/ambari-server.log
Waiting for server start..........................................ERROR: Exiting with exit code -1.
REASON: Ambari Server java process has stopped. Please check the logs for more information.

avatar
Expert Contributor

Hi,

 

We don't share personal information like contacts, As you are facing Ambari Server issue and Agents issue is resolved, Please open a new question for Ambari Server, Also, check the Ambari Server logs you see some exceptions, attach those exceptions.