【问题标题】:Cqlsh with client to node SSL encryption具有客户端到节点 SSL 加密的 Cqlsh
【发布时间】:2014-02-24 17:17:35
【问题描述】:

我正在尝试在我的 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

【问题讨论】:

  • 是您的 cassandra.yaml 中的 rpc_address 参数设置为 127.0.0.1 以外的值(例如主机的 IP 地址?)如果是这样,您应该在 cqlshrc 的主机名设置中使用它
  • rpc_address 设置为 0.0.0.0
  • 您自己找到解决方案了吗?我会感兴趣...
  • 只有在 ssl 选项中设置 validate = false 时才有效。

标签: cassandra datastax-enterprise datastax cqlsh


【解决方案1】:

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

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

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

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

解决方法:重启节点。

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

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

【讨论】:

  • 我对 cassandra 和 cqlsh 使用了相同的证书文件。我用新的证书文件启动了 cassandra(我也尝试重新启动 DSE,但错误仍然存​​在)。我将环回地址更改为 ipaddress 仍然出现相同的错误。
猜你喜欢
  • 2016-02-27
  • 1970-01-01
  • 2016-09-07
  • 2018-04-27
  • 1970-01-01
  • 2016-12-26
  • 1970-01-01
  • 2018-05-18
  • 2015-01-18
相关资源
最近更新 更多