title: connection error in python ssl
body: <p>I am trying to login to a https location and I am facing this error. I am not sure what is causing this issue. Can anyone help me out with this ?</p>
  
  <pre><code>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)
  </code></pre>
  
  <p>Could anyone help me with this error ?</p>
  
  <p>I also tried including this </p>
  
  <pre><code>import urllib.request
  from urllib.request import Request, urlopen
  </code></pre>