Hi,
I have playbook which has 4 tasks on that. The task are running on more than 10 remote hosts. The first two tasks are ever running without any problem. But when the third task is running, The am getting error like “SSH Error: mux_client_hello_exchange: write packet: Broken pipe”. It is not happening always. It is happening at some times only and also it not happened for specific host. The issue is happening randomly on hosts list.
Ansible logs;
Hi,
I have playbook which has 4 tasks on that. The task are running on more
than 10 remote hosts. The first two tasks are ever running without any
problem. But when the third task is running, The am getting error like
"SSH Error: mux_client_hello_exchange: write packet: Broken pipe". It is
not happening always. It is happening at some times only and also it not
happened for specific host. The issue is happening randomly on hosts list.
Ansible logs;
****************
TASK: [create symbolic link to latest logstash package]
***********************
<host1> REMOTE_MODULE file
path=/opt/installs/logstash/logstash-sdf_current
src=/opt/installs/logstash/logstash-2.2.3 state=link force=yes
<host1> EXEC ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=60s
-o ControlPath="/home/sdf/.ansible/cp/ansible-ssh-%h-%p-%r" -o
KbdInteractiveAuthentication=no -o
PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o
PasswordAuthentication=no -o ConnectTimeout=10 host1 /bin/sh -c 'mkdir
-p $HOME/.ansible/tmp/ansible-tmp-1460458867.58-123380470331659 && chmod
a+rx $HOME/.ansible/tmp/ansible-tmp-1460458867.58-123380470331659 &&
echo $HOME/.ansible/tmp/ansible-tmp-1460458867.58-123380470331659'
fatal: [host1] => SSH Error: mux_client_hello_exchange: write packet:
Broken pipe
It is sometimes useful to re-run the command using -vvvv, which prints
SSH debug output to help diagnose the issue.
mux_client normally has to do with your ssh socket settings on your ansible mgmt host (local machine), they are controlled by the Control* options.
Check your local machine ssh config, increase ControlPersist, personally I think 60s is quite useless, you might be better off disabling ControlMaster, if you are not going to keep the socket up for the duration of you playbook.
However check that the ControlPath folder exists "/home/sdf/.ansible/cp/" with the right permissions.
If the error persists, try the setup/ping module with full verbose
" bin/ansible host1 -m setup -vvvv "