cassandra OpsCenter代理无法连接到节点,返回“TransportException:[/127.0.0.1:9042]无法连接”

3df52oht  于 2023-04-06  发布在  Cassandra
关注(0)|答案(2)|浏览(220)

无法连接到Cassandra(所有尝试查询的主机均失败(已尝试:/127.0.0.1:9042(com.datastax.driver.core.exceptions.TransportException:[/127.0.0.1:9042]无法连接))),请稍后重试。x1c 0d1x
在Opscenter日志上

ERROR: Alert for agents with issues on node 192.168.211.2 is currently Fired (MainThread)

在节点上agent.log

INFO [async-dispatch-6] 2023-03-27 09:43:38,279 Starting 
 monitored database connection.
 ERROR [async-dispatch-6] 2023-03-27 09:43:40,490 Can't connect 
 to Cassandra (All host(s) tried for query failed (tried: 
 /127.0.0.1:9042 
 (com.datastax.driver.core.exceptions.TransportException: 
 [/127.0.0.1:9042] Cannot connect))), retrying soon.
svujldwt

svujldwt1#

在此设置中使用的DataStax Enterprise(DSE)和OpsCenter的版本是什么?我假设您在此使用兼容的产品版本。
此外,您可能需要确保正在设置opscenterd.conf(在OpsCenter机器上),address.yaml如果您已经遵循了所有set up instructions from here并且拥有有效的DSE订阅许可证,则可以通过上传opscenterd.confopscenterd.logaddress.yamlopscenterd.confopscenterd.confopscenterd.logaddress.yamlopscenterd.logaddress.yamlopscenterd.logaddress.yamladdress.yamladdress.yamladdress.yamladdress.yamladdress.yamladdress.yamladdress.yamladdress.yamladdress.yamladdress.yamladdress.yamladdress.yamladdress.yamladdress.yamladdress.yaml、xm4n1x、xm4n1x、xagent.logcassandra.yamldse.yaml,以开始分类。

bvjxkvbb

bvjxkvbb2#

看起来好像您在节点上错误地配置了代理,因此它无法连接到本地Cassandra示例。
此错误表示您已将代理配置为连接到localhost

ERROR [async-dispatch-6] 2023-03-27 09:43:40,490 Can't connect 
 to Cassandra (All host(s) tried for query failed (tried: 
 /127.0.0.1:9042 
 (com.datastax.driver.core.exceptions.TransportException: 
 [/127.0.0.1:9042] Cannot connect))), retrying soon.

连接到127.0.0.1是一个错误,因为DSE节点侦听localhost上的客户端连接没有意义。它需要设置为与cassandra.yaml中的native_transport_address相同的IP。
如果您已经手动配置了代理的address.yaml,请检查它,特别是hosts属性,该属性不应设置为127.0.0.1。我们建议您让OpsCenter自动配置代理。干杯!

相关问题