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

**URL:** <https://forum.ansible.com/t/ansible-ping-failing-intermittently-send-fds-failed-r-nlost-connection-n/21675>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [June 6, 2016, 2:28pm UTC](https://forum.ansible.com/t/ansible-ping-failing-intermittently-send-fds-failed-r-nlost-connection-n/21675 "2016-06-06T14:28:32Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert\_Haskins](https://avatars.discourse-cdn.com/v4/letter/r/d9b06d/32.png) [@Robert\_Haskins](https://forum.ansible.com/u/Robert_Haskins)\
**Post date:** [June 6, 2016, 2:28pm UTC](https://forum.ansible.com/t/ansible-ping-failing-intermittently-send-fds-failed-r-nlost-connection-n/21675/1 "2016-06-06T14:28:32Z")

</div>

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](http://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](http://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](http://bdealey07.ntelx.net) | SUCCESS =\> {  
“changed”: false,  
“ping”: “pong”  
}  
[ftp07.ntelx.net](http://ftp07.ntelx.net) | SUCCESS =\> {  
“changed”: false,  
“ping”: “pong”  
}  
[repo.ntelx.net](http://repo.ntelx.net) | SUCCESS =\> {  
“changed”: false,  
“ping”: “pong”

What am I doing wrong?

---

<div class="post-metadata">

**Author:** ![aaron.trujillo](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@aaron.trujillo](https://forum.ansible.com/u/aaron.trujillo)\
**Post date:** [June 6, 2016, 2:48pm UTC](https://forum.ansible.com/t/ansible-ping-failing-intermittently-send-fds-failed-r-nlost-connection-n/21675/2 "2016-06-06T14:48:26Z")

</div>

Do you have SSH Set up?

---

<div class="post-metadata">

**Author:** ![Robert\_Haskins](https://avatars.discourse-cdn.com/v4/letter/r/d9b06d/32.png) [@Robert\_Haskins](https://forum.ansible.com/u/Robert_Haskins)\
**Post date:** [June 6, 2016, 2:51pm UTC](https://forum.ansible.com/t/ansible-ping-failing-intermittently-send-fds-failed-r-nlost-connection-n/21675/3 "2016-06-06T14:51:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Subhankar\_Sengupta](https://avatars.discourse-cdn.com/v4/letter/s/58956e/32.png) [@Subhankar\_Sengupta](https://forum.ansible.com/u/Subhankar_Sengupta)\
**Post date:** [June 7, 2016, 2:35am UTC](https://forum.ansible.com/t/ansible-ping-failing-intermittently-send-fds-failed-r-nlost-connection-n/21675/4 "2016-06-07T02:35:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Matt\_Davis](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@Matt\_Davis](https://forum.ansible.com/u/Matt_Davis)\
**Post date:** [June 7, 2016, 5:17am UTC](https://forum.ansible.com/t/ansible-ping-failing-intermittently-send-fds-failed-r-nlost-connection-n/21675/5 "2016-06-07T05:17:49Z")

</div>

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](https://www.cygwin.com/faq.html#faq.using.fixing-fork-failures)), 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**. 🙂

Love,

Matt Davis  
Ansible Core Engineering (The Windows Guy)

---

<div class="post-metadata">

**Author:** ![Robert\_Haskins](https://avatars.discourse-cdn.com/v4/letter/r/d9b06d/32.png) [@Robert\_Haskins](https://forum.ansible.com/u/Robert_Haskins)\
**Post date:** [June 7, 2016, 3:13pm UTC](https://forum.ansible.com/t/ansible-ping-failing-intermittently-send-fds-failed-r-nlost-connection-n/21675/6 "2016-06-07T15:13:15Z")

</div>

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. 🙂

---

<div class="post-metadata">

**Author:** ![Subhankar\_Sengupta](https://avatars.discourse-cdn.com/v4/letter/s/58956e/32.png) [@Subhankar\_Sengupta](https://forum.ansible.com/u/Subhankar_Sengupta)\
**Post date:** [June 7, 2016, 4:12pm UTC](https://forum.ansible.com/t/ansible-ping-failing-intermittently-send-fds-failed-r-nlost-connection-n/21675/7 "2016-06-07T16:12:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Robert\_Haskins](https://avatars.discourse-cdn.com/v4/letter/r/d9b06d/32.png) [@Robert\_Haskins](https://forum.ansible.com/u/Robert_Haskins)\
**Post date:** [June 22, 2016, 5:18pm UTC](https://forum.ansible.com/t/ansible-ping-failing-intermittently-send-fds-failed-r-nlost-connection-n/21675/8 "2016-06-22T17:18:15Z")

</div>

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.
