Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-1555

ConnectionFailure (SSL handshake failed) should raise AutoReconnect

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.7
    • Affects Version/s: 3.6, 3.6.1
    • Component/s: Connection Mgmt
    • Labels:
      None
    • Fully Compatible

      Current non-SSL default (no timed out in error string) behaviour is if there is a socket error then an AutoReconnect is raised.

      With SSL, there are moments where there are temporal network issues that can cause the SSL handshack to fail. This is raised as a ConnectionFailure but should be reclassified as an AutoReconnect.

      For example here:

      File "/opt/ampli/apps/marvinweb/venv/lib/python2.7/site-packages/pymongo/pool.py", line 891, in get_socket
       sock_info = self._get_socket_no_auth()
       File "/opt/ampli/apps/marvinweb/venv/lib/python2.7/site-packages/pymongo/pool.py", line 931, in _get_socket_no_auth
       sock_info = self._check(sock_info)
       File "/opt/ampli/apps/marvinweb/venv/lib/python2.7/site-packages/pymongo/pool.py", line 983, in _check
       return self.connect()
       File "/opt/ampli/apps/marvinweb/venv/lib/python2.7/site-packages/pymongo/pool.py", line 842, in connect
       sock = _configured_socket(self.address, self.opts)
       File "/opt/ampli/apps/marvinweb/venv/lib/python2.7/site-packages/pymongo/pool.py", line 758, in _configured_socket
       raise ConnectionFailure("SSL handshake failed: %s" % (str(exc),))
      ConnectionFailure: SSL handshake failed: _ssl.c:495: The handshake operation timed out

      This can happen when the network, for whatever reason, is temporarily unavailable, during the connection process. This could be solved by raising an AutoReconnect instead.

            Assignee:
            shane.harvey@mongodb.com Shane Harvey
            Reporter:
            bret.curtis@wdc.com Bret Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: