Unable to connect to Cassandra remotely using DataStax Python driver

后端 未结 2 595
名媛妹妹
名媛妹妹 2021-01-15 03:24

I\'m having trouble connecting to Cassandra (running on an EC2 node) remotely (from my laptop). When I use the DataStax Python driver for Cassandra:

from cas         


        
相关标签:
2条回答
  • 2021-01-15 03:40

    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.

    0 讨论(0)
  • 2021-01-15 03:45

    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()
    
    0 讨论(0)
提交回复
热议问题