Cqlsh with client to node SSL encryption

拥有回忆 提交于 2019-12-08 03:18:55

问题


Am trying to enable client to node SSL encryption in my DSE server.

My cqlshrc file looks like below

 [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

When I tried to login into cqlsh shell then am getting the below error

Connection error: Could not connect to 127.0.0.1:9160

回答1:


There are several possible causes I hope one of these solutions is helpful.

1) The certificate in the ssl section is not the same as (derived from) the keystore specified in the cassandra.yaml file.

Solution: generate a certificate from the keystore used in the cassandra.yaml file and place that in the location pointed to in your cqlshrc file.

2) The certificate file or keystore is changed after starting the node. Cassandra loads a copy of the certificate when it starts up.

Solution: Restart the node.

3) In the certfiles section 127.0.0.1 is over-ridden by the wrong certificate

Solution: use the correct certificate or drop the 127.0.0.1 entry.



来源:https://stackoverflow.com/questions/21489774/cqlsh-with-client-to-node-ssl-encryption

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!