datajoint-python icon indicating copy to clipboard operation
datajoint-python copied to clipboard

MySQL Error with python 3.10 and datajoint 0.13.3 - SSL: SSLV3_ALERT_HANDSHAKE_FAILURE

Open iamamutt opened this issue 2 years ago • 9 comments

Bug Report

Description

DataJoint fails to connect with python 3.10 and datajoint 0.13.3 but works with python 3.9.10 and datajoint 0.13.3. See conda environments and error output below.

Reproducibility

Include:

  • OS: Mac OS
  • Python Version: 3.10.2
  • MySQL Version: 5.7 https://github.com/datajoint/mysql-docker
  • MySQL Deployment: Strategy local-docker
  • DataJoint Version: 0.13.3
  • Minimum number of steps to reliably reproduce the issue
import datajoint as dj

dj.config["database.host"] = "localhost"
dj.config["database.user"] = "root"
dj.config["database.password"] = "simple"
dj.conn()

Maybe a pymysql issue?

Error using datajoint 0.13.3 and python 3.10.2

Connecting root@localhost:3306
---------------------------------------------------------------------------
SSLError                                  Traceback (most recent call last)
File ~/opt/conda/envs/py310/lib/python3.10/site-packages/pymysql/connections.py:633, in Connection.connect(self, sock)
    [632](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/pymysql/connections.py?line=631)[ self._get_server_information()
--> ]()[633](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/pymysql/connections.py?line=632)[ self._request_authentication()
    ]()[635](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/pymysql/connections.py?line=634)[ if self.sql_mode is not None:

File ~/opt/conda/envs/py310/lib/python3.10/site-packages/pymysql/connections.py:849, in Connection._request_authentication(self)
    ]()[847](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/pymysql/connections.py?line=846)[ self.write_packet(data_init)
--> ]()[849](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/pymysql/connections.py?line=848)[ self._sock = self.ctx.wrap_socket(self._sock, server_hostname=self.host)
    ]()[850](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/pymysql/connections.py?line=849)[ self._rfile = self._sock.makefile("rb")

File ~/opt/conda/envs/py310/lib/python3.10/ssl.py:512, in SSLContext.wrap_socket(self, sock, server_side, do_handshake_on_connect, suppress_ragged_eofs, server_hostname, session)
    ]()[506](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/ssl.py?line=505)[ def wrap_socket(self, sock, server_side=False,
    ]()[507](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/ssl.py?line=506)[                 do_handshake_on_connect=True,
    ]()[508](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/ssl.py?line=507)[                 suppress_ragged_eofs=True,
    ]()[509](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/ssl.py?line=508)[                 server_hostname=None, session=None):
    ]()[510](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/ssl.py?line=509)[     # SSLSocket class handles server_hostname encoding before it calls
    ]()[511](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/ssl.py?line=510)[     # ctx._wrap_socket()
--> ]()[512](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/ssl.py?line=511)[     return self.sslsocket_class._create(
    ]()[513](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/ssl.py?line=512)[         sock=sock,
    ]()[514](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/ssl.py?line=513)[         server_side=server_side,
    ]()[515](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/ssl.py?line=514)[         do_handshake_on_connect=do_handshake_on_connect,
    ]()[516](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/ssl.py?line=515)[         suppress_ragged_eofs=suppress_ragged_eofs,
    ]()[517](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/ssl.py?line=516)[         server_hostname=server_hostname,
    ]()[518](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/ssl.py?line=517)[         context=self,
    ]()[519](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/ssl.py?line=518)[         session=session
    ]()[520](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/ssl.py?line=519)[     )

File ~/opt/conda/envs/py310/lib/python3.10/ssl.py:1070, in SSLSocket._create(cls, sock, server_side, do_handshake_on_connect, suppress_ragged_eofs, server_hostname, context, session)
   ]()[1069](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/ssl.py?line=1068)[             raise ValueError("do_handshake_on_connect should not be specified for non-blocking sockets")
-> ]()[1070](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/ssl.py?line=1069)[         self.do_handshake()
   ]()[1071](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/ssl.py?line=1070)[ except (OSError, ValueError):

File ~/opt/conda/envs/py310/lib/python3.10/ssl.py:1341, in SSLSocket.do_handshake(self, block)
   ]()[1340](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/ssl.py?line=1339)[         self.settimeout(None)
-> ]()[1341](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/ssl.py?line=1340)[     self._sslobj.do_handshake()
   ]()[1342](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/ssl.py?line=1341)[ finally:

SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:997)

During handling of the above exception, another exception occurred:

OperationalError                          Traceback (most recent call last)
/Users/joseph/Documents/datajoint/projects/CiM/wt-causality-in-motion/scratch/scratch3.py in <cell line: 5>()
      ]()[3](file:///Users/joseph/Documents/datajoint/projects/CiM/wt-causality-in-motion/scratch/scratch3.py?line=2)[ dj.config["database.user"] = "root"
      ]()[4](file:///Users/joseph/Documents/datajoint/projects/CiM/wt-causality-in-motion/scratch/scratch3.py?line=3)[ dj.config["database.password"] = "simple"
----> ]()[5](file:///Users/joseph/Documents/datajoint/projects/CiM/wt-causality-in-motion/scratch/scratch3.py?line=4)[ dj.conn()

File ~/opt/conda/envs/py310/lib/python3.10/site-packages/datajoint/connection.py:119, in conn(host, user, password, init_fun, reset, use_tls)
    ]()[117](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/datajoint/connection.py?line=116)[     init_fun = init_fun if init_fun is not None else config['connection.init_function']
    ]()[118](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/datajoint/connection.py?line=117)[     use_tls = use_tls if use_tls is not None else config['database.use_tls']
--> ]()[119](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/datajoint/connection.py?line=118)[     conn.connection = Connection(host, user, password, None, init_fun, use_tls)
    ]()[120](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/datajoint/connection.py?line=119)[ return conn.connection

File ~/opt/conda/envs/py310/lib/python3.10/site-packages/datajoint/connection.py:178, in Connection.__init__(self, host, user, password, port, init_fun, use_tls)
    ]()[176](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/datajoint/connection.py?line=175)[ self._conn = None
    ]()[177](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/datajoint/connection.py?line=176)[ self._query_cache = None
--> ]()[178](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/datajoint/connection.py?line=177)[ connect_host_hook(self)
    ]()[179](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/datajoint/connection.py?line=178)[ if self.is_connected:
    ]()[180](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/datajoint/connection.py?line=179)[     logger.info("Connected {user}@{host}:{port}".format(**self.conn_info))

File ~/opt/conda/envs/py310/lib/python3.10/site-packages/datajoint/connection.py:45, in connect_host_hook(connection_obj)
     ]()[42](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/datajoint/connection.py?line=41)[         raise errors.DataJointError(
     ]()[43](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/datajoint/connection.py?line=42)[             "Connection plugin '{}' not found.".format(plugin_name))
     ]()[44](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/datajoint/connection.py?line=43)[ else:
---> ]()[45](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/datajoint/connection.py?line=44)[     connection_obj.connect()

File ~/opt/conda/envs/py310/lib/python3.10/site-packages/datajoint/connection.py:201, in Connection.connect(self)
    ]()[199](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/datajoint/connection.py?line=198)[ warnings.filterwarnings('ignore', '.*deprecated.*')
    ]()[200](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/datajoint/connection.py?line=199)[ try:
--> ]()[201](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/datajoint/connection.py?line=200)[     self._conn = client.connect(
    ]()[202](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/datajoint/connection.py?line=201)[         init_command=self.init_fun,
    ]()[203](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/datajoint/connection.py?line=202)[         sql_mode="NO_ZERO_DATE,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,"
    ]()[204](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/datajoint/connection.py?line=203)[                  "STRICT_ALL_TABLES,NO_ENGINE_SUBSTITUTION,ONLY_FULL_GROUP_BY",
    ]()[205](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/datajoint/connection.py?line=204)[         charset=config['connection.charset'],
    ]()[206](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/datajoint/connection.py?line=205)[         **{k: v for k, v in self.conn_info.items()
    ]()[207](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/datajoint/connection.py?line=206)[            if k not in ['ssl_input', 'host_input']})
    ]()[208](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/datajoint/connection.py?line=207)[ except client.err.InternalError:
    ]()[209](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/datajoint/connection.py?line=208)[     self._conn = client.connect(
    ]()[210](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/datajoint/connection.py?line=209)[         init_command=self.init_fun,
    ]()[211](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/datajoint/connection.py?line=210)[         sql_mode="NO_ZERO_DATE,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,"
   (...)
    ]()[215](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/datajoint/connection.py?line=214)[            if not(k in ['ssl_input', 'host_input'] or
    ]()[216](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/datajoint/connection.py?line=215)[                   k == 'ssl' and self.conn_info['ssl_input'] is None)})

File ~/opt/conda/envs/py310/lib/python3.10/site-packages/pymysql/connections.py:353, in Connection.__init__(self, user, password, host, database, unix_socket, port, charset, sql_mode, read_default_file, conv, use_unicode, client_flag, cursorclass, init_command, connect_timeout, read_default_group, autocommit, local_infile, max_allowed_packet, defer_connect, auth_plugin_map, read_timeout, write_timeout, bind_address, binary_prefix, program_name, server_public_key, ssl, ssl_ca, ssl_cert, ssl_disabled, ssl_key, ssl_verify_cert, ssl_verify_identity, compress, named_pipe, passwd, db)
    ]()[351](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/pymysql/connections.py?line=350)[     self._sock = None
    ]()[352](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/pymysql/connections.py?line=351)[ else:
--> ]()[353](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/pymysql/connections.py?line=352)[     self.connect()

File ~/opt/conda/envs/py310/lib/python3.10/site-packages/pymysql/connections.py:664, in Connection.connect(self, sock)
    ]()[662](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/pymysql/connections.py?line=661)[     if DEBUG:
    ]()[663](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/pymysql/connections.py?line=662)[         print(exc.traceback)
--> ]()[664](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/pymysql/connections.py?line=663)[     raise exc
    ]()[666](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/pymysql/connections.py?line=665)[ # If e is neither DatabaseError or IOError, It's a bug.
    ]()[667](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/pymysql/connections.py?line=666)[ # But raising AssertionError hides original error.
    ]()[668](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/pymysql/connections.py?line=667)[ # So just reraise it.
    ]()[669](file:///Users/joseph/opt/conda/envs/py310/lib/python3.10/site-packages/pymysql/connections.py?line=668)[ raise

OperationalError: (2003, "Can't connect to MySQL server on 'localhost' ([SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:997))")]()

Packages installed for python 3.10.2 environment

# Name                    Version                   Build  Channel
appdirs                   1.4.4              pyh9f0ad1d_0    conda-forge
appnope                   0.1.2           py310hbe9552e_2    conda-forge
argh                      0.26.2          pyh9f0ad1d_1002    conda-forge
asttokens                 2.0.5              pyhd8ed1ab_0    conda-forge
atk-1.0                   2.36.0               heb41896_4    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                        py_2    conda-forge
backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
brotli                    1.0.9                h3422bc3_6    conda-forge
brotli-bin                1.0.9                h3422bc3_6    conda-forge
brotlipy                  0.7.0           py310he2143c4_1003    conda-forge
bzip2                     1.0.8                h3422bc3_4    conda-forge
ca-certificates           2021.10.8            h4653dfc_0    conda-forge
cairo                     1.16.0            h933af38_1010    conda-forge
certifi                   2021.10.8       py310hbe9552e_1    conda-forge
cffi                      1.15.0          py310hf10583b_0    conda-forge
click                     8.0.4           py310hbe9552e_0    conda-forge
colorama                  0.4.4              pyh9f0ad1d_0    conda-forge
configparser              5.2.0              pyhd8ed1ab_0    conda-forge
cryptography              36.0.2          py310hf1846ab_0    conda-forge
cycler                    0.11.0             pyhd8ed1ab_0    conda-forge
datajoint                 0.13.3                   pypi_0    pypi
debugpy                   1.5.1           py310h1b49c16_0    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
entrypoints               0.4                pyhd8ed1ab_0    conda-forge
executing                 0.8.3              pyhd8ed1ab_0    conda-forge
expat                     2.4.7                h6b3803e_0    conda-forge
flask                     2.0.3              pyhd8ed1ab_0    conda-forge
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 hab24e00_0    conda-forge
fontconfig                2.13.96              hfb34624_2    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
fonttools                 4.31.2          py310hf8d0d8f_0    conda-forge
freetype                  2.10.4               h17b34a0_1    conda-forge
fribidi                   1.0.10               h27ca646_0    conda-forge
future                    0.18.2          py310hbe9552e_4    conda-forge
gdk-pixbuf                2.42.8               hdded42e_0    conda-forge
gettext                   0.19.8.1          h049c9fb_1008    conda-forge
giflib                    5.2.1                h27ca646_2    conda-forge
graphite2                 1.3.13            h9f76cd9_1001    conda-forge
graphviz                  3.0.0                hd4d4665_1    conda-forge
gtk2                      2.24.33              h57013de_2    conda-forge
gts                       0.7.6                h4b6d4d6_2    conda-forge
harfbuzz                  4.1.0                hc345670_0    conda-forge
icu                       69.1                 hbdafb3b_0    conda-forge
idna                      3.3                pyhd8ed1ab_0    conda-forge
ipykernel                 6.9.2           py310hc469350_0    conda-forge
ipython                   8.1.1           py310hbe9552e_0    conda-forge
itsdangerous              2.1.1              pyhd8ed1ab_0    conda-forge
jbig                      2.1               h3422bc3_2003    conda-forge
jedi                      0.18.1          py310hbe9552e_0    conda-forge
jinja2                    3.0.3              pyhd8ed1ab_0    conda-forge
jpeg                      9e                   h3422bc3_0    conda-forge
jupyter_client            7.1.2              pyhd8ed1ab_0    conda-forge
jupyter_core              4.9.2           py310hbe9552e_0    conda-forge
kiwisolver                1.4.0           py310hea002bf_0    conda-forge
lcms2                     2.12                 had6a04f_0    conda-forge
lerc                      3.0                  hbdafb3b_0    conda-forge
libblas                   3.9.0           13_osxarm64_openblas    conda-forge
libbrotlicommon           1.0.9                h3422bc3_6    conda-forge
libbrotlidec              1.0.9                h3422bc3_6    conda-forge
libbrotlienc              1.0.9                h3422bc3_6    conda-forge
libcblas                  3.9.0           13_osxarm64_openblas    conda-forge
libcxx                    13.0.1               h6a5c8ee_0    conda-forge
libdeflate                1.10                 h3422bc3_0    conda-forge
libffi                    3.4.2                h3422bc3_5    conda-forge
libgd                     2.3.3                ha764fb0_2    conda-forge
libgfortran               5.0.0.dev0      11_0_1_hf114ba7_23    conda-forge
libgfortran5              11.0.1.dev0         hf114ba7_23    conda-forge
libglib                   2.70.2               h67e64d8_4    conda-forge
libiconv                  1.16                 h642e427_0    conda-forge
liblapack                 3.9.0           13_osxarm64_openblas    conda-forge
libopenblas               0.3.18          openmp_h5dd58f0_0    conda-forge
libpng                    1.6.37               hf7e6567_2    conda-forge
librsvg                   2.52.5               h6312b7c_2    conda-forge
libsodium                 1.0.18               h27ca646_1    conda-forge
libtiff                   4.3.0                h77dc3b6_3    conda-forge
libtool                   2.4.6             hbdafb3b_1008    conda-forge
libwebp                   1.2.2                h0d20362_0    conda-forge
libwebp-base              1.2.2                h3422bc3_1    conda-forge
libxcb                    1.13              h9b22ae9_1004    conda-forge
libxml2                   2.9.12               hedbfbf4_1    conda-forge
libzlib                   1.2.11            hee7b306_1013    conda-forge
llvm-openmp               13.0.1               h455960f_1    conda-forge
lz4-c                     1.9.3                hbdafb3b_1    conda-forge
markupsafe                2.1.1           py310hf8d0d8f_0    conda-forge
matplotlib-base           3.5.1           py310hacb9267_0    conda-forge
matplotlib-inline         0.1.3              pyhd8ed1ab_0    conda-forge
minio                     7.1.5              pyhd8ed1ab_0    conda-forge
mscorefonts               0.0.1                         3    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
ncurses                   6.3                  hc470f4d_0    conda-forge
nest-asyncio              1.5.4              pyhd8ed1ab_0    conda-forge
networkx                  2.7.1              pyhd8ed1ab_1    conda-forge
numpy                     1.22.3          py310h2e04ed8_0    conda-forge
openjpeg                  2.4.0                h062765e_1    conda-forge
openssl                   1.1.1n               h90dfc92_0    conda-forge
otumat                    0.3.1              pyhd8ed1ab_0    conda-forge
packaging                 21.3               pyhd8ed1ab_0    conda-forge
pandas                    1.4.1           py310hdead3df_0    conda-forge
pango                     1.50.6               h9fd36ab_0    conda-forge
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
pcre                      8.45                 hbdafb3b_0    conda-forge
pexpect                   4.8.0              pyh9f0ad1d_2    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    9.0.1           py310hade9107_2    conda-forge
pip                       22.0.4             pyhd8ed1ab_0    conda-forge
pixman                    0.40.0               h27ca646_0    conda-forge
prompt-toolkit            3.0.27             pyha770c72_0    conda-forge
psutil                    5.9.0           py310he2143c4_0    conda-forge
pthread-stubs             0.4               h27ca646_1001    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
pure_eval                 0.2.2              pyhd8ed1ab_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pydot                     1.4.2           py310hbe9552e_1    conda-forge
pygments                  2.11.2             pyhd8ed1ab_0    conda-forge
pymysql                   1.0.2              pyhd8ed1ab_0    conda-forge
pyopenssl                 22.0.0             pyhd8ed1ab_0    conda-forge
pyparsing                 3.0.7              pyhd8ed1ab_0    conda-forge
pysocks                   1.7.1           py310hbe9552e_4    conda-forge
python                    3.10.2          hd16f9c5_4_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python_abi                3.10                    2_cp310    conda-forge
pyttk                     0.3.2                      py_0    conda-forge
pytz                      2022.1             pyhd8ed1ab_0    conda-forge
pyyaml                    6.0             py310he2143c4_3    conda-forge
pyzmq                     22.3.0          py310h7939bef_1    conda-forge
readline                  8.1                  hedafd6a_0    conda-forge
scipy                     1.8.0           py310h6ecf4ae_1    conda-forge
setuptools                60.10.0         py310hbe9552e_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
sqlite                    3.37.1               h7e3ccbd_0    conda-forge
stack_data                0.2.0              pyhd8ed1ab_0    conda-forge
tk                        8.6.12               he1e0b03_0    conda-forge
tornado                   6.1             py310he2143c4_2    conda-forge
tqdm                      4.63.1             pyhd8ed1ab_0    conda-forge
traitlets                 5.1.1              pyhd8ed1ab_0    conda-forge
tzdata                    2022a                h191b570_0    conda-forge
unicodedata2              14.0.0          py310he2143c4_0    conda-forge
urllib3                   1.26.9             pyhd8ed1ab_0    conda-forge
watchdog                  2.1.6           py310he2143c4_1    conda-forge
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
werkzeug                  2.0.3              pyhd8ed1ab_1    conda-forge
wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
xorg-libxau               1.0.9                h27ca646_0    conda-forge
xorg-libxdmcp             1.1.3                h27ca646_0    conda-forge
xz                        5.2.5                h642e427_1    conda-forge
yaml                      0.2.5                h3422bc3_2    conda-forge
zeromq                    4.3.4                hbdafb3b_1    conda-forge
zlib                      1.2.11            hee7b306_1013    conda-forge
zstd                      1.5.2                h861e0a7_0    conda-forge

Packages installed for python 3.9.10 environment

# Name                    Version                   Build  Channel
appdirs                   1.4.4              pyh9f0ad1d_0    conda-forge
appnope                   0.1.2            py39h2804cbe_2    conda-forge
argh                      0.26.2          pyh9f0ad1d_1002    conda-forge
asttokens                 2.0.5              pyhd8ed1ab_0    conda-forge
atk-1.0                   2.36.0               heb41896_4    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                        py_2    conda-forge
backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
brotli                    1.0.9                h3422bc3_6    conda-forge
brotli-bin                1.0.9                h3422bc3_6    conda-forge
brotlipy                  0.7.0           py39h5161555_1003    conda-forge
bzip2                     1.0.8                h3422bc3_4    conda-forge
ca-certificates           2021.10.8            h4653dfc_0    conda-forge
cairo                     1.16.0            h933af38_1010    conda-forge
certifi                   2021.10.8        py39h2804cbe_1    conda-forge
cffi                      1.15.0           py39h52b1de0_0    conda-forge
click                     8.0.4            py39h2804cbe_0    conda-forge
colorama                  0.4.4              pyh9f0ad1d_0    conda-forge
configparser              5.2.0              pyhd8ed1ab_0    conda-forge
cryptography              36.0.2           py39hbe5e4b8_0    conda-forge
cycler                    0.11.0             pyhd8ed1ab_0    conda-forge
datajoint                 0.13.3                   pypi_0    pypi
debugpy                   1.5.1            py39hfb83b0d_0    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
entrypoints               0.4                pyhd8ed1ab_0    conda-forge
executing                 0.8.3              pyhd8ed1ab_0    conda-forge
expat                     2.4.7                h6b3803e_0    conda-forge
flask                     2.0.3              pyhd8ed1ab_0    conda-forge
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 hab24e00_0    conda-forge
fontconfig                2.13.96              hfb34624_2    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
fonttools                 4.31.2           py39hb18efdd_0    conda-forge
freetype                  2.10.4               h17b34a0_1    conda-forge
fribidi                   1.0.10               h27ca646_0    conda-forge
future                    0.18.2           py39h2804cbe_4    conda-forge
gdk-pixbuf                2.42.8               hdded42e_0    conda-forge
gettext                   0.19.8.1          h049c9fb_1008    conda-forge
giflib                    5.2.1                h27ca646_2    conda-forge
graphite2                 1.3.13            h9f76cd9_1001    conda-forge
graphviz                  3.0.0                hd4d4665_1    conda-forge
gtk2                      2.24.33              h57013de_2    conda-forge
gts                       0.7.6                h4b6d4d6_2    conda-forge
harfbuzz                  4.1.0                hc345670_0    conda-forge
icu                       69.1                 hbdafb3b_0    conda-forge
idna                      3.3                pyhd8ed1ab_0    conda-forge
ipykernel                 6.9.2            py39h32adebf_0    conda-forge
ipython                   8.1.1            py39h2804cbe_0    conda-forge
itsdangerous              2.1.1              pyhd8ed1ab_0    conda-forge
jbig                      2.1               h3422bc3_2003    conda-forge
jedi                      0.18.1           py39h2804cbe_0    conda-forge
jinja2                    3.0.3              pyhd8ed1ab_0    conda-forge
jpeg                      9e                   h3422bc3_0    conda-forge
jupyter_client            7.1.2              pyhd8ed1ab_0    conda-forge
jupyter_core              4.9.2            py39h2804cbe_0    conda-forge
kiwisolver                1.4.0            py39h2c803a9_0    conda-forge
lcms2                     2.12                 had6a04f_0    conda-forge
lerc                      3.0                  hbdafb3b_0    conda-forge
libblas                   3.9.0           13_osxarm64_openblas    conda-forge
libbrotlicommon           1.0.9                h3422bc3_6    conda-forge
libbrotlidec              1.0.9                h3422bc3_6    conda-forge
libbrotlienc              1.0.9                h3422bc3_6    conda-forge
libcblas                  3.9.0           13_osxarm64_openblas    conda-forge
libcxx                    13.0.1               h6a5c8ee_0    conda-forge
libdeflate                1.10                 h3422bc3_0    conda-forge
libffi                    3.4.2                h3422bc3_5    conda-forge
libgd                     2.3.3                ha764fb0_2    conda-forge
libgfortran               5.0.0.dev0      11_0_1_hf114ba7_23    conda-forge
libgfortran5              11.0.1.dev0         hf114ba7_23    conda-forge
libglib                   2.70.2               h67e64d8_4    conda-forge
libiconv                  1.16                 h642e427_0    conda-forge
liblapack                 3.9.0           13_osxarm64_openblas    conda-forge
libopenblas               0.3.18          openmp_h5dd58f0_0    conda-forge
libpng                    1.6.37               hf7e6567_2    conda-forge
librsvg                   2.52.5               h6312b7c_2    conda-forge
libsodium                 1.0.18               h27ca646_1    conda-forge
libtiff                   4.3.0                h77dc3b6_3    conda-forge
libtool                   2.4.6             hbdafb3b_1008    conda-forge
libwebp                   1.2.2                h0d20362_0    conda-forge
libwebp-base              1.2.2                h3422bc3_1    conda-forge
libxcb                    1.13              h9b22ae9_1004    conda-forge
libxml2                   2.9.12               hedbfbf4_1    conda-forge
libzlib                   1.2.11            hee7b306_1013    conda-forge
llvm-openmp               13.0.1               h455960f_1    conda-forge
lz4-c                     1.9.3                hbdafb3b_1    conda-forge
markupsafe                2.1.1            py39hb18efdd_0    conda-forge
matplotlib-base           3.5.1            py39h5aa4fe7_0    conda-forge
matplotlib-inline         0.1.3              pyhd8ed1ab_0    conda-forge
minio                     7.1.5              pyhd8ed1ab_0    conda-forge
mscorefonts               0.0.1                         3    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
ncurses                   6.3                  hc470f4d_0    conda-forge
nest-asyncio              1.5.4              pyhd8ed1ab_0    conda-forge
networkx                  2.7.1              pyhd8ed1ab_1    conda-forge
numpy                     1.22.3           py39h690d673_0    conda-forge
openjpeg                  2.4.0                h062765e_1    conda-forge
openssl                   1.1.1n               h90dfc92_0    conda-forge
otumat                    0.3.1              pyhd8ed1ab_0    conda-forge
packaging                 21.3               pyhd8ed1ab_0    conda-forge
pandas                    1.4.1            py39h7f752ed_0    conda-forge
pango                     1.50.6               h9fd36ab_0    conda-forge
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
pcre                      8.45                 hbdafb3b_0    conda-forge
pexpect                   4.8.0              pyh9f0ad1d_2    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    9.0.1            py39hd72dd6b_2    conda-forge
pip                       22.0.4             pyhd8ed1ab_0    conda-forge
pixman                    0.40.0               h27ca646_0    conda-forge
prompt-toolkit            3.0.27             pyha770c72_0    conda-forge
psutil                    5.9.0            py39h5161555_0    conda-forge
pthread-stubs             0.4               h27ca646_1001    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
pure_eval                 0.2.2              pyhd8ed1ab_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pydot                     1.4.2            py39h2804cbe_1    conda-forge
pygments                  2.11.2             pyhd8ed1ab_0    conda-forge
pymysql                   1.0.2              pyhd8ed1ab_0    conda-forge
pyopenssl                 22.0.0             pyhd8ed1ab_0    conda-forge
pyparsing                 3.0.7              pyhd8ed1ab_0    conda-forge
pysocks                   1.7.1            py39h2804cbe_4    conda-forge
python                    3.9.10          hd16f9c5_2_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python_abi                3.9                      2_cp39    conda-forge
pyttk                     0.3.2                      py_0    conda-forge
pytz                      2022.1             pyhd8ed1ab_0    conda-forge
pyyaml                    6.0              py39h5161555_3    conda-forge
pyzmq                     22.3.0           py39h02c6a76_1    conda-forge
readline                  8.1                  hedafd6a_0    conda-forge
scipy                     1.8.0            py39h5060c3b_1    conda-forge
setuptools                60.10.0          py39h2804cbe_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
sqlite                    3.37.1               h7e3ccbd_0    conda-forge
stack_data                0.2.0              pyhd8ed1ab_0    conda-forge
tk                        8.6.12               he1e0b03_0    conda-forge
tornado                   6.1              py39h5161555_2    conda-forge
tqdm                      4.63.1             pyhd8ed1ab_0    conda-forge
traitlets                 5.1.1              pyhd8ed1ab_0    conda-forge
tzdata                    2022a                h191b570_0    conda-forge
unicodedata2              14.0.0           py39h5161555_0    conda-forge
urllib3                   1.26.9             pyhd8ed1ab_0    conda-forge
watchdog                  2.1.6            py39h5161555_1    conda-forge
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
werkzeug                  2.0.3              pyhd8ed1ab_1    conda-forge
wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
xorg-libxau               1.0.9                h27ca646_0    conda-forge
xorg-libxdmcp             1.1.3                h27ca646_0    conda-forge
xz                        5.2.5                h642e427_1    conda-forge
yaml                      0.2.5                h3422bc3_2    conda-forge
zeromq                    4.3.4                hbdafb3b_1    conda-forge
zlib                      1.2.11            hee7b306_1013    conda-forge
zstd                      1.5.2                h861e0a7_0    conda-forge

iamamutt avatar Mar 24 '22 19:03 iamamutt

Just a follow-up, based on this error message "do_handshake_on_connect should not be specified for non-blocking sockets", setting the config option "database.use_tls": false as opposed to the default of null resolves the connection error.

iamamutt avatar Mar 31 '22 18:03 iamamutt

Hmm, this is odd. Would be easier to debug once we get test coverage over py3.10 but #1011 would need to be addressed first. Something to note is that use_tls=False should be set carefully because this will make the connection socket and traffic unencrypted. For connections across the public web this is not generally recommended as anyone 'sniffing' could see the queries/results. Mostly concerns those using it on data that is to remain private.

guzman-raphael avatar Jun 03 '22 18:06 guzman-raphael

Ah, looks like this is related to updates in python 3.10 that has increased the security requirements to no longer allow RSA. We should see if we can update to use ed-25519.

https://stackoverflow.com/questions/71006708/getting-sslv3-alert-handshake-failure-when-trying-to-connect-to-imap

guzman-raphael avatar Jun 03 '22 18:06 guzman-raphael

I just spoke with a user who experienced this issue on windows. Should we limit official support to ≥3.7, ≤3.9 until this can be addressed? Or include a qualification about 3.10 in documentation?

CBroz1 avatar Sep 14 '22 14:09 CBroz1

I just want to add that I also have this issue with Python 3.10 and the latest version of datajoint 0.14.0.

rly avatar Mar 02 '23 00:03 rly

@rly Thanks for the report! :handshake:

We are working on adding test coverage for Python 3.10+ but it had the unfortunate side effect of breaking our current test suite, nosetests. Nose is unfortunately now obsolete and we are working on converting our test suite to pytest as that will be better for sustainability. So far, we've started with test_connection but more are coming.

If you are interested in helping out, we'd appreciate any contributions to either patching this issue or converting other tests if you have bandwidth. Just let us know if you have any questions and we can help.

guzman-raphael avatar Mar 02 '23 13:03 guzman-raphael

I'm getting this too. All we need to do is specify TLSv1.3 for the connection and we are good. Can you just tell us how to do that? I looked at the code and it's not clear what to modify.

vv111y avatar Mar 23 '23 14:03 vv111y

Just an update: On Ubuntu it seems to work with python 3.11.4. pymysql is version 1.4.6 and datajoint version is 0.13.8. Maybe some fixes from the pymysql library? Have not tested it on Windows though.

FlorianNeurosci avatar Aug 18 '23 07:08 FlorianNeurosci

no updates yet. Working on the update...

dimitri-yatsenko avatar Aug 18 '23 15:08 dimitri-yatsenko