Unable to connect to Cassandra remotely using DataStax Python driver

…衆ロ難τιáo~ 提交于 2019-12-01 11:16:48

Here is a simple debug method for you: On another machine which has cassandra installed, using cassandra cli command "cqlsh 10.X.X.X" to connect the remote cassandra server. If failed , then you should modify cassandra configuration file for the cassandra remote mode.

Such exception can be thrown if a control connection timeout was exceeded. Try to increase it or set it to None to completely disable this timeout. For example:

from cassandra.cluster import Cluster
cluster = Cluster(['127.0.0.1'], control_connection_timeout=10,  port=9042)
cluster.connect()
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!