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

299 views
Skip to first unread message

Robert Haskins

unread,
Jun 6, 2016, 10:28:32 AM6/6/16
to Ansible Project
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?
Message has been deleted

aaron.t...@total.care

unread,
Jun 6, 2016, 10:48:26 AM6/6/16
to Ansible Project
Do you have SSH Set up?

Robert Haskins

unread,
Jun 6, 2016, 10:51:08 AM6/6/16
to Ansible Project
I neglected to add that I can execute "ssh hostname" and it works just fine, every time, without fail. 

Subhankar Sengupta

unread,
Jun 6, 2016, 10:37:11 PM6/6/16
to Ansible Project
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.

Matt Davis

unread,
Jun 7, 2016, 1:17:50 AM6/7/16
to Ansible Project
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. :)

Love,

Matt Davis
Ansible Core Engineering (The Windows Guy)

Robert Haskins

unread,
Jun 7, 2016, 11:13:16 AM6/7/16
to Ansible Project
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. :-)

Subhankar Sengupta

unread,
Jun 7, 2016, 12:12:45 PM6/7/16
to Ansible Project
Sorry for the typo,  I wanted to say Ansible is not supported for Cygwin
Thanks,
S

Robert Haskins

unread,
Jun 22, 2016, 1:18:16 PM6/22/16
to Ansible Project
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.


On Tuesday, June 7, 2016 at 1:17:50 AM UTC-4, Matt Davis wrote:
Reply all
Reply to author
Forward
0 new messages