2017-03-03 15 views
0

httpsの場所にログインしようとしていますが、このエラーに直面しています。私はこの問題を引き起こしているのか分かりません。誰もがこれで私を助けることができますか?Python SSLの接続エラー

2017-03-03T12:00:23: %T-ERROR: Caught exception during execution: 
2017-03-03T12:00:23: %T-ERROR: Traceback (most recent call last): 
2017-03-03T12:00:23: %T-ERROR: File "usr/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 600, in urlopen 
2017-03-03T12:00:23: %T-ERROR:  chunked=chunked) 
2017-03-03T12:00:23: %T-ERROR: File "usr/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 345, in _make_request 
2017-03-03T12:00:23: %T-ERROR:  self._validate_conn(conn) 
2017-03-03T12:00:23: %T-ERROR: File "usr/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 844, in _validate_conn 
2017-03-03T12:00:23: %T-ERROR:  conn.connect() 
2017-03-03T12:00:23: %T-ERROR: File "usr/lib/python3.4/site-packages/requests/packages/urllib3/connection.py", line 326, in connect 
2017-03-03T12:00:23: %T-ERROR:  ssl_context=context) 
2017-03-03T12:00:23: %T-ERROR: File "usr/lib/python3.4/site-packages/requests/packages/urllib3/util/ssl_.py", line 336, in ssl_wrap_socket 
2017-03-03T12:00:23: %T-ERROR:  return context.wrap_socket(sock) 
2017-03-03T12:00:23: %T-ERROR: File "/auto/pysw/cel55/python/3.4.1/lib/python3.4/ssl.py", line 364, in wrap_socket 
2017-03-03T12:00:23: %T-ERROR:  _context=self) 
2017-03-03T12:00:23: %T-ERROR: File "/auto/pysw/cel55/python/3.4.1/lib/python3.4/ssl.py", line 578, in __init__ 
2017-03-03T12:00:23: %T-ERROR:  self.do_handshake() 
2017-03-03T12:00:23: %T-ERROR: File "/auto/pysw/cel55/python/3.4.1/lib/python3.4/ssl.py", line 805, in do_handshake 
2017-03-03T12:00:23: %T-ERROR:  self._sslobj.do_handshake() 
2017-03-03T12:00:23: %T-ERROR: ConnectionResetError: [Errno 104] Connection reset by peer 
2017-03-03T12:00:23: %T-ERROR: 
2017-03-03T12:00:23: %T-ERROR: During handling of the above exception, another exception occurred: 
2017-03-03T12:00:23: %T-ERROR: 
2017-03-03T12:00:23: %T-ERROR: Traceback (most recent call last): 
2017-03-03T12:00:23: %T-ERROR: File "usr/lib/python3.4/site-packages/requests/adapters.py", line 423, in send 
2017-03-03T12:00:23: %T-ERROR:  timeout=timeout 
2017-03-03T12:00:23: %T-ERROR:File "usr/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 649, in urlopen 
2017-03-03T12:00:23: %T-ERROR: stacktrace=sys.exc_info()[2]) 
2017-03-03T12:00:23: %T-ERROR: File "usr/lib/python3.4/site-packages/requests/packages/urllib3/util/retry.py", line 347, in increment 
2017-03-03T12:00:23: %T-ERROR:  raise six.reraise(type(error), error, _stacktrace) 
2017-03-03T12:00:23: %T-ERROR: File "usr/lib/python3.4/site-packages/requests/packages/urllib3/packages/six.py", line 685, in reraise 
2017-03-03T12:00:23: %T-ERROR:  raise value.with_traceback(tb) 
2017-03-03T12:00:23: %T-ERROR: File "usr/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 600, in urlopen 
2017-03-03T12:00:23: %T-ERROR:  chunked=chunked) 
2017-03-03T12:00:23: %T-ERROR: File "usr/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 345, in _make_request 
2017-03-03T12:00:23: %T-ERROR:  self._validate_conn(conn) 
2017-03-03T12:00:23: %T-ERROR: File "usr/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 844, in _validate_conn 
2017-03-03T12:00:23: %T-ERROR:  conn.connect() 
2017-03-03T12:00:23: %T-ERROR: File "usr/lib/python3.4/site-packages/requests/packages/urllib3/connection.py", line 326, in connect 
2017-03-03T12:00:23: %T-ERROR:  ssl_context=context) 
2017-03-03T12:00:23: %T-ERROR: File "usr/lib/python3.4/site-packages/requests/packages/urllib3/util/ssl_.py", line 336, in ssl_wrap_socket 
2017-03-03T12:00:23: %T-ERROR:  return context.wrap_socket(sock) 
2017-03-03T12:00:23: %T-ERROR: File "/auto/pysw/cel55/python/3.4.1/lib/python3.4/ssl.py", line 364, in wrap_socket 
2017-03-03T12:00:23: %T-ERROR:  _context=self) 
2017-03-03T12:00:23: %T-ERROR: File "/auto/pysw/cel55/python/3.4.1/lib/python3.4/ssl.py", line 578, in __init__ 
2017-03-03T12:00:23: %T-ERROR:  self.do_handshake() 
2017-03-03T12:00:23: %T-ERROR: File "/auto/pysw/cel55/python/3.4.1/lib/python3.4/ssl.py", line 805, in do_handshake 
2017-03-03T12:00:23: %T-ERROR:  self._sslobj.do_handshake() 
2017-03-03T12:00:23: %T-ERROR: requests.packages.urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 
2017-03-03T12:00:23: %T-ERROR: 
2017-03-03T12:00:23: %T-ERROR: During handling of the above exception, another exception occurred: 
2017-03-03T12:00:23: %T-ERROR: 
2017-03-03T12:00:23: %T-ERROR: Traceback (most recent call last): 
2017-03-03T12:00:23: %T-ERROR: File "usr/scripts/new_script.py", line 57, in setup 
2017-03-03T12:00:23: %T-ERROR:  t.cfgmpbgp(rrnode = '201', local = '100') 
2017-03-03T12:00:23: %T-ERROR: File "usr/scripts/new.py", line 28, in wrapper 
2017-03-03T12:00:23: %T-ERROR:  resp=requests.post(url,data=data,headers=headers,verify=False,cookies=cookies) 
2017-03-03T12:00:23: %T-ERROR: File "usr/lib/python3.4/site-packages/requests/api.py", line 110, in post 
2017-03-03T12:00:23: %T-ERROR:  return request('post', url, data=data, json=json, **kwargs) 
2017-03-03T12:00:23: %T-ERROR: File "usr/lib/python3.4/site-packages/requests/api.py", line 56, in request 
2017-03-03T12:00:23: %T-ERROR:  return session.request(method=method, url=url, **kwargs) 
2017-03-03T12:00:23: %T-ERROR: File "usr/lib/python3.4/site-packages/requests/sessions.py", line 488, in request 
2017-03-03T12:00:23: %T-ERROR:  resp = self.send(prep, **send_kwargs) 
2017-03-03T12:00:23: %T-ERROR: File "usr/lib/python3.4/site-packages/requests/sessions.py", line 609, in send 
2017-03-03T12:00:23: %T-ERROR:  r = adapter.send(request, **kwargs) 
2017-03-03T12:00:23: %T-ERROR: File "usr/lib/python3.4/site-packages/requests/adapters.py", line 473, in send 
2017-03-03T12:00:23: %T-ERROR:  raise ConnectionError(err, request=request) 

誰でもこのエラーが表示されますか?

ConnectionResetError(104, 'Connection reset by peer') 

このエラーは、SSL関連ではないようですが、ネットワークが関連:

は、私はまた、あなたが得る、一言で言えば、この

import urllib.request 
from urllib.request import Request, urlopen 

答えて

1

含めてみました。 単純なTCP接続の開始(たとえば、telnet <host> <port>の使用)は機能しますか? プロキシを経由する必要はありませんか? requests.post()にproxiesパラメータを使用できます(proxies={'https': 'http://yourproxy:port/'}

+0

私はそれを試しました。私は今、次のエラーが発生しています: – Ree

+0

私はそれを試してみました。 '2017-03-03T14:17:59:%T-ERROR:requests.exceptions.ProxyError:HTTPSConnectionPool(host =' 1.1.1.1 '、port = 443):最大再試行回数がURLを超過しました:proxyError( 'プロキシに接続できません'、OSError( 'Tunnel connection failed:400 Bad Request'、))))proxy = {'https': 'http:// uname:/api/folder/.xml – Ree

+0

OSError:トンネルの接続に失敗しました:400 Bad Request – Ree

関連する問題