ansible在故障加速模式后无法连接

ansible在故障加速模式后无法连接,ansible,ansible-playbook,Ansible,Ansible Playbook,当我在加速模式下运行ansible playbook并且由于某种原因ansible任务失败时,下一次运行将不会连接到以下错误 PLAY [all] ******************************************************************** GATHERING FACTS *************************************************************** fatal: [xxx.xxx.xxx.xxx]

当我在加速模式下运行ansible playbook并且由于某种原因ansible任务失败时,下一次运行将不会连接到以下错误

PLAY [all] ******************************************************************** 

GATHERING FACTS *************************************************************** 
fatal: [xxx.xxx.xxx.xxx] => Failed to connect to xxx.xxx.xxx.xxx:5099

TASK: [role | task] *********************************************** 
FATAL: no hosts matched or all hosts have already failed -- aborting


PLAY RECAP ******************************************************************** 
           to retry, use: --limit @//task.retry

xxx.xxx.xxx.xxx                : ok=0    changed=0    unreachable=1    failed=0   

PLAY [all] ******************************************************************** 

GATHERING FACTS *************************************************************** 
fatal: [xxx.xxx.xxx.xxx] => Failed to connect to xxx.xxx.xxx.xxx:5099

TASK: [role | task] ********************************************* 
FATAL: no hosts matched or all hosts have already failed -- aborting
等等

然后在目标主机中有一个ansible进程正在运行。我跑

kill -9 $(ps -aux | grep accelerate | awk '{print $2}') 
用于终止此进程并获得下一次运行成功


有人知道会发生什么,以及如何修复它。

我知道这不是你问题的答案,但是当你可以为SSH启用
ControlMaster
时,为什么要使用加速模式呢。在大多数情况下,加速模式应该工作得更快,而且您不必担心再打开一个端口。只需将以下内容添加到ansible.cfg中:

[ssh_connection]
ssh_args = -o ControlMaster=auto -o ControlPersist=60s

您的服务器的防火墙允许连接到5099吗?是的,第一次运行正常,杀戮进程运行后也正常