What version of pywinrm are you using? 0.3.0 is released now and among other changes this version has better error reporting. Worth upgrading to 0.3.0 if you can.
I have occasionally encountered this 'Bad HTTP response returned from server: Code 500' and in all the cases I have encountered so far either something interrupted the networking on the windows box (usually a reboot) or the machine was busy 100 % cpu utilization (almost always because it has been recompiling .net code following the release of a new .net version via windows updates). Jon On Wednesday, January 31, 2018 at 1:00:03 PM UTC, SrinivasaRao Nallapati wrote: > > Hello, > Is this resolved. > > I am also getting same issue. Please help me . > > Using module file > /usr/local/lib/python2.7/dist-packages/ansible-2.4.1.0-py2.7.egg/ansible/modules/windows/win_ping.ps1 > <KOR1074638.kor.apac.bosch.com> ESTABLISH WINRM CONNECTION FOR USER: > l...@apac.com <javascript:> on PORT 5986 TO <hostname> > <KOR1074638.kor.apac.bosch.com> WINRM CONNECT: transport=ntlm > endpoint=https://<hostname>:5986/wsman > Using module file > /usr/local/lib/python2.7/dist-packages/ansible-2.4.1.0-py2.7.egg/ansible/modules/windows/win_ping.ps1 > <10.47.115.103> ESTABLISH WINRM CONNECTION FOR USER: l...@apac..com on PORT > 5986 TO 10.47.115.103 > <10.47.115.103> WINRM CONNECT: transport=ntlm > endpoint=https://<hostname>:5986/wsman > <KOR1074638.kor.apac.bosch.com> WINRM CONNECTION ERROR: (u'http', u'Bad > HTTP response returned from server. Code 500') > Traceback (most recent call last): > File > "/usr/local/lib/python2.7/dist-packages/ansible-2.4.1.0-py2.7.egg/ansible/plugins/connection/winrm.py", > > line 222, in _winrm_connect > self.shell_id = protocol.open_shell(codepage=65001) # UTF-8 > File "/usr/local/lib/python2.7/dist-packages/winrm/protocol.py", line > 132, in open_shell > res = self.send_message(xmltodict.unparse(req)) > File "/usr/local/lib/python2.7/dist-packages/winrm/protocol.py", line > 207, in send_message > return self.transport.send_message(message) > File "/usr/local/lib/python2.7/dist-packages/winrm/transport.py", line > 202, in send_message > raise WinRMTransportError('http', error_message) > WinRMTransportError: (u'http', u'Bad HTTP response returned from server. > Code 500') > > > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/0d87b478-23f0-4c59-9e4c-267e94794263%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.