【问题标题】:Trying to connect from DataStax Studio to my Astra cluster - Connection test failed尝试从 DataStax Studio 连接到我的 Astra 集群 - 连接测试失败
【发布时间】:2021-06-25 19:55:08
【问题描述】:

刚拿到我全新的 6.8 DataStax Astra (Cassandra) 并从 https://www.datastax.com/dev/datastax-studio 下载了工作室。我的 Nodejs 连接效果很好。但是尝试从 Studio 连接 - SSL 配置一切都失败了:

All host(s) tried for query failed.. (com.datastax.driver.core.exceptions.TransportException:

根据secure-connect .. /config.json,看起来端口应该是29080 我将 API 用户管理令牌用于客户端和密钥。

不确定是否相关,但 python 连接失败:

...cassandra.cluster.NoHostAvailable: ('Unable to connect to any servers'
...Unauthorized('Error from server: code=2100 [Unauthorized] message="No SELECT permission on <table system_virtual_schema.keyspaces>"')

【问题讨论】:

    标签: cassandra connection datastax-astra datastax-studio


    【解决方案1】:

    它无法连接到 Astra,因为它连接到了错误的 CQL 端口。

    正确的端口配置位于[connection] 部分的cqlshrc 文件中。例如:

    [connection]
    hostname = db-uuid-us-east1.db.astra.datastax.com
    port = 39876
    ssl = true
    

    这是用于从 Studio 或其他客户端进行连接的正确 CQL 端口。干杯!

    【讨论】:

      【解决方案2】:

      Cassandra 6.8 Astra 目前默认使用端口 29042。 Python 连接器和 Studio 在 Admin User 凭据下工作得很好,但在 Admin API User 下却不行。所以授权错误信息是清晰的。 NodeJS 与 Admin API 用户凭据配合使用效果很好。..

      【讨论】:

      • 我不确定你的意思。 Astra 没有默认的 CQL 端口——每个数据库实例都分配有一个随机端口,29042 不是默认端口。干杯!
      猜你喜欢
      • 2015-11-30
      • 1970-01-01
      • 2023-01-11
      • 2013-03-26
      • 1970-01-01
      • 1970-01-01
      • 2022-11-16
      • 1970-01-01
      相关资源
      最近更新 更多