# Windows puzzler redux

**URL:** <https://forum.ansible.com/t/windows-puzzler-redux/17467>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [February 7, 2015, 6:23pm UTC](https://forum.ansible.com/t/windows-puzzler-redux/17467 "2015-02-07T18:23:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dyioulos](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dyioulos/32/8363_2.png) [@dyioulos](https://forum.ansible.com/u/dyioulos)\
**Post date:** [February 7, 2015, 6:23pm UTC](https://forum.ansible.com/t/windows-puzzler-redux/17467/1 "2015-02-07T18:23:34Z")

</div>

All,

After ultimately having set up a test Windows Server 2008 R2 box to work with Ansible (it failed at first, but I thought I had solved the problem at the Ansible control), I’ve tried to get it working on two other Server boxes. I set these up via the instructions found at [http://docs.ansible.com/intro\_windows.html](http://docs.ansible.com/intro_windows.html). However, whereas my test server returns “success” to win\_ping, the newly set up boxes return “Servername | FAILED =\> 500 WinRMTransport. [Errno 104] Connection reset by peer”. I’ve tried everything I can (e.g. disabled Windows Firewall, added a Windows hotfix, etc.), but nothing is working. Does anyone have any ideas as to why this isn’t working?

Many thanks.

---

<div class="post-metadata">

**Author:** ![Michael\_Wozniak](https://avatars.discourse-cdn.com/v4/letter/m/f1d935/32.png) [@Michael\_Wozniak](https://forum.ansible.com/u/Michael_Wozniak)\
**Post date:** [February 8, 2015, 4:55pm UTC](https://forum.ansible.com/t/windows-puzzler-redux/17467/2 "2015-02-08T16:55:56Z")

</div>

If you’re using ssl, there has been a change in how python handles self signed certificates recently. Although if you got one working, this might not be your issue.

[http://legacy.python.org/dev/peps/pep-0476/](http://legacy.python.org/dev/peps/pep-0476/)

I had similar issues after the last time I updated python and it took me a while to track that down.

---

<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 9, 2015, 6:48am UTC](https://forum.ansible.com/t/windows-puzzler-redux/17467/3 "2015-02-09T06:48:20Z")

</div>

It sounds like a network issue.

Here’s a few things you could try:

1/ See Chris Church’s suggestion on this thread for a curl command to test the communication:

[https://groups.google.com/d/msgid/ansible-project/6e7dd49d-d56b-4f2e-8254-9ab0fd2a96f8%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/ansible-project/6e7dd49d-d56b-4f2e-8254-9ab0fd2a96f8%40googlegroups.com?utm_medium=email&utm_source=footer)

2/ Check you are using the correct port 5986 for https, 5985 for http

3/ Check your machine names are resolvable by your local dns.

4/ Check the windows event log on your managed hosts. When things are working there will be a login event.

5/ run with -vvvvv to see all the communication logging between ansible and your managed windows hosts.

3/ Check your machine names are resolvable from your Ansible master.

4/ Check the windows event log on your managed hosts. When things are working, there will be a login event. If there’s no login event its probably not finished setting up the communications channel.

5/ run ansible-playbook -vvvvv to see all the communication logging between ansible and your managed windows machine.

Hope this helps,

Jon

---

<div class="post-metadata">

**Author:** ![dyioulos](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dyioulos/32/8363_2.png) [@dyioulos](https://forum.ansible.com/u/dyioulos)\
**Post date:** [February 12, 2015, 8:49pm UTC](https://forum.ansible.com/t/windows-puzzler-redux/17467/4 "2015-02-12T20:49:26Z")

</div>

Thank you, Michael and J. I must be a complete lamer, because I’m just not getting this to work. Here’s the latest:

- the original machine that I got Ansible working with now doesn’t work. win\_ping returns the dreaded “WINRM CONNECTION ERROR: 401 Unauthorized. basic auth failed”, despite the fact that I get a “411” when i try the curl test command.
- i got Ansible working on a second machine, although I don’t know which combination of of things I did (many) to get it working, despite the fact that I get a “401” when i try the curl test command.

I ran through the checklist that J provided, and everything that I was supposed to do I did (e.g. Check you are using the correct port 5986 for https, 5985 for http).

Your contniued help is appreciated. This is a real hair puller!
