# winrm.py tries SSL handshake on WinRM HTTP port

**URL:** <https://forum.ansible.com/t/winrm-py-tries-ssl-handshake-on-winrm-http-port/18126>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [April 29, 2015, 3:40pm UTC](https://forum.ansible.com/t/winrm-py-tries-ssl-handshake-on-winrm-http-port/18126 "2015-04-29T15:40:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tom\_Laredo](https://avatars.discourse-cdn.com/v4/letter/t/ecc23a/32.png) [@Tom\_Laredo](https://forum.ansible.com/u/Tom_Laredo)\
**Post date:** [April 29, 2015, 3:40pm UTC](https://forum.ansible.com/t/winrm-py-tries-ssl-handshake-on-winrm-http-port/18126/1 "2015-04-29T15:40:55Z")

</div>

Hi,

I’ trying to run a simple test on a remote windows host.  
I read [http://docs.ansible.com/intro\_windows.html](http://docs.ansible.com/intro_windows.html) and saw that Michael recommends to install pywinrm like this:  
pip install [http://github.com/diyan/pywinrm/archive/master.zip#egg=pywinrm](http://github.com/diyan/pywinrm/archive/master.zip#egg=pywinrm)

In my case, I don’t have any possibility to run pip and hit github due to network security rules so I did it like this (on Debian 8 - Jessie):

1. aptitude install python-isodate python-xmltodict python-pytest python-pytest-cov pep8

2. 
# Downloaded [http://github.com/diyan/pywinrm/archive/master.zip#egg=pywinrm](http://github.com/diyan/pywinrm/archive/master.zip#egg=pywinrm) and put it on my Ansible server
3. unzip pywinrm-master.zip

4. cd pywinrm-master/

5. python setup.py install

All went well and I have this directory installed /usr/local/lib/python2.7/dist-packages/winrm/

After having modified file /usr/lib/python2.7/dist-packages/ansible/runner/connection\_plugins/winrm.py as expected in [winrm.py: protocol.send\_message('') crashes with https · Issue #8720 · ansible/ansible · GitHub](https://github.com/ansible/ansible/issues/8720) , my problem is that when I run the ping test, this is what I get:

> ansible windows\_hosts -m win\_ping  
> WINSRV-01 | FAILED =\> 500 WinRMTransport. [SSL: UNKNOWN\_PROTOCOL] unknown protocol (\_ssl.c:581)

Any idea?

I’m running ansible 1.7.2 (Debian package: ansible-1.7.2+dfsg-2 on Debian Jessie).

Tom

---

<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:** [May 1, 2015, 11:36pm UTC](https://forum.ansible.com/t/winrm-py-tries-ssl-handshake-on-winrm-http-port/18126/2 "2015-05-01T23:36:05Z")

</div>

Can you run with -vvvvv - we might see the whole of the error?

Also can you share your group\_vars for windows\_hosts ?

My guess is you are missing a python dependency.

As an aside you might be able to install a more recent ansible from [releases.ansible.com](http://releases.ansible.com) if you can work with the tar.gz

Jon
