Salt-minion dead But PID file exists solution

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.