-
Notifications
You must be signed in to change notification settings - Fork 23.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ansible 2.3.1 WinRM issue(WinRM service stopping during playbook execution) #30765
Comments
Does the playbook fail consistently at the same point? From this page: http://docs.ansible.com/ansible/latest/intro_windows.html
needs_info |
@jhawkesworth Yes its failing at the last step. First task inside the playbook is to copy ZIP file to wndows server, unzip it and then run the core installer and later Clean up TEMP; I did increase values mentioned by you before.. But even after changing the values its not making any impact.. ansible_winrm_operation_timeout_sec: 200 I tried async option too.. Thats failing as well I am also assuming network issue and I am using NTLM for authentication |
@ganjihalsanjeev - if the installer interrupts the network connection, then I think the most likely thing that might work is to use a scheduled task to run the installer. Also I suggest trying to get your installer to log progress to a file so you can see what it is doing and at what point it fails. Please can you try using a scheduled task to run your installer? needs_info |
@ganjihalsanjeev If you feel adventurous but want to help fixing this for good, please test out my patch at: diyan/pywinrm#174 And provide feedback. |
@jhawkesworth Thanks for guiding me. The core installer is stopping WINRM service. That is why the service is going down. We will update our installer package. @dagwieers Thank you! This issue is totally related to the installer that I am using. The installer is the culprit. |
@sanjeevrg473 Is it stopping the WinRM service, or restarting it ? Both would have the exact same effects on Ansible at this time. But the fix at diyan/pywinrm#174 will recover by trying 5 times with 5 seconds delay in order to let Ansible continue to work when the WinRM service is restarted. |
@dagwieers So you want me to use include the transport.py in the playbooks location? Do I have to make any changes in ansible.cfg? |
So edit your pywinrm's transport.py by hand and perform the patch that is in the PR if you would like to test this. Replacing transport.py is not recommended, because it depends on the pywinrm version you have in use. No changes in ansible.cfg are necessary. (Reading that python code should be pretty obvious in to what it does) |
ISSUE TYPE
COMPONENT NAME
WINRM issue with Windows Server 2012 R2
WINRM service is stopping during playbook execution
ANSIBLE VERSION
ansible 2.3.1.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides
python version = 2.7.13 (default, Jan 11 2017, 10:56:06) [GCC]
CONFIGURATION
OS / ENVIRONMENT
SUMMARY
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ConnectionError: HTTPSConnectionPool(host='xxxx', port=5986): Max retries exceeded with url: /wsman (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f968d070990>: Failed to establish a new connection: [Errno 111] Connection refused',))
fatal: [xxx]: FAILED! => {"failed": true, "msg": "Unexpected failure during module execution.", "stdout": ""}
to retry, use: --limit @/etc/ansible/xxx.retry
STEPS TO REPRODUCE
Running ansible-playbook xx.yaml to install packages on Win 2012 R2
EXPECTED RESULTS
Installation should be successful and it should move to next task within the playbook of cleaning TEMP
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: