SSHanga
SSHanga

Reputation: 27

Cassandra DB, cluster not able to form

I have two nodes installed Cassandra and trying to make cluster between two.

IP1 - 10.0.0.2

IP2 - 10.0.0.3

Getting below error while starting cassandra in cluster mode.

INFO  [Messaging-EventLoop-3-3] 2022-08-08 15:15:36,172 NoSpamLogger.java:92 - /10.0.0.3:7000->/10.0.0.2:7000-URGENT_MESSAGES-[no-channel] failed to connect
io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(..) failed: No route to host: /10.0.0.2:7000
Caused by: java.net.ConnectException: finishConnect(..) failed: No route to host
        at io.netty.channel.unix.Errors.throwConnectException(Errors.java:124)
        at io.netty.channel.unix.Socket.finishConnect(Socket.java:251)
        at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.doFinishConnect(AbstractEpollChannel.java:673)
        at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.finishConnect(AbstractEpollChannel.java:650)
        at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.epollOutReady(AbstractEpollChannel.java:530)
        at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:470)
        at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:378)
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:829)
ERROR [main] 2022-08-08 15:15:37,034 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)
        at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:889)

In Cassandra yaml file, I have added as,

Ip1 yaml file,

listen_address: 10.0.0.2

rpc_address: 10.0.0.2

seeds: "10.0.0.3:7000"

Ip2 yamle file,

listen_address: 10.0.0.3

rpc_address: 10.0.0.3

seeds: "10.0.0.3:7000"

Below are the ports enabled.

8888, 7000, 7001, 7199, 9042, 9142, 9160

Upvotes: 0

Views: 383

Answers (1)

Rajesh Ranjan
Rajesh Ranjan

Reputation: 537

You need to check few things.

1.Please check with ping if both servers/nodes are reachable from each other.

2.Cassandra communicate/gossip on port 7000, please check if the port is allowd in OS firewall. If you are using SSL for inter-done communication the port would be 7001

  1. Make sure 9042 and 9160 is enabled for client and thrift communication.

Thanks!

Upvotes: 0

Related Questions