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
python openssl httplib


source to share


No one has answered this question yet

See similar questions:

3
Why am I seeing the message "communication reset by peer"?
2
Sample Python SSL protocol from docs gives message "Connection reset by peer"

or similar:

1086
How to connect to MySQL database in Python?
five
Error while using httlib HTTPSConnection with PKCS # 12 certificate
1
easy_install ReviewBoard [Errno 104] Connection reset by peer
0
openssl s_client Proxy TLS connection with clientAuth
0
OPENSSL s_cient request failed (request timed out 408)
0
package installation error "Cause of SSLError in Linux
0
SSL_connect: error in SSLv3 to read server A certificate
0
Python mysql (using pymysql) cannot connect
0
Why can't curl / OpenSSL fetch a website that chrome + firefox can use?
0
Getting file errors after creating python script called ssl.py



All Articles
Loading...
X
Show
Funny
Dev
Pics