ansible ping failing intermittently "send fds failed\r\nlost connection\n"

I am having an issue with Ansible ping failing intermittently. My environment is as follows:

version: ansible 2.2.0 (devel 643a7ec01d) last updated 2016/06/03 13:22:45 (GMT -400)
config settings (changed from defaults):
control_path = %(directory)s/%%C
retries = 2
control host OS version: Windows 7 running babun v1.2.0/cygwin v1.7.35
remote hosts OS version: CentOS 6.8

hosts: all virtual, running on several CentOS 6.8 libvirt/QEMU hosts

The issue occurs whether or not I run with Ansible debug on.

This is the output I get:

{ ~ } » ansible all -m ping
build6.ntelx.net | FAILED! => {
“failed”: true,
“msg”: “failed to transfer file to /home/rhaskins/.ansible/tmp/ansible-tmp-1465221831.67-12026639274555/ping.py:\n\nmm_send_fd: sendmsg(2): Broken pipe\r\nmux_client_request_session: send fds failed\r\nlost connection\n”
}
wiki07.ntelx.net | FAILED! => {
“failed”: true,
“msg”: “failed to transfer file to /home/rhaskins/.ansible/tmp/ansible-tmp-1465221831.71-85630275169614/ping.py:\n\nmm_send_fd: sendmsg(2): Broken pipe\r\nmux_client_request_session: send fds failed\r\nlost connection\n”
}
bdealey07.ntelx.net | SUCCESS => {
“changed”: false,
“ping”: “pong”
}
ftp07.ntelx.net | SUCCESS => {
“changed”: false,
“ping”: “pong”
}
repo.ntelx.net | SUCCESS => {
“changed”: false,
“ping”: “pong”

What am I doing wrong?

Do you have SSH Set up?

I neglected to add that I can execute “ssh hostname” and it works just fine, every time, without fail.

Robert,
Can you switch to paramiko? AFAIK Ansible is supported on Cygwin.
Thanks,
S

Disclaimer: This is a personal post and not related to my present or past employer. All content provided on this post is for learning purposes only.

Ansible is most decidedly not supported or tested under cygwin (or any mechanism under Windows except a Linux VM, currently). Cygwin’s fork() syscall is unstable (even by their own admission), so you will run into issues and heisenbugs, even more so under 2.0+ where we’re making extensive use of fork() behavior that’s more likely to break under Cygwin.

Ansible may at some point be supported under the new Bash/Ubuntu on Windows stuff in Win10 (because their fork() is actually functional), but even there things are not working 100% yet.

As the “Windows Guy” at Ansible, nothing would make me happier than to have full Windows support for running the controller on my favorite OS, but there are major technical hurdles to doing so reliably, which is the reason we don’t.

Please don’t run the Ansible controller for anything real on Windows. Please. :slight_smile:

Love,

Matt Davis
Ansible Core Engineering (The Windows Guy)

That is very good to know Matt, thanks. While the Ansible docs site makes it very clear that Ansible doesn’t work under native Windows, it is not clear to a newbie like me that Ansible wouldn’t be supported under Cygwin.

Your response is very helpful to those of us who wonder why Ansible isn’t supported under any form of Windows (currently). It might be wise to put your great response (below) up on the Ansible docs site so that the newbies like me understand that 1) Ansible is not supported under any form of Windows including Cygwin and 2) why Ansible is not supported under Cygwin.

Thanks again for your response. If there is anything I can do in order to speed up making Ansible supported under Windows, please let me know. Just in case you are wondering, re-writing Cygwin’s fork() syscall is out of my programming abilities. :slight_smile:

Sorry for the typo, I wanted to say Ansible is not supported for Cygwin
Thanks,
S

Just as a followup to this thread that some may find useful, using Ansible 1.9.4 under Cygwin (in Windows 7) works great. I am currently running it in production with ~50 VM’s and 10 physical hosts.