【发布时间】:2020-11-19 12:34:01
【问题描述】:
我正在尝试使用 python 驱动程序连接到 Cassandra:
from cassandra.cluster import Cluster
from cassandra.auth import PlainTextAuthProvider
auth_provider = PlainTextAuthProvider(username='yyyy',password='zzzzz')
cluster = Cluster(['xx.xx.xx.xx'], control_connection_timeout=10, port=9042,auth_provider=auth_provider)
session = cluster.connect()
错误:
NoHostAvailable: ('Unable to connect to any servers', {'xx.xx.xx.xx:9042': ConnectionRefusedError(111, "Tried connecting to [('xx.xx.xx.xx ', 9042)]. Last error: Connection refused")})
我还在yaml文件中设置了rpc地址:0.0.0.0
【问题讨论】:
标签: python cassandra connection cassandra-python-driver