# Ansible winrm Read timed out when running win\_update - intermittent

**URL:** <https://forum.ansible.com/t/ansible-winrm-read-timed-out-when-running-win-update-intermittent/35509>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [July 15, 2021, 9:11pm UTC](https://forum.ansible.com/t/ansible-winrm-read-timed-out-when-running-win-update-intermittent/35509 "2021-07-15T21:11:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert\_Rozek](https://avatars.discourse-cdn.com/v4/letter/r/48db29/32.png) [@Robert\_Rozek](https://forum.ansible.com/u/Robert_Rozek)\
**Post date:** [July 15, 2021, 9:11pm UTC](https://forum.ansible.com/t/ansible-winrm-read-timed-out-when-running-win-update-intermittent/35509/1 "2021-07-15T21:11:52Z")

</div>

Hello,

I have this intermittent issue where, when Windows Server servers are patching or rebooting I would get WinRM -Read Timed out. This is occruing intermittently so I cannot freely replicate it.

Normally this wouldn’t be an issue with normal servers, however the applications that we are running on the servers are quite critical. eg. When this happens the db is left in recovery state, what then breaks the resiliency.

The output that I am getting when the job fails

_TASK [Installing Windows Updates on Primary DB Server && reboot] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*_  
_20:14:07_

_1040_  
**_task path: /tmp/awx\_66642\_qb953vkg/project/ITLIB\_dbserver\_patch.yml:421_**

_1041_  
_win\_updates: running win\_updates module_

_1042_  
_Using module file /usr/lib/python3.6/site-packages/ansible/modules/windows/win\_updates.ps1_

_1043_  
_Pipelining is enabled._

_1044_  
_\<172.22.65.202\> ESTABLISH WINRM CONNECTION FOR USER: support on PORT 5986 TO 172.22.65.202_

_1045_  
_EXEC (via pipeline wrapper)_

_1046_  
**_fatal: [172.22.65.202]: UNREACHABLE! =\> {_**

_1047_  
**_“changed”: false,_**

_1048_  
**_“msg”: “winrm connection error: HTTPSConnectionPool(host=‘172.22.65.202’, port=5986): Read timed out. (read timeout=3600)”,_**

_1049_  
**_“unreachable”: true_**

_1050_  
**_}_**

_1051_

_1052_

The task that is being run:

#----------- Running Windows updates on Primary Server and reboot. ----#

- name: Installing Windows Updates on Primary DB Server && reboot  
win\_updates:  
category\_names:
- SecurityUpdates
- CritialUpdates
- UpdateRollups
- Updates
- Drivers
- DefinitionUpdates
- WindowsDefender

blacklist:

- KB3061064  
reboot: yes  
reboot\_timeout: 3600  
when:
- inventory\_hostname in primary.db
- updates1.found\_update\_count \> 0  
register: wu3  
ignore\_errors: yes

Hosts file connection vars:

ansible\_port: 5986  
ansible\_connection: winrm  
ansible\_winrm\_scheme: HTTPS  
ansible\_winrm\_server\_cert\_validation: ignore  
ansible\_winrm\_read\_timeout\_sec: 3600

please help as I am pulling my hair out trying to resolve it.
