4

On my way to use Akka.NET for a scalable application, I am trying to setup a cluster of Lighthouse seed nodes. I am testing 3 Lighthouse nodes as seed nodes, each running on the same machine with different ports. Following is my hocon config sample:

lighthouse.actorsystem: "my-system"

# See petabridge.cmd configuration options here: https://cmd.petabridge.com/articles/install/host-configuration.html
petabridge.cmd.host = "0.0.0.0"
petabridge.cmd.port = 9111/9112/9113 #one in each node

akka.actor.provider = cluster
akka.remote.log-remote-lifecycle-events = DEBUG
akka.remote.dot-netty.tcp.transport-class = "Akka.Remote.Transport.DotNetty.TcpTransport, Akka.Remote"
akka.remote.dot-netty.tcp.applied-adapters = []
akka.remote.dot-netty.tcp.transport-protocol = tcp
akka.remote.dot-netty.tcp.public-hostname = "localhost"
akka.remote.dot-netty.tcp.hostname = "localhost"
akka.remote.dot-netty.tcp.port = 4001/4002/4003

akk.cluster.seed-nodes = ["akka.tcp://my-system@localhost:4001","akka.tcp://my-system@localhost:4002","akka.tcp://my-system@localhost:4003"] 
akk.cluster.roles = [lighthouse]

If I start up these nodes from 3 command prompts, each is printing the following messages:

[INFO][22-01-2019 11:45:17][Thread 0020][Cluster] Cluster Node [akka.tcp://my-system@localhost:4001/4002/4003] - Node [akka.tcp://my-system@localhost:4001/4002/4003] is JOINING itself (with roles []) and forming a new cluster
[INFO][22-01-2019 11:45:17][Thread 0020][Cluster] Cluster Node [akka.tcp://my-system@localhost:4001/4002/4003] - Leader is moving node [akka.tcp://my-system@localhost:4001/4002/4003] to [Up]

My concern here is that, as per the logs printed, these three instances are not forming a cluster and seems to be forming three separate clusters as the nodes themselves are not getting any message about other Lighthouse nodes.

Can somebody please clarify if this is the expected behavior as there is no example seems to be available online.

marsop
  • 323
  • 4
  • 19
Babu James
  • 2,740
  • 4
  • 33
  • 50
  • Your configuration is valid if all nodes have exactly the same order of seed nodes in their configuration. Only problem I see there is that your `akka.remote.dot-netty.tcp.port = 4001/4002/4003` may not be a valid naming of the port. – Bartosz Sypytkowski Jan 22 '19 at 12:55
  • @Bartosz: do you mean the key akka.remote.dot-netty.tcp.port or value? If value, i just put slashes to indicate ports in three nodes. – Babu James Jan 22 '19 at 15:16
  • Also, is this needed for production setup? – Babu James Jan 22 '19 at 15:50
  • Also, another fact is that these nodes didn't seem to communicate with each other. Is that normal? – Babu James Jan 22 '19 at 16:08
  • If you don't mind, welcome to take a look at https://github.com/ingted/FlightHouse – Anibal Yeh Sep 26 '20 at 13:42
  • Possibly related to https://stackoverflow.com/questions/36069124/in-akka-net-using-akka-cluster-how-to-configure-multiple-seed-nodes-lighthou. – DylanSp Mar 18 '21 at 18:42

0 Answers0