2

我正在尝试在我的 DSE 服务器中启用客户端到节点 SSL 加密。

我的 cqlshrc 文件如下所示

 [connection]
 hostname = 127.0.0.1
 port = 9160
 factory = cqlshlib.ssl.ssl_transport_factory

 [ssl]
 certfile = /path/to/dse_node0.cer
 validate = true ;; Optional, true by default.

 [certfiles] ;; Optional section, overrides the default certfile in the [ssl] section.
 1.2.3.4 = /path/to/dse_node0.cer

当我尝试登录 cqlsh shell 时出现以下错误

Connection error: Could not connect to 127.0.0.1:9160
4

1 回答 1

0

有几个可能的原因,我希望这些解决方案之一会有所帮助。

1) ssl 部分中的证书与 cassandra.yaml 文件中指定的密钥库不同(派生自)。

解决方案:从 cassandra.yaml 文件中使用的密钥库生成证书,并将其放在 cqlshrc 文件中指向的位置。

2) 启动节点后更改证书文件或密钥库。Cassandra 在启动时会加载一份证书副本。

解决方法:重启节点。

3) 在 certfiles 部分 127.0.0.1 被错误的证书覆盖

解决方案:使用正确的证书或删除 127.0.0.1 条目。

于 2014-02-05T23:06:53.803 回答