Cassandra's cqlsh not able to connect to any servers: Last error: [SSL] internal error (_ssl.c:727)")

Cassandra's cqlsh not able to connect to any servers: Last error: [SSL] internal error (_ssl.c:727)")

之前正常工作的 docker 部署的集群突然停止接受任何连接:

cqlsh --debug --ssl -u <username> -p <username>
...
Using CQL driver: <module 'cassandra' from '/opt/cassandra/bin/../lib/cassandra-driver-internal-only-3.11.0-bb96859b.zip/cassandra-driver-3.11.0-bb96859b/cassandra/__init__.py'>
Using connect timeout: 300 seconds
Using 'utf-8' encoding
Using ssl: True
Connection error: ('Unable to connect to any servers', {'172.X.X.X': error(1, u"Tried connecting to [('172.X.X.X', 9042)]. Last error: [SSL] internal error (_ssl.c:727)")})

节点端没有异常。

不是网络问题,因为没有--ssl选项的连接会导致io.netty.handler.ssl.NotSslRecordException: not an SSL/TLS record...异常在 cassandra 节点上(这意味着它可以看到主机并可以与之通信)。

很明显问题出在用于身份验证的证书上。

有什么方法可以获取有关潜在错误的更多详细信息?

PS:当使用已切换到 ubuntu-focal 的 cassandra 3.11.9 图像时会出现此问题:https://github.com/docker-library/cassandra/commit/8b1427f0670684b13e58006c0bf46df18a01ee0b 使用 cassandra 3.11.7 一切正常

Cassandra 3.11.8+ 似乎需要更新版本的 TLS。在 cqlsh 客户端配置中强制使用它应该有所帮助(参见 How to force SSL TLSv1.2 protocol with DSE)。

[connection]
(...)
factory = cqlshlib.ssl.ssl_transport_factory
ssl = true

[ssl]
(...)
version = SSLv23