Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python cassandra驱动程序-SSL:错误的版本号_Python_Ssl_Cassandra_Datastax - Fatal编程技术网

Python cassandra驱动程序-SSL:错误的版本号

Python cassandra驱动程序-SSL:错误的版本号,python,ssl,cassandra,datastax,Python,Ssl,Cassandra,Datastax,我正在尝试使用datastax cassandra驱动程序连接到启用SSL的cassandra节点,如下所示: from cassandra.cluster import Cluster from cassandra.auth import PlainTextAuthProvider import ssl ip = <ip> ap = PlainTextAuthProvider(username=<username>, password=<password>

我正在尝试使用datastax cassandra驱动程序连接到启用SSL的cassandra节点,如下所示:

from cassandra.cluster import Cluster
from cassandra.auth import PlainTextAuthProvider 

import ssl
ip = <ip>
ap = PlainTextAuthProvider(username=<username>, password=<password>) 

ssl_options = {
  'ca_certs': <path to PEM file>,
  'ssl_version': ssl.PROTOCOL_TLSv1
  }
cluster = Cluster([ip], auth_provider=ap, ssl_options=ssl_options)
session = cluster.connect() 

我知道服务器接受协议_TLSv1,因为它是pycassa中的默认协议。我不明白我在这里做错了什么…

当尝试在不协商SSL的套接字上连接SSL时,通常会发生此错误


确认服务器中以及您要连接的端口已启用SSL。我认为这在服务器系统日志中应该很明显。

我现在觉得自己很愚蠢。。。服务器上已禁用SSL。谢谢你的回复!
NoHostAvailable: ('Unable to connect to any servers', {<ip>: error(1, u"Tried connecting to [(<ip>, <port>)]. Last error: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:590)")})