我尝试在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
答案 0 :(得分:0)
有几种可能的原因我希望其中一种解决方案有所帮助。
1)ssl部分中的证书与cassandra.yaml文件中指定的密钥库不同(派生自)。
解决方案:从cassandra.yaml文件中使用的密钥库生成证书,并将其放在cqlshrc文件中指向的位置。
2)启动节点后更改证书文件或密钥库。 Cassandra在启动时会加载证书的副本。
解决方案:重启节点。
3)在certfiles部分中,127.0.0.1被错误的证书覆盖
解决方案:使用正确的证书或删除127.0.0.1条目。