Issue : cloudera-scm-agent failed to restart, saying agent dead but pid file exist. Sometimes it starts good but it`ll die after few min.
Solution : Try 1
Delete the pid file and restart the agent.
# rm -f /var/run/cloudera-scm-agent.pid
# service cloudera-scm-agent restart
# service cloudera-scm-agent status
It`ll work for most of the cases. If it doesn`t work try the next step.
Try 2 :
Delete the pid file and restart the agent.
# rm -f /var/run/cloudera-scm-agent.pid
Hard stop the agent :
# service cloudera-scm-agent hard_stop_confirmed
Hard restart the agent :
# service cloudera-scm-agent hard_restart_confirmed
Try 3 :
Check for zombie agent process.
Check the agent status :
# service cloudera-scm-agent status
If the agent status is stopped, there should not be any agent process running in background.
Check it using PS command :
# ps -ef | grep "cloudera-scm-agent"
Kill the zombie agent process
kill -9 <pid>
Start the agent :
# service cloudera-scm-agent start