【问题标题】:Cannot connect to datastax agent无法连接到 datastax 代理
【发布时间】:2016-05-04 17:57:21
【问题描述】:

我无法通过 opscenter 连接到任何节点。在 opscenter 中,它表示需要连接代理才能使 opscenter 工作。我检查了 datastax-agent/agent.log 文件,发现以下错误。

ERROR [clojure-agent-send-off-pool-0] 2016-01-27 09:30:54,545 Can't connect to Cassandra (All host(s) tried for query failed (tried: /127.0.0.1:9042 (com.datastax.driver.core.TransportException: [/127.0.0.1:9042] Cannot connect))), retrying soon.

我检查了端口 9042 和 7199 都在监听..

x.x.x.10:9042   :::*                        LISTEN      497        499005     28550/java

请告知.. 需要为此检查什么。谢谢

【问题讨论】:

标签: cassandra datastax opscenter


【解决方案1】:

将broadcast_rpc_address留给rpc_address,如下所示指向各自的IP地址:不需要更改为0.0.0.0。

10.154.3.10 - Cassandra.yaml
broadcast_rpc_address: 10.154.3.10
rpc_address: 10.154.3.10


10.154.3.10 - address.yaml
stomp_interface: 10.154.3.XX --> (Mention the IP of opscenter server)
hosts: ["10.154.3.10"]

重启datastax-agent,agent.log中不会出现错误。

【讨论】:

    【解决方案2】:

    cassandra.yaml 中的基本设置很少用于调整网络连接参数。

    1. listen_address : localhost

      要绑定并告诉其他 Cassandra 节点连接的地址或接口。将其指定为 localhost 将始终做正确的事情。将listen_address设置为0.0.0.0总是错误的

    2. rpc_address : 0.0.0.0

      与listen_address不同的是,您可以指定0.0.0.0,但您还必须将broadcast_rpc_address设置为0.0.0.0以外的值

    3. broadcast_rpc_address: localhost

      此设置可能对于将节点之间的会话从广播_rpc_address 重定向到 rpc_address 很有用(即机器有两个网络接口)

    如果您的环境的所有设置都正确,请尝试连接控制台客户端cqlsh 并尝试使用nodetool 来监控您的节点状态。尝试运行 OPC 中心后

    【讨论】:

      猜你喜欢
      • 2017-03-03
      • 2023-04-07
      • 2013-12-23
      • 2015-05-13
      • 2018-12-31
      • 2017-12-26
      • 2017-03-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多