233饿13 发表于 2015-12-18 08:40:05

salt-minion dead but pid file exists 正确解决方法

说明:
看了网上很多关于alt-minion dead but pid file exists 的解决方法,千篇一律的写一个shell脚本 killproc salt-minion
见链接:http://www.iyunv.com/thread-152699-1-1.html
但是并没有什么用,我如何解决这个问题的呢,请容我慢慢道来。

系统版本:CentOS_6.7_64bit 环境已优化。
重装(第一次装)salt-minion,但是客户端却无法正常启动,如下报错:

1
# /etc/init.d/salt-minion status




salt-minion dead but pid file exists

解决过程:
由报错知:
    minion进程已经死,但是进程文件还在
于是去找进程文件,在minion机的配置文件里/etc/init.d/salt-minion里发现进程文件是:
    /var/run/salt-minion.pid

然后尝试把进程文件删掉,再重新启动:

1
# /etc/init.d/salt-minion restart





Stopping salt-minion daemon:                              
Starting salt-minion daemon:                              

1
# /etc/init.d/salt-minion status




salt-minion dead but pid file exists
仍然没有解决问题。
不要着急,debug一下:

1
salt-minion -l debug





Setting up the Salt Minion "namenode"
Created pidfile: /var/run/salt-minion.pid
Reading configuration from /etc/salt/minion
Attempting to authenticate with the Salt Master at 192.168.1.53
Initializing new SAuth for ('/etc/salt/pki/minion', 'namenode', 'tcp://192.168.1.53:4506')
The master key has changed, the salt master could have been subverted, verify salt master's public key
The Salt Master server's public key did not authenticate!
   The master may need to be updated if it is a version of Salt lower than 2015.5.5, or
   If you are confident that you are connecting to a valid Salt Master, then remove the master public key and restart the Salt Minion.
   The master public key can be found at:
   /etc/salt/pki/minion/minion_master.pub

查看salt-minion日志 :

1
less /var/log/salt/minion




也发现同样的错误:


2015-12-15 16:35:06,519 The Salt Master server's public key did not authenticate!
10647 The master may need to be updated if it is a version of Salt lower than 2015.5.5, or
10648 If you are confident that you are connecting to a valid Salt Master, then remove the master public key and restart the Salt Minion.
10649 The master public key can be found at:
10650 /etc/salt/pki/minion/minion_master.pub

解决方法:
直接在客户端上来上一条

1
# rm -rf /etc/salt/pki/minion/minion_master.pub





1
/etc/init.d/salt-minion restart





万事大吉 !!!


页: [1]
查看完整版本: salt-minion dead but pid file exists 正确解决方法