Comments (6)
From @samdoran on Sep 20, 2019 19:11
I am unable to reproduce this problem. I see the connection attempts while the system reboots, then the task complete successfully.
76839 1569006375.37396: win_reboot: getting boot time with command: '(Get-WmiObject -ClassName Win32_OperatingSystem).LastBootUpTime'
<10.77.1.51> ESTABLISH WINRM CONNECTION FOR USER: vagrant on PORT 5985 TO 10.77.1.51
76839 1569006375.78557: win_reboot: last boot time: 20190920190540.492950+000
76839 1569006375.78560: win_reboot: saving original connect_timeout of 90
win_reboot: rebooting server...
76839 1569006375.78579: win_reboot: distribution: {'name': 'windows', 'version': '', 'family': ''}
76839 1569006375.78583: win_reboot: rebooting server with command 'PowerShell -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -EncodedCommand UwBlAHQALQBTAHQAcgBpAGMAdABNAG8AZABlACAALQBWAGUAcgBzAGkAbwBuACAATABhAHQAZQBzAHQACgBzAGgAdQB0AGQAbwB3AG4AIAAvAHIAIAAvAHQAIAAyACAALwBjACAAIgBSAGUAYgBvAG8AdAAgAGkAbgBpAHQAaQBhAHQAZQBkACAAYgB5ACAAQQBuAHMAaQBiAGwAZQAiAAoASQBmACAAKAAtAG4AbwB0ACAAJAA/ACkAIAB7ACAASQBmACAAKABHAGUAdAAtAFYAYQByAGkAYQBiAGwAZQAgAEwAQQBTAFQARQBYAEkAVABDAE8ARABFACAALQBFAHIAcgBvAHIAQQBjAHQAaQBvAG4AIABTAGkAbABlAG4AdABsAHkAQwBvAG4AdABpAG4AdQBlACkAIAB7ACAAZQB4AGkAdAAgACQATABBAFMAVABFAFgASQBUAEMATwBEAEUAIAB9ACAARQBsAHMAZQAgAHsAIABlAHgAaQB0ACAAMQAgAH0AIAB9AA=='
win_reboot: validating reboot
win_reboot: attempting to get system boot time
76839 1569006376.29580: win_reboot: setting connect_timeout to 60
<10.77.1.51> ESTABLISH WINRM CONNECTION FOR USER: vagrant on PORT 5985 TO 10.77.1.51
76839 1569006376.35241: win_reboot: getting boot time with command: '(Get-WmiObject -ClassName Win32_OperatingSystem).LastBootUpTime'
76839 1569006376.67783: win_reboot: last boot time: 20190920190540.492950+000
76839 1569006376.67794: win_reboot: last boot time check fail 'boot time has not changed', retrying in 1.48 seconds...
win_reboot: attempting to get system boot time
76839 1569006378.15874: win_reboot: setting connect_timeout to 60
<10.77.1.51> ESTABLISH WINRM CONNECTION FOR USER: vagrant on PORT 5985 TO 10.77.1.51
76839 1569006378.20622: win_reboot: getting boot time with command: '(Get-WmiObject -ClassName Win32_OperatingSystem).LastBootUpTime'
76839 1569006378.55017: win_reboot: last boot time: 20190920190540.492950+000
76839 1569006378.55022: win_reboot: last boot time check fail 'boot time has not changed', retrying in 2.466 seconds...
win_reboot: attempting to get system boot time
76839 1569006381.01682: win_reboot: setting connect_timeout to 60
<10.77.1.51> ESTABLISH WINRM CONNECTION FOR USER: vagrant on PORT 5985 TO 10.77.1.51
76839 1569006381.07872: win_reboot: getting boot time with command: '(Get-WmiObject -ClassName Win32_OperatingSystem).LastBootUpTime'
76839 1569006381.44018: win_reboot: last boot time: 20190920190540.492950+000
76839 1569006381.44023: win_reboot: last boot time check fail 'boot time has not changed', retrying in 4.767 seconds...
win_reboot: attempting to get system boot time
76839 1569006386.20831: win_reboot: setting connect_timeout to 60
<10.77.1.51> ESTABLISH WINRM CONNECTION FOR USER: vagrant on PORT 5985 TO 10.77.1.51
76839 1569006393.40274: win_reboot: getting boot time with command: '(Get-WmiObject -ClassName Win32_OperatingSystem).LastBootUpTime'
76839 1569006399.19239: win_reboot: last boot time: 20190920190626.488380+000
76839 1569006399.19243: win_reboot: last boot time check success
76839 1569006399.19246: win_reboot: setting connect_timeout back to original value of 90
<10.77.1.51> ESTABLISH WINRM CONNECTION FOR USER: vagrant on PORT 5985 TO 10.77.1.51
win_reboot: attempting post-reboot test command
76839 1569006399.29016: win_reboot: attempting post-reboot test command 'whoami'
win_reboot: system successfully rebooted
76839 1569006399.73707: win_reboot: post-reboot test command success
Can you please run env ANSIBLE_DEBUG=1 ansible-playbook [playbook].yml -vvv | grep -E 'reboot: |WINRM'
However, since reboot is initiated I validated that Ansible is NOT sending any more wsman protocol action...
Could you do a packet capture on the Ansible node to see if the packets are leaving the Ansible control node? If the Windows machine does indeed boot, could you perform a packet capture on the Windows hosts to see if it is receiving the packets?
needs_info
from ansible.windows.
From @vfuyong on Oct 10, 2019 11:26
@samdoran Attached logs here.
env ANSIBLE_DEBUG=1 ansible-playbook <host file> reboot.yml -vvv | grep -E 'reboot: |WINRM'
81 1570706611.42800: win_reboot: getting boot time with command: '(Get-WmiObject -ClassName Win32_OperatingSystem).LastBootUpTime'
<windows01> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 5002 TO windows01
81 1570706616.30026: win_reboot: last boot time: 20191010151721.488799+240
81 1570706616.30029: win_reboot: saving original connect_timeout of None
win_reboot: rebooting server...
81 1570706616.30039: win_reboot: distribution: {'version': '', 'name': 'windows', 'family': ''}
81 1570706616.30041: win_reboot: rebooting server with command 'PowerShell -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -EncodedCommand UwBlAHQALQBTAHQAcgBpAGMAdABNAG8AZABlACAALQBWAGUAcgBzAGkAbwBuACAATABhAHQAZQBzAHQACgBzAGgAdQB0AGQAbwB3AG4AIAAvAHIAIAAvAHQAIAAyACAALwBjACAAIgBSAGUAYgBvAG8AdAAgAGkAbgBpAHQAaQBhAHQAZQBkACAAYgB5ACAAQQBuAHMAaQBiAGwAZQAiAAoASQBmACAAKAAtAG4AbwB0ACAAJAA/ACkAIAB7ACAASQBmACAAKABHAGUAdAAtAFYAYQByAGkAYQBiAGwAZQAgAEwAQQBTAFQARQBYAEkAVABDAE8ARABFACAALQBFAHIAcgBvAHIAQQBjAHQAaQBvAG4AIABTAGkAbABlAG4AdABsAHkAQwBvAG4AdABpAG4AdQBlACkAIAB7ACAAZQB4AGkAdAAgACQATABBAFMAVABFAFgASQBUAEMATwBEAEUAIAB9ACAARQBsAHMAZQAgAHsAIABlAHgAaQB0ACAAMQAgAH0AIAB9AA=='
win_reboot: validating reboot
win_reboot: attempting to get system boot time
81 1570706636.39898: win_reboot: setting connect_timeout to 60
<windows01> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 5002 TO windows01
<windows01> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 5002 TO windows01
81 1570706636.40137: win_reboot: last boot time check fail 'ssl: coercing to Unicode: need string or buffer, int found', retrying in 1.484 seconds...
win_reboot: attempting to get system boot time
81 1570706637.88585: win_reboot: setting connect_timeout to 60
<windows01> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 5002 TO windows01
<windows01> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 5002 TO windows01
81 1570706637.88672: win_reboot: last boot time check fail 'ssl: coercing to Unicode: need string or buffer, int found', retrying in 2.994 seconds...
win_reboot: attempting to get system boot time
81 1570706640.88134: win_reboot: setting connect_timeout to 60
<windows01> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 5002 TO windows01
<windows01> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 5002 TO windows01
81 1570706640.88227: win_reboot: last boot time check fail 'ssl: coercing to Unicode: need string or buffer, int found', retrying in 4.182 seconds...
win_reboot: attempting to get system boot time
81 1570706645.06524: win_reboot: setting connect_timeout to 60
<windows01> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 5002 TO windows01
<windows01> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 5002 TO windows01
81 1570706645.06617: win_reboot: last boot time check fail 'ssl: coercing to Unicode: need string or buffer, int found', retrying in 8.276 seconds...
win_reboot: attempting to get system boot time
81 1570706653.34254: win_reboot: setting connect_timeout to 60
<windows01> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 5002 TO windows01
<windows01> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 5002 TO windows01
81 1570706653.34308: win_reboot: last boot time check fail 'ssl: coercing to Unicode: need string or buffer, int found', retrying in 12.63 seconds...
win_reboot: attempting to get system boot time
81 1570706665.97546: win_reboot: setting connect_timeout to 60
<windows01> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 5002 TO windows01
<windows01> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 5002 TO windows01
81 1570706665.97609: win_reboot: last boot time check fail 'ssl: coercing to Unicode: need string or buffer, int found', retrying in 12.39 seconds...
from ansible.windows.
From @samdoran on Oct 14, 2019 14:15
@vfuyong Thank for the detailed logs. That helps a lot. I can see the problem. The fix isn't clear, but I have enough to investigate further.
from ansible.windows.
From @vfuyong on Oct 17, 2019 12:03
@samdoran Do you know what can cause 'ssl: coercing to Unicode: need string or buffer, int found'? I am using WinRM over HTTPS.
from ansible.windows.
From @ShachafGoldstein on Nov 17, 2019 07:01
What version of pywinrm are you using?
from ansible.windows.
@jborean93 i have a customer running into this issue with pywinrm 0.3.0, will ask them to upgrade to latest and verify if anything changes
from ansible.windows.
Related Issues (20)
- win_get_url does not respect content-disposition HOT 1
- win_update failed since ansible 7.7.0 HOT 3
- win_update show different trigger in Event Viewer HOT 1
- ansible.windows.win_powershell misinterprets block scalar (string block) HOT 2
- win_package: support checksum verification HOT 2
- intermittent winrm connection failures with large hosts count HOT 8
- intermittent "unable to delete temporary file" errors HOT 9
- Win_updates fail with "Exception from HRESULT: 0x80072EE2" HOT 2
- Windows Update Module not installing any updates HOT 4
- Windows update failes due to update loop HOT 3
- win_environment : Maybe add an option to read variable content ? HOT 5
- Error during machine sid retrieval: An error (1788) occurred while enumerating the group membership. The member's SID could not be resolved. HOT 8
- Access denied after renaming windows host : Server not found in Kerberos database HOT 10
- Failed to create temporary directory when running win_template module against Windows Server 2019 HOT 10
- win_copy doesnt work when folder name has special character HOT 2
- Add account_expires functionality from the Set-LocalUser PowerShell Cmdlet HOT 2
- Using Machine credentials from AAP passed to playbook with ansible.windows.win_copy fails HOT 2
- ERROR DURING WINRM SEND INPUT - attempting to recover: WinRMTransportError Bad HTTP response returned from server. Code 413 HOT 1
- win_copy module not handling an invalid path correctly. HOT 1
- Feature request: A better win_acl module HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible.windows.