1

I am using Lighthouse as my seed node and I am writing my first cluster node. I am very new to akka cluster so don't know what I am doing wrong. I have lighthouse running and a non-seed node trying to join and get the error message Dropping message [Akka.Actor.ActorSelectionMessage] for non-local recipient.

Tried various configurations with no luck. I made sure the Actor System name was the same in both lighthouse and non-seed node. See code and HOCON's

non-seed node Actor System creation:

    public ClusterActorSystem()
    {
        system = ActorSystem.Create("ThisIsMyName");
        Console.WriteLine($"The Actor System Name is {system.Name}");
    }

Using this HOCON on Lighthouse

    <pre>
    lighthouse{
  actorsystem: "ThisIsMyName" #POPULATE NAME OF YOUR ACTOR SYSTEM HERE
}
    # See petabridge.cmd configuration options here: 
    https://cmd.petabridge.com/articles/install/host-configuration.html
    petabridge.cmd{
    # default IP address used to listen for incoming petabridge.cmd client connections
    # should be a safe default as it listens on "all network interfaces".
    host = "0.0.0.0"

    # default port number used to listen for incoming petabridge.cmd client 
    connections
    port = 9110
}

    akka {
      actor {
        provider = cluster
      }

      remote {
        log-remote-lifecycle-events = DEBUG
        dot-netty.tcp {
          transport-class = "Akka.Remote.Transport.DotNetty.TcpTransport, Akka.Remote"
          applied-adapters = []
          transport-protocol = tcp
          #will be populated with a dynamic host-name at runtime if left uncommented
          #public-hostname = ""
          hostname = "0.0.0.0"
          port = 19621
        }
      }            

      cluster {
        #will inject this node as a self-seed node at run-time
        seed-nodes = []
        roles = [lighthouse]
      }
    }


    </pre>

Using this HOCON on Non-See Node

      <akka>
    <hocon>
      <![CDATA[
          akka {
            log-remote-lifecycle-events = DEBUG
            actor.provider = cluster
            remote {
              dot-netty.tcp {
                transport-class = "Akka.Remote.Transport.DotNetty.TcpTransport, Akka.Remote"
                applied-adapters = []
                transport-protocol = tcp
                port = 15245
                hostname = localhost
              }
            }
            cluster {
              seed-nodes = ["akka.tcp://ThisIsMyName@localhost:19621"]
              #roles = ["MyFirstRole"]
            }
          }
      ]]>
    </hocon>
  </akka>

Lighthouse Log Messages:

[ERROR][6/7/2019 4:42:50 PM][Thread 0011][[akka://ThisIsMyName/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2FThisIsMyName%40localhost%3A51281-2/endpointWriter#1992505106]] Dropping message [Akka.Actor.ActorSelectionMessage] for non-local recipient [[akka.tcp://ThisIsMyName@localhost:19621/]] arriving at [akka.tcp://ThisIsMyName@localhost:19621] inbound addresses [akka.tcp://ThisIsMyName@7815-pc1:19621]
Cause: Unknown
[ERROR][6/7/2019 4:42:55 PM][Thread 0009][[akka://ThisIsMyName/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2FThisIsMyName%40localhost%3A51281-2/endpointWriter#1992505106]] Dropping message [Akka.Actor.ActorSelectionMessage] for non-local recipient [[akka.tcp://ThisIsMyName@localhost:19621/]] arriving at [akka.tcp://ThisIsMyName@localhost:19621] inbound addresses [akka.tcp://ThisIsMyName@7815-pc1:19621]
Cause: Unknown

non-seed node log messages:
INFO][6/7/2019 5:13:10 PM][Thread 0001][remoting] Starting remoting
[INFO][6/7/2019 5:13:11 PM][Thread 0001][remoting] Remoting started; listening on addresses : [akka.tcp://ThisIsMyName@localhost:15245]
[INFO][6/7/2019 5:13:11 PM][Thread 0001][remoting] Remoting now listens on addresses: [akka.tcp://ThisIsMyName@localhost:15245]
[INFO][6/7/2019 5:13:11 PM][Thread 0001][Cluster] Cluster Node [akka.tcp://ThisIsMyName@localhost:15245] - Starting up...
[INFO][6/7/2019 5:13:11 PM][Thread 0001][Cluster] Cluster Node [akka.tcp://ThisIsMyName@localhost:15245] - Started up successfully
The Actor System Name is ThisIsMyName
Actor System Started.
[WARNING][6/7/2019 5:13:21 PM][Thread 0003][[akka://ThisIsMyName/system/cluster/core/daemon/joinSeedNodeProcess-1#2129151453]] Couldn't join seed nodes after [2] attempts, will try again. seed-nodes=[akka.tcp://ThisIsMyName@localhost:19621]
jdawiz
  • 471
  • 4
  • 9
  • I think I might have figured this out on my own but not sure the best way to fix it without altering the lighthouse code itself. In Lighthouse the LighthouseHostFactory has a static method LaunchLighthouse that reads and then dynamically updates the HOCON. When it does, it changes the hostname from localhost to the name of my machine. This is ok for deployment to the environments, PROD, UAT, etc but not ok for debugging in VS. – jdawiz Jun 07 '19 at 20:14
  • I am facing the same problem as well. I don't think its lighthouse, I think its dotnetty itself. The hostname from client appears to change as well. – Swoorup May 21 '20 at 11:42

0 Answers0