Errno 104 Connection reset by error peer`

I have the following piece of code. It used to work fine and print the output

But after that, when I changed my physical location in a machine on the same network, I get the error: [Errno 104] Connection reset by peer

same IP error for the machine.

I am using Scientific Linux 6.1

 operation='GET'
 url="/apifactory/api"
 url_request = "%s HTTP/1.1" %url
 connect = httplib.HTTPSConnection('myhost.com')
 try:
      connect.request(operation,url_request,'')
 except Exception,obj:
      connect.close()
      print traceback.format_exc()


 response_obj=connect.getresponse()
 data=response_obj.read()
 connect.close()
 print data


Traceback:
  File "/usr/local/lib/python2.7/ssl.py", line 121, in __init__
  self.do_handshake()
  File "/usr/local/lib/python2.7/ssl.py", line 281, in do_handshake
  self._sslobj.do_handshake()
  error: [Errno 104] Connection reset by peer

      

I tried using openssl s_client -connect myhost.com:443

It gives:

  CONNECTED(00000003)
  write:errno=104
  no peer certificate available
  No client certificate CA names sent
  SSL handshake has read 0 bytes and written 113 bytes
  New, (NONE), Cipher is (NONE)
  Secure Renegotiation IS NOT supported
  Compression: NONE
  Expansion: NONE

      

All work is stopped before changing location. What could be the reason? are there any changes regarding opesssl configuration or certification?

+3


source to share





All Articles