安装了salt-minion 客户端之后,修改了一次salt-master,然后重启客户端程序,发现启动正常

[root@localhost ~]# /etc/init.d/salt-minion restart
Stopping salt-minion daemon:                               [FAILED]
Starting salt-minion daemon:                               [  OK  ]

但是查看进程状态是发现进程是不存在的

[root@localhost ~]# ps  -ef |grep salt
root      8666  8258  0 13:30 pts/2    00:00:00 grep salt
[root@localhost ~]# /etc/init.d/salt-minion status 
salt-minion dead but pid file exists


查看salt-minion 服务日志,发现报错The master key has changed, the salt master could have been subverted, verify salt master's public key

很明显就是因为修改了salt-master后认证的公钥没有变化

[root@cmjs-localhost salt]# cat  /var/log/salt/minion

2016-01-11 10:59:39,964 [salt.crypt                               ][ERROR   ][13941] The master key has changed, the salt master could have been subverted, verify salt master's public key
2016-01-11 10:59:39,969 [salt.crypt                               ][CRITICAL][13941] 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.3, 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
2016-01-11 13:29:36,758 [salt.crypt                               ][ERROR   ][29724] The master key has changed, the salt master could have been subverted, verify salt master's public key
2016-01-11 13:29:36,759 [salt.crypt                               ][CRITICAL][29724] 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.3, 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

解决办法就是删掉公钥文件然后重启进程

[root@localhost salt]# rm -rf /etc/salt/pki/minion/minion_master.pub
[root@localhost salt]# /etc/init.d/salt-minion restart
Stopping salt-minion daemon:                               [FAILED]
Starting salt-minion daemon:                               [  OK  ]
[root@localhost salt]# /etc/init.d/salt-minion status
salt-minion (pid  21401) is running...


转载 http://732233048.blog.51cto.com/9323668/1693483