Support Questions

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

ambari-agent is not creating pid file

avatar
Expert Contributor

The agent which is running on ambari-server node is not able to create pid file but when we check the process, the agent process is running in the back ground.However when we check the status using ambari-agent status.. it is reporting as the agent NOT running. The reason is because there is no pid file created when we tried to start the ambari-agent.

Could you please help us identify the reason why it is not create PID file?

We have ambari 2.2.0 running on RH 6.6 and ambari-server and ambari-agent are running as root.

1 ACCEPTED SOLUTION

avatar
Master Guru

In /etc/ambari-agent/conf/ambari-agent.ini check an entry called pidlookuppath, the pid file will be written there. The path is usually /var/run/ and ambari-agent will create a directory there called, predictably, ambari-agent. Create that directory if it doesn't exist and try to restart the agent. Also check permissions, those of directories should be 755, and ownership root:root if you run the agent as root.

View solution in original post

2 REPLIES 2

avatar
Master Guru

In /etc/ambari-agent/conf/ambari-agent.ini check an entry called pidlookuppath, the pid file will be written there. The path is usually /var/run/ and ambari-agent will create a directory there called, predictably, ambari-agent. Create that directory if it doesn't exist and try to restart the agent. Also check permissions, those of directories should be 755, and ownership root:root if you run the agent as root.

avatar
Master Mentor
@rbalam

you might have a stale pid with wrong permissions. I've seen this before. Delete the pid, check permissions on directory, make sure directory is not mounted as noexec.