Salt-minion dead But PID file exists solution
Description
A salt minion machine could not be started due to its own error operation, as follows:
[Email protected] run]#/etc/init.d/salt-minion statussalt-minion dead but PID file exists
Resolution process:
The error is known:
The minion process is dead, but the process files are still
So to find process files, in the Minion machine configuration file/etc/init.d/salt-minion found process file is:/var/run/salt-minion.pid
Then try to delete the process file and restart it:
[Email protected] run]#/etc/init.d/salt-minion restartstopping salt-minion daemon: [FAILED ]starting salt-minion daemon: [OK][[email protected] run]#/etc/init.d/salt-minion Statu Ssalt-minion dead but PID file exists
Still no problem solved
Then change the idea to solve the problem:
Locate the startup file for Minion/etc/init.d/salt-minion
The inside of the start and close the process looked over, there are a few key points, as follows:
. /etc/rc.d/init.d/functions
And
Process=salt-minion
Killproc $PROCESS
Found a workaround:
First read the/etc/rc.d/init.d/functions this file, and found that there is a killproc function
Then I wrote a shell script to solve the problem, the script content is as follows:
. /etc/rc.d/init.d/functionskillproc salt-minion
# #执行完shell脚本后: [[email protected] run]#/etc/init.d/salt-minion startstarting salt-minion daemon: [OK] [Email protected] ~]#/etc/init.d/salt-minion statussalt-minion (PID 15422) is running ...
Normal, done.
This article is from the "See" blog, please be sure to keep this source http://732233048.blog.51cto.com/9323668/1693483
Salt-minion dead But PID file exists solution