# EOF occurred in violation of protocol

**URL:** <https://forum.ansible.com/t/eof-occurred-in-violation-of-protocol/27174>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [April 3, 2018, 8:06am UTC](https://forum.ansible.com/t/eof-occurred-in-violation-of-protocol/27174 "2018-04-03T08:06:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chanond](https://avatars.discourse-cdn.com/v4/letter/c/df788c/32.png) [@chanond](https://forum.ansible.com/u/chanond)\
**Post date:** [April 3, 2018, 8:06am UTC](https://forum.ansible.com/t/eof-occurred-in-violation-of-protocol/27174/1 "2018-04-03T08:06:07Z")

</div>

I am setting up ansible on a new device using the following step.

Machine setup: Windows 10 with WSL enabled

`sudo apt-get-y install python-pip python-dev libffi-dev libssl-dev pip install ansible --user echo`PATH=$HOME/.local/bin:$PATH`>> ~/.bashrc pip install "pywinrm>=0.2.2"`

I wrote a simple win\_ping module with the correct username and password. It is returning this error

> > fatal: [192.168.6.1]: UNREACHABLE! =\> {
> 
> > “changed”: false,
> 
> > “msg”: “ssl: HTTPSConnectionPool(host=‘192.168.6.1’, port=5986): Max retries exceeded with url: /wsman (Caused by SSLError(SSLEOFError(8, u’EOF occurred in violation of protocol (\_ssl.c:590)'),))”,
> 
> > “unreachable”: true
> 
> > }

I’m not sure what I’m doing wrong. My other machine which I also setup using the same credentials with similar steps is currently working fine. Please help.

---

<div class="post-metadata">

**Author:** ![chanond](https://avatars.discourse-cdn.com/v4/letter/c/df788c/32.png) [@chanond](https://forum.ansible.com/u/chanond)\
**Post date:** [April 3, 2018, 8:09am UTC](https://forum.ansible.com/t/eof-occurred-in-violation-of-protocol/27174/2 "2018-04-03T08:09:16Z")

</div>

This is my verbose output

`

TASK [Gathering Facts] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
task path: /mnt/c/ansible/test.yml:1  
Using module file /home/xxxxxx/.local/lib/python2.7/site-packages/ansible/modules/windows/setup.ps1  
\<192.168.6.1\> ESTABLISH WINRM CONNECTION FOR USER: xxxx on PORT 5986 TO 192.168.6.1  
checking if winrm\_host 192.168.6.1 is an IPv6 address  
\<192.168.6.1\> WINRM CONNECT: transport=ssl endpoint=[https://192.168.6.1:5986/wsman](https://192.168.6.1:5986/wsman)  
\<192.168.6.1\> WINRM CONNECTION ERROR: HTTPSConnectionPool(host=‘192.168.6.1’, port=5986): Max retries exceeded with url: /wsman (Caused by SSLError(SSLEOFError(8, u’EOF occurred in violation of protocol (\_ssl.c:590)‘),))  
Traceback (most recent call last):  
File “/home/chanondw/.local/lib/python2.7/site-packages/ansible/plugins/connection/winrm.py”, line 345, in \_winrm\_connect  
self.shell\_id = protocol.open\_shell(codepage=65001) # UTF-8  
File “/home/chanondw/.local/lib/python2.7/site-packages/winrm/protocol.py”, line 157, in open\_shell  
res = self.send\_message(xmltodict.unparse(req))  
File “/home/chanondw/.local/lib/python2.7/site-packages/winrm/protocol.py”, line 234, in send\_message  
resp = self.transport.send\_message(message)  
File “/home/chanondw/.local/lib/python2.7/site-packages/winrm/transport.py”, line 256, in send\_message  
response = self.\_send\_message\_request(prepared\_request, message)  
File “/home/chanondw/.local/lib/python2.7/site-packages/winrm/transport.py”, line 261, in \_send\_message\_request  
response = self.session.send(prepared\_request, timeout=self.read\_timeout\_sec)  
File “/home/chanondw/.local/lib/python2.7/site-packages/requests/sessions.py”, line 618, in send  
r = adapter.send(request, \*\*kwargs)  
File “/home/chanondw/.local/lib/python2.7/site-packages/requests/adapters.py”, line 506, in send  
raise SSLError(e, request=request)  
SSLError: HTTPSConnectionPool(host=‘192.168.6.1’, port=5986): Max retries exceeded with url: /wsman (Caused by SSLError(SSLEOFError(8, u’EOF occurred in violation of protocol (\_ssl.c:590)’),))

`
