The Salt Master has cached the public key

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了The Salt Master has cached the public key相关的知识,希望对你有一定的参考价值。

故障现象:

某台服务器,重新安装salt-minion客户端后,发现salt-master与其通信出现问题,然后查询了服务的状态,发现有如下报错信息:

[[email protected] ~]# systemctl status salt-minion -l
● salt-minion.service - The Salt Minion
   Loaded: loaded (/usr/lib/systemd/system/salt-minion.service; disabled; vendor preset: disabled)
   Active: active (running) since Sun 2018-01-14 20:48:40 CST; 1min 54s ago
     Docs: man:salt-minion(1)
           file:///usr/share/doc/salt/html/contents.html
           https://docs.saltstack.com/en/latest/contents.html
 Main PID: 43416 (salt-minion)
   CGroup: /system.slice/salt-minion.service
           ├─43416 /usr/bin/python /usr/bin/salt-minion
           ├─43425 /usr/bin/python /usr/bin/salt-minion
           └─43431 /usr/bin/python /usr/bin/salt-minion

Jan 14 20:48:39 LVS-RS01.saltstack.com systemd[1]: Starting The Salt Minion...
Jan 14 20:48:40 LVS-RS01.saltstack.com systemd[1]: Started The Salt Minion.
Jan 14 20:49:23 LVS-RS01.saltstack.com salt-minion[43416]: [ERROR   ] Error while bringing up minion for multi-master. Is master at 10.10.10.111 responding?
Jan 14 20:49:38 LVS-RS01.saltstack.com salt-minion[43416]: [ERROR   ] The Salt Master has cached the public key for this node, this salt minion will wait for 10 seconds before attempting to re-authenticate
Jan 14 20:49:48 LVS-RS01.saltstack.com salt-minion[43416]: [ERROR   ] The Salt Master has cached the public key for this node, this salt minion will wait for 10 seconds before attempting to re-authenticate
Jan 14 20:49:58 LVS-RS01.saltstack.com salt-minion[43416]: [ERROR   ] The Salt Master has cached the public key for this node, this salt minion will wait for 10 seconds before attempting to re-authenticate

处理过程:

[[email protected] minion]# >/etc/salt/minion_id 
[[email protected] minion]# systemctl restart salt-minion
[[email protected] minion]# systemctl status salt-minion
● salt-minion.service - The Salt Minion
   Loaded: loaded (/usr/lib/systemd/system/salt-minion.service; disabled; vendor preset: disabled)
   Active: active (running) since Sun 2018-01-14 20:52:25 CST; 8s ago
     Docs: man:salt-minion(1)
           file:///usr/share/doc/salt/html/contents.html
           https://docs.saltstack.com/en/latest/contents.html
 Main PID: 45086 (salt-minion)
   CGroup: /system.slice/salt-minion.service
           ├─45086 /usr/bin/python /usr/bin/salt-minion
           ├─45095 /usr/bin/python /usr/bin/salt-minion
           └─45101 /usr/bin/python /usr/bin/salt-minion

Jan 14 20:52:25 LVS-RS01.saltstack.com systemd[1]: Starting The Salt Minion...
Jan 14 20:52:25 LVS-RS01.saltstack.com systemd[1]: Started The Salt Minion.
如果salt-key -L看到服务的key在Unaccepted Keys中,则删除这个key
[[email protected] minion]# systemctl status salt-minion
● salt-minion.service - The Salt Minion
   Loaded: loaded (/usr/lib/systemd/system/salt-minion.service; disabled; vendor preset: disabled)
   Active: active (running) since Sun 2018-01-14 20:52:25 CST; 17s ago
     Docs: man:salt-minion(1)
           file:///usr/share/doc/salt/html/contents.html
           https://docs.saltstack.com/en/latest/contents.html
 Main PID: 45086 (salt-minion)
   CGroup: /system.slice/salt-minion.service
           ├─45086 /usr/bin/python /usr/bin/salt-minion
           ├─45095 /usr/bin/python /usr/bin/salt-minion
           └─45101 /usr/bin/python /usr/bin/salt-minion

Jan 14 20:52:25 LVS-RS01.saltstack.com systemd[1]: Starting The Salt Minion...
Jan 14 20:52:25 LVS-RS01.saltstack.com systemd[1]: Started The Salt Minion.
[[email protected] minion]# salt ‘*‘ test.ping
LVS-RS01.saltstack.com:
    True

到此,问题得到解决。

以上是关于The Salt Master has cached the public key的主要内容,如果未能解决你的问题,请参考以下文章

SaltStack master file_roots 变量与 salt 命令执行的关系

Salt之Cpu 100%无响应故障 Salt request timed out. The master is not responding

Salt之Cpu 100%无响应故障 Salt request timed out. The master is not responding#yyds干货盘点#

The ECDSA host key for XXX has changed

Saltstack之job管理和runner

SaltStack之Job管理和Runner