WinRMTransportError: Bad HTTP response returned from server. Code 500

Hi ,

I am trying to copy file to windows using win_copy and file size is around 20 mb , i am getting following error

Traceback (most recent call last):
File “/usr/lib/python2.6/site-packages/ansible/runner/connection_plugins/winrm.py”, line 198, in put_file
result = self._winrm_exec(cmd_parts[0], cmd_parts[1:])
File “/usr/lib/python2.6/site-packages/ansible/runner/connection_plugins/winrm.py”, line 125, in _winrm_exec
command_id = self.protocol.run_command(self.shell_id, command, args)
File “/usr/lib/python2.6/site-packages/winrm/protocol.py”, line 232, in run_command
rs = self.send_message(xmltodict.unparse(rq))
File “/usr/lib/python2.6/site-packages/winrm/protocol.py”, line 173, in send_message
return self.transport.send_message(message)
File “/usr/lib/python2.6/site-packages/winrm/transport.py”, line 95, in send_message
raise WinRMTransportError(error_message)
WinRMTransportError: Bad HTTP response returned from server. Code 500

Any idea on this … please suggest me if anyone faced this issue.

Thanks
Ravi

I think there are others who have experienced something similar:

https://github.com/ansible/ansible/issues/9980

It is possible that you are hitting one of the quota limits set in the winrm configuration - https://msdn.microsoft.com/en-us/library/ee309367(v=vs.85).aspx

Personally I only use win_copy to push out small files usually less than 1Mb. To transfer large binary files it is much quicker to use the win_get_url module to make the remote host retrieve them.

Jon