Errno 104连接由peer`错误重置

时间:2013-02-06 10:11:04

标签: python openssl httplib

我有以下代码段。以前它工作正常,打印输出

但是现在我确实改变了我的机器在同一网络中的物理位置 我收到error: [Errno 104] Connection reset by peer错误 机器的IP是相同的。

我正在使用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

我试过openssl s_client -connect myhost.com:443它给出了:

  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

在更改位置之前一切正常。可能的原因是什么?关于opesssl配置或认证有什么变化吗?

0 个答案:

没有答案