我在Debian 7.6.0上运行cassandra 2.1.0,在同一台机器上运行cqlsh。当我尝试通过cqlsh连接时,
$ / usr / local / cassandra-2.1.0 / bin / cqlsh --ssl --debug
我收到以下错误消息:
Using CQL driver: <module 'cassandra' from '/usr/local/cassandra-2.1.0/bin/../lib/cassandra-driver-internal-only-2.1.0.post.zip/cassandra-driver-2.1.0.post/cassandra/__init__.py'>
Connection error: ('Unable to connect to any servers', {'127.0.0.1': SSLError(0, '_ssl.c:340: error:00000000:lib(0):func(0):reason(0)')})
详情如下。请。让我知道如何解决此问题。提前谢谢。
如(http://www.datastax.com/documentation/cassandra/2.1/cassandra/security/secureSSLCertificates_t.html)中所述,我生成了一个密钥库,并修改了cassandra.yaml,如下所示: client_encryption_options:
enabled: true
keystore: /usr/local/cassandra-2.1.0/ssl/.keystore
keystore_password: ***********
我已导出服务器的公钥。
将从上一步导出的公钥复制到〜/ keys / cassandra_node0.cert中。 修改〜/ .cassandra / cqlshrc如下:
[connection]
hostname = 127.0.0.1
port = 9042
factory = cqlshlib.ssl.ssl_transport_factory
[tracing]
max_trace_wait = 10.0
[ssl]
certfile = ~/keys/cassandra_node0.cert
validate = true
答案 0 :(得分:4)
我有同样的问题
虽然您现在可能已找到解决方案,但我认为为其他人录制解决方案可能会有所帮助。
我按照here中的文档创建 .pem 证书。
我的cqlshrc ssl配置如下所示
[ssl]
certfile = /ssl/cqlsh.pem
validate = false
这对我有用。
与cassandra的文档中所有与ssl相关的主题一样,这部分内容还不够完善。