# Cygwin breaking ansible

**URL:** <https://forum.ansible.com/t/cygwin-breaking-ansible/26609>\
**Category:** Ansible Project\
**Created:** [January 30, 2018, 9:59pm UTC](https://forum.ansible.com/t/cygwin-breaking-ansible/26609 "2018-01-30T21:59:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lpescatore](https://avatars.discourse-cdn.com/v4/letter/l/ccd318/32.png) [@lpescatore](https://forum.ansible.com/u/lpescatore)\
**Post date:** [January 30, 2018, 9:59pm UTC](https://forum.ansible.com/t/cygwin-breaking-ansible/26609/1 "2018-01-30T21:59:24Z")

</div>

Hi folks, I have a WEIRD problem.  
After running cygwin ssh-host-config on my PC, which starts sshd and rsync services, suddenly I can no longer run ansible.  
I get this error:

root@Raspi\_Ctrl:/ansible/playbook/nuc# ansible -i /ansible/hosts nuc -m win\_ping

**[WARNING]: FATAL ERROR DURING FILE TRANSFER: Traceback (most recent call last): File**

**“/usr/local/lib/python2.7/dist-packages/ansible/plugins/connection/winrm.py”, line 276, in \_winrm\_exec**

**self.\_winrm\_send\_input(self.protocol, self.shell\_id, command\_id, data, eof=is\_last) File**

**“/usr/local/lib/python2.7/dist-packages/ansible/plugins/connection/winrm.py”, line 256, in \_winrm\_send\_input**

**protocol.send\_message(xmltodict.unparse(rq)) File "/usr/local/lib/python2.7/dist-**

**packages/winrm/protocol.py", line 207, in send\_message return self.transport.send\_message(message) File**

**“/usr/local/lib/python2.7/dist-packages/winrm/transport.py”, line 202, in send\_message raise**

**WinRMTransportError(‘http’, error\_message) WinRMTransportError: (u’http’, u’Bad HTTP response returned from**

**server. Code 500’)**

100.126.255.201 | FAILED! =\> {

“msg”: “winrm send\_input failed”

}

root@Raspi\_Ctrl:/ansible/playbook/nuc# ansible -i /ansible/hosts nuc -m win\_ping

**100.126.255.201 | UNREACHABLE! =\> {**

**“changed”: false,**

**“msg”: “basic: HTTPSConnectionPool(host=‘100.126.255.201’, port=5986): Max retries exceeded with url: /wsman (Caused by ConnectTimeoutError(\<urllib3.connection.VerifiedHTTPSConnection object at 0x749335b0\>, ‘Connection to 100.126.255.201 timed out. (connect timeout=30)’))”,**

**“unreachable”: true**

**}**

**When I run system restore to before this ssd-host-config, I can reach it again.**

**rsync uses port 873, sshd uses 22, and I believe ansible uses 5986 so there should be no conflict.**

**Has anyone else had this issue?**

**By the way, this is the script that does the config. I do have this set to become: so i dont think it’s a privelege thing.**

#!/bin/bash

#::Configure sshd service

if ! ssh-host-config --yes --pwd “foo”; then

echo “ERROR: Failed to configure sshd”

exit 1

fi

#echo db\_home: /cygdrive/c/home/YRunner \> C:\cygwin\etc\nsswitch.conf || exit /b 1

if ! net start sshd; then

echo “ERROR: Failed to start sshd service.”

exit 1

fi

#configure the rsyncd service

cat \< /etc/rsyncd.conf

use chroot = yes

[yrunner\_rsyncer]

#path = /cygdrive/c/home/YRunner

comment = YRunner Rsyncer

auth users = YRunner

secrets file = /etc/rsyncd.secrets

write only = false

read only = false

list = true

strict modes = false

hosts allow = \*

EOF

/usr/bin/cygrunsrv.exe --install “rsyncd” --path /usr/bin/rsync --args “–daemon --no-detach” -f “Rsync daemon service”

if [[“$?” -ne 0]]; then

echo “ERROR: Failed to install rsyncd service”

exit 1

fi

net start rsyncd

---

<div class="post-metadata">

**Author:** ![lpescatore](https://avatars.discourse-cdn.com/v4/letter/l/ccd318/32.png) [@lpescatore](https://forum.ansible.com/u/lpescatore)\
**Post date:** [February 1, 2018, 6:31pm UTC](https://forum.ansible.com/t/cygwin-breaking-ansible/26609/2 "2018-02-01T18:31:18Z")

</div>

Bumping-Anyone at all know why?

---

<div class="post-metadata">

**Author:** ![lpescatore](https://avatars.discourse-cdn.com/v4/letter/l/ccd318/32.png) [@lpescatore](https://forum.ansible.com/u/lpescatore)\
**Post date:** [February 9, 2018, 10:38pm UTC](https://forum.ansible.com/t/cygwin-breaking-ansible/26609/3 "2018-02-09T22:38:57Z")

</div>

Bump, again.

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [February 12, 2018, 9:43am UTC](https://forum.ansible.com/t/cygwin-breaking-ansible/26609/4 "2018-02-12T09:43:43Z")

</div>

My guess would be that whatever you are doing with cygwin it is somehow upsetting the network stack.

If it fixes itself after a period of time then maybe just stick in a big pause, then do a wait\_for\_connection to make sure you can still connect and then proceed with the rest of your playbook?

hope this helps,

Jon
