Cassandra在单节点集群中崩溃,显示”无法与任何对等节点进行通信”。

huangapple go评论46阅读模式
英文:

Cassandra in single node cluster crashes with "Unable to gossip with any peers"

问题

抱歉,我明白你的要求,以下是翻译好的部分:

我在我的服务器上运行了一个 Cassandra 单节点配置的实例,但在启动后的几分钟内,它崩溃,并显示以下错误:

ERROR [main] 2023-05-10 16:05:08,197 CassandraDaemon.java:911 - Exception encountered during startup
java.lang.RuntimeException: Unable to gossip with any peers
	at org.apache.cassandra.gms.Gossiper.doShadowRound(Gossiper.java:1844)
	at org.apache.cassandra.service.StorageService.checkForEndpointCollision(StorageService.java:650)
	at org.apache.cassandra.service.StorageService.prepareToJoin(StorageService.java:936)
	at org.apache.cassandra.service.StorageService.initServer(StorageService.java:786)
	at org.apache.cassandra.service.StorageService.initServer(StorageService.java:731)
	at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:420)
	at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:765)

有关如何修复这个问题的任何想法吗?我觉得这很奇怪,因为我找到的所有其他帖子都涉及多节点配置。

我还检查了 commitlog,那里的权限也没问题。

种子节点列表:

seed_provider:
    - class_name: org.apache.cassandra.locator.SimpleSeedProvider
      parameters:
          - seeds: "127.0.0.1:7000"

所以,鉴于 127.0.0.1localhost,我会说配置是正确的。

英文:

I have an instance of cassandra running on my server in single node configuration but a few minutes after startup it crashes with the following error:

ERROR [main] 2023-05-10 16:05:08,197 CassandraDaemon.java:911 - Exception encountered during startup
java.lang.RuntimeException: Unable to gossip with any peers
	at org.apache.cassandra.gms.Gossiper.doShadowRound(Gossiper.java:1844)
	at org.apache.cassandra.service.StorageService.checkForEndpointCollision(StorageService.java:650)
	at org.apache.cassandra.service.StorageService.prepareToJoin(StorageService.java:936)
	at org.apache.cassandra.service.StorageService.initServer(StorageService.java:786)
	at org.apache.cassandra.service.StorageService.initServer(StorageService.java:731)
	at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:420)
	at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:765)

Any idea on how to fix this? I find this especially weird given that all other threads I have found deal with multi-node configuration.

I have also checked the commitlog and the permissions there are fine.

seeds list:

seed_provider:
    - class_name: org.apache.cassandra.locator.SimpleSeedProvider
      parameters:
          - seeds: "127.0.0.1:7000"

So, given that 127.0.0.1 is the localhost I would say the configuration is fine.

答案1

得分: 2

错误提示中提到,节点无法与种子节点进行通信。

您在种子列表中配置了 localhost,但Cassandra无法连接到 127.0.0.1 的gossip端口 7000,这表明该节点未在 localhost 上监听gossip连接。

这使我得出结论,您已指定了不同的IP地址作为 listen_address。您需要更新种子列表,并将其设置为相同的IP地址。

例如:

listen_address: 10.1.2.3

seed_provider:
  - class_name: org.apache.cassandra.locator.SimpleSeedProvider
    parameters:
      - seeds: "10.1.2.3:7000"
英文:

As it states in the error, the node cannot gossip with seeds.

You've configured localhost in the seeds list but Cassandra is not able to connect to 127.0.0.1 on gossip port 7000 which indicates that the node is not listening for gossip connections on localhost.

This would lead me to conclude that you've specified a different IP address for listen_address. You need to update the seeds list and set it to the same IP address.

For example:

listen_address: 10.1.2.3

seed_provider:
  - class_name: org.apache.cassandra.locator.SimpleSeedProvider
    parameters:
      - seeds: "10.1.2.3:7000"

huangapple
  • 本文由 发表于 2023年5月10日 23:20:17
  • 转载请务必保留本文链接:https://go.coder-hub.com/76220161.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定