ansible / ansible-modules-core

Ansible modules - these modules ship with ansible
1.3k stars 1.95k forks source link

win_copy with error "Connection reset by peer" #5852

Closed BarryCui closed 7 years ago

BarryCui commented 7 years ago
ISSUE TYPE
COMPONENT NAME

win_copy

ANSIBLE VERSION
2.2.0.0
CONFIGURATION
OS / ENVIRONMENT

ansible server: CentOS7 managed server: Windows Server 2008R2SP1

SUMMARY

copy files from centos to windows, I reset the timeout value to more than 10000 and it still causes a connection reset error.

STEPS TO REPRODUCE

By using win_copy, copying files with Chinese filenames, directories and contents included, it first causes timeout error, then I expanded the values, and it causes this Connection reset by peer error.

EXPECTED RESULTS

The files and folders should've been copied to the windows server

ACTUAL RESULTS

[WARNING]: FATAL ERROR DURING FILE TRANSFER: Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/ansible/plugins/connection/winrm.py", line 207, in _winrm_exec self._winrm_send_input(self.protocol, self.shell_id, command_id, data, eof=is_last) File "/usr/lib/python2.7/site-packages/ansible/plugins/connection/winrm.py", line 188, in _winrm_send_input protocol.send_message(xmltodict.unparse(rq)) File "/usr/lib/python2.7/site- packages/winrm/protocol.py", line 207, in send_message return self.transport.send_message(message) File "/usr/lib/python2.7/site-packages/winrm/transport.py", line 173, in send_message response = self.session.send(prepared_request, timeout=self.read_timeout_sec) File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 609, in send r = adapter.send(request, **kwargs) File "/usr/lib/python2.7/site- packages/requests/adapters.py", line 472, in send raise ConnectionError(err, request=request) ConnectionError: ('Connection aborted.', error(104, 'Connection reset by peer')) fatal: [10.1.40.36]: FAILED! => {"failed": true, "msg": "winrm send_input failed"} to retry, use: --limit @/etc/ansible/copy_to_servers.retry

ansibot commented 7 years ago

This repository has been locked. All new issues and pull requests should be filed in https://github.com/ansible/ansible

Please read through the repomerge page in the dev guide.