salt-master 是 centos 6.9
salt-minion 是 centos 7.6
salt-minion 能加进 salt-master,但运行 salt '*' test.ping 结果一直是
Minion did not return. [No response]
问题持续了很久,不是防火墙 不是权限 也没有日志。
最后发现网络连接上,salt-minion的网络一直有连接master的4506,就是没有4505。
重要的是 运行用户我已经指定是saltuser而非root了,但运行用户一直是root。
[root@localhost]# ps -ef | grep salt-minion
root 160507 1 0 14:39 ? 00:00:00 /usr/bin/python /usr/bin/salt-minion
最后解决的方法是
service salt-minion stop
[root@localhost]# service salt-minion stop
Redirecting to /bin/systemctl stop salt-minion.service
然后不通过service来运行salt-minion,而是直接通过命令启动。
/usr/bin/python /usr/bin/salt-minion -d
然后就成功了!salt '*' test.ping结果出来True了,运行用户也正常了!汗!!!
[root@localhost]# ps -ef | grep salt
saltuser 165615 1 8 15:04 ? 00:00:00 /usr/bin/python /usr/bin/salt-minion -d
标签: saltstack
非特殊说明,本博所有文章均为博主原创。
如若转载,请注明出处:https://www.isres.com/linux/224.html