Hi
I use akka cluster version 2.6.3 with artery tcp remoting.
In a 2-node cluster setup with raspberry pi’s, the first seed node (=node1) “Couldn’t join other seed nodes” after device reboot although before reboot they successfully formed a cluster.
On node1: after reboot a new cluster is formed and then a connection is established to node2:
[2020-06-22 09:46:38,537] [DEBUG] [akka.io.TcpListener] [akka://SELServer/system/IO-TCP/selectors/$a/0] - Successfully bound to /192.168.178.219:2551
[2020-06-22 09:46:39,488] [INFO ] [a.r.artery.tcp.ArteryTcpTransport] [ArteryTcpTransport(akka://SELServer)] - Remoting started with transport [Artery tcp]; listening on address [akka://SELServer@192.168.178.219:2551] with UID [1980465099243489092]
[2020-06-22 09:46:39,697] [INFO ] [akka.cluster.Cluster] [Cluster(akka://SELServer)] - Cluster Node [akka://SELServer@192.168.178.219:2551] - Starting up, Akka version [2.6.3] ...
[2020-06-22 09:46:41,800] [INFO ] [akka.cluster.Cluster] [Cluster(akka://SELServer)] - Cluster Node [akka://SELServer@192.168.178.219:2551] - Registered cluster JMX MBean [akka:type=Cluster]
[2020-06-22 09:46:41,802] [INFO ] [akka.cluster.Cluster] [Cluster(akka://SELServer)] - Cluster Node [akka://SELServer@192.168.178.219:2551] - Started up successfully
[2020-06-22 09:46:42,164] [INFO ] [akka.cluster.Cluster] [Cluster(akka://SELServer)] - Cluster Node [akka://SELServer@192.168.178.219:2551] - No downing-provider-class configured, manual cluster downing required, see https://doc.akka.io/docs/akka/current/typed
/cluster.html#downing
[2020-06-22 09:46:47,453] [DEBUG] [akka.cluster.Cluster] [Cluster(akka://SELServer)] - Cluster Node [akka://SELServer@192.168.178.219:2551] - Couldn't join other seed nodes, will join myself. seed-nodes=[akka://SELServer@192.168.178.219:2551, akka://SELServer@
192.168.178.220:2551]
[2020-06-22 09:46:47,707] [INFO ] [akka.cluster.Cluster] [Cluster(akka://SELServer)] - Cluster Node [akka://SELServer@192.168.178.219:2551] - Node [akka://SELServer@192.168.178.219:2551] is JOINING itself (with roles [dc-default]) and forming new cluster
[2020-06-22 09:46:47,751] [INFO ] [akka.cluster.Cluster] [Cluster(akka://SELServer)] - Cluster Node [akka://SELServer@192.168.178.219:2551] - is the new leader among reachable nodes (more leaders may exist)
[2020-06-22 09:46:47,882] [INFO ] [akka.cluster.Cluster] [Cluster(akka://SELServer)] - Cluster Node [akka://SELServer@192.168.178.219:2551] - Leader is moving node [akka://SELServer@192.168.178.219:2551] to [Up]
[2020-06-22 09:46:50,523] [DEBUG] [akka.io.TcpOutgoingConnection] [akka://SELServer@192.168.178.219:2551/system/IO-TCP/selectors/$a/2] - Attempting connection to [/192.168.178.220:2551]
[2020-06-22 09:46:50,543] [DEBUG] [akka.io.TcpOutgoingConnection] [akka://SELServer@192.168.178.219:2551/system/IO-TCP/selectors/$a/1] - Attempting connection to [/192.168.178.220:2551]
[2020-06-22 09:46:50,545] [DEBUG] [akka.io.TcpOutgoingConnection] [akka://SELServer@192.168.178.219:2551/system/IO-TCP/selectors/$a/2] - Connection established to [192.168.178.220:2551]
[2020-06-22 09:46:50,555] [DEBUG] [akka.io.TcpOutgoingConnection] [akka://SELServer@192.168.178.219:2551/system/IO-TCP/selectors/$a/1] - Connection established to [192.168.178.220:2551]
[2020-06-22 09:46:50,816] [DEBUG] [akka.io.TcpListener] [akka://SELServer/system/IO-TCP/selectors/$a/0] - New connection accepted
[2020-06-22 09:46:52,349] [DEBUG] [akka.io.TcpListener] [akka://SELServer/system/IO-TCP/selectors/$a/0] - New connection accepted
On node2: becomes new leader and then InitJoin and InitJoinAck is received and sent:
[2020-06-22 09:45:53,294] [INFO ] [akka.cluster.Cluster] [Cluster(akka://SELServer)] - Cluster Node [akka://SELServer@192.168.178.220:2551] - is the new leader among reachable nodes (more leaders may exist)
[2020-06-22 09:45:53,306] [INFO ] [akka.cluster.Cluster] [Cluster(akka://SELServer)] - Cluster Node [akka://SELServer@192.168.178.220:2551] - Leader is removing confirmed Exiting node [akka://SELServer@192.168.178.219:2551]
[2020-06-22 09:46:01,375] [WARN ] [akka.stream.Materializer] [akka.stream.Log(akka://SELServer/system/Materializers/StreamSupervisor-1)] - [outbound connection to [akka://SELServer@192.168.178.219:2551], message stream] Upstream failed, cause: StreamTcpExcepti
on: The connection has been aborted
[2020-06-22 09:46:01,376] [WARN ] [akka.stream.Materializer] [akka.stream.Log(akka://SELServer/system/Materializers/StreamSupervisor-1)] - [outbound connection to [akka://SELServer@192.168.178.219:2551], control stream] Upstream failed, cause: StreamTcpExcepti
on: The connection has been aborted
[2020-06-22 09:46:50,308] [DEBUG] [akka.io.TcpListener] [akka://SELServer/system/IO-TCP/selectors/$a/0] - New connection accepted
[2020-06-22 09:46:50,317] [DEBUG] [akka.io.TcpListener] [akka://SELServer/system/IO-TCP/selectors/$a/0] - New connection accepted
[2020-06-22 09:46:50,585] [DEBUG] [akka.io.TcpOutgoingConnection] [akka://SELServer@192.168.178.220:2551/system/IO-TCP/selectors/$a/22] - Attempting connection to [/192.168.178.219:2551]
[2020-06-22 09:46:50,587] [DEBUG] [akka.io.TcpOutgoingConnection] [akka://SELServer@192.168.178.220:2551/system/IO-TCP/selectors/$a/22] - Connection established to [192.168.178.219:2551]
[2020-06-22 09:46:51,638] [INFO ] [akka.cluster.Cluster] [Cluster(akka://SELServer)] - Cluster Node [akka://SELServer@192.168.178.220:2551] - Received InitJoin message from [Actor[akka://SELServer@192.168.178.219:2551/system/cluster/core/daemon/firstSeedNodeProcess-1#-338750855]] to [akka://SELServer@192.168.178.220:2551]
[2020-06-22 09:46:51,640] [INFO ] [akka.cluster.Cluster] [Cluster(akka://SELServer)] - Cluster Node [akka://SELServer@192.168.178.220:2551] - Sending InitJoinAck message from node [akka://SELServer@192.168.178.220:2551] to [Actor[akka://SELServer@192.168.178.219:2551/system/cluster/core/daemon/firstSeedNodeProcess-1#-338750855]] (version [2.6.3])
[2020-06-22 09:46:52,069] [INFO ] [akka.cluster.Cluster] [Cluster(akka://SELServer)] - Cluster Node [akka://SELServer@192.168.178.220:2551] - Received InitJoin message from [Actor[akka://SELServer@192.168.178.219:2551/system/cluster/core/daemon/firstSeedNodeProcess-1#-338750855]] to [akka://SELServer@192.168.178.220:2551]
[2020-06-22 09:46:52,072] [INFO ] [akka.cluster.Cluster] [Cluster(akka://SELServer)] - Cluster Node [akka://SELServer@192.168.178.220:2551] - Sending InitJoinAck message from node [akka://SELServer@192.168.178.220:2551] to [Actor[akka://SELServer@192.168.178.219:2551/system/cluster/core/daemon/firstSeedNodeProcess-1#-338750855]] (version [2.6.3])
[2020-06-22 09:46:52,119] [DEBUG] [akka.io.TcpOutgoingConnection] [akka://SELServer@192.168.178.220:2551/system/IO-TCP/selectors/$a/23] - Attempting connection to [/192.168.178.219:2551]
[2020-06-22 09:46:52,121] [DEBUG] [akka.io.TcpOutgoingConnection] [akka://SELServer@192.168.178.220:2551/system/IO-TCP/selectors/$a/23] - Connection established to [192.168.178.219:2551]
[2020-06-22 09:46:52,240] [INFO ] [akka.cluster.Cluster] [Cluster(akka://SELServer)] - Cluster Node [akka://SELServer@192.168.178.220:2551] - Received InitJoin message from [Actor[akka://SELServer@192.168.178.219:2551/system/cluster/core/daemon/firstSeedNodeProcess-1#-338750855]] to [akka://SELServer@192.168.178.220:2551]
[2020-06-22 09:46:52,241] [INFO ] [akka.cluster.Cluster] [Cluster(akka://SELServer)] - Cluster Node [akka://SELServer@192.168.178.220:2551] - Sending InitJoinAck message from node [akka://SELServer@192.168.178.220:2551] to [Actor[akka://SELServer@192.168.178.219:2551/system/cluster/core/daemon/firstSeedNodeProcess-1#-338750855]] (version [2.6.3])
[2020-06-22 09:46:52,349] [INFO ] [akka.cluster.Cluster] [Cluster(akka://SELServer)] - Cluster Node [akka://SELServer@192.168.178.220:2551] - Received InitJoin message from [Actor[akka://SELServer@192.168.178.219:2551/system/cluster/core/daemon/firstSeedNodeProcess-1#-338750855]] to [akka://SELServer@192.168.178.220:2551]
[2020-06-22 09:46:52,349] [INFO ] [akka.cluster.Cluster] [Cluster(akka://SELServer)] - Cluster Node [akka://SELServer@192.168.178.220:2551] - Sending InitJoinAck message from node [akka://SELServer@192.168.178.220:2551] to [Actor[akka://SELServer@192.168.178.219:2551/system/cluster/core/daemon/firstSeedNodeProcess-1#-338750855]] (version [2.6.3])
[2020-06-22 09:46:52,467] [INFO ] [akka.cluster.Cluster] [Cluster(akka://SELServer)] - Cluster Node [akka://SELServer@192.168.178.220:2551] - Received InitJoin message from [Actor[akka://SELServer@192.168.178.219:2551/system/cluster/core/daemon/firstSeedNodeProcess-1#-338750855]] to [akka://SELServer@192.168.178.220:2551]
[2020-06-22 09:46:52,468] [INFO ] [akka.cluster.Cluster] [Cluster(akka://SELServer)] - Cluster Node [akka://SELServer@192.168.178.220:2551] - Sending InitJoinAck message from node [akka://SELServer@192.168.178.220:2551] to [Actor[akka://SELServer@192.168.178.219:2551/system/cluster/core/daemon/firstSeedNodeProcess-1#-338750855]] (version [2.6.3])
Note that when restarting the application on node1 instead of rebooting the device, the same scenario occurs but not always. Sometimes it just works and thus node1 joins node2.
Also note that node1 and node2 use the same static seed-nodes configuration:
seed-nodes = [
"akka://SELServer@192.168.178.219:2551"
"akka://SELServer@192.168.178.220:2551"
]
Things I don’t get
- Why do I have duplicated logs like “New connection accepted” on node1 or “Connection established to [192.168.178.219:2551]” on node2?
- Why could node1 not join node2 but instead formed a new cluster?
Thanks,
Simon