Cassandra 的 cqlsh 无法连接到任何服务器:最后一个错误:[SSL] 内部错误 (_ssl.c:727)")

And*_*niy 3 ubuntu ssl cassandra docker cqlsh

突然,之前工作的 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)")})
Run Code Online (Sandbox Code Playgroud)

在节点方面也不例外。

不是网络问题,因为没有选项的连接--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 一切正常

Nic*_*aux 6

Cassandra 3.11.8+ 似乎需要更新版本的 TLS。在客户端配置中强制使用它cqlsh应该会有所帮助(请参阅如何使用 DSE 强制使用 SSL TLSv1.2 协议)。

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

[ssl]
(...)
version = SSLv23
Run Code Online (Sandbox Code Playgroud)