非种子节点无法加入。灯塔错误针对非本地收件人的丢弃消息[Akka.Actor.ActorSelectionMessage]

时间:2019-06-07 17:29:31

标签: c# akka.net-cluster

我正在使用Lighthouse作为我的种子节点,并且正在编写我的第一个群集节点。我对akka集群很陌生,所以不知道我在做什么错。我有灯塔在运行,一个非种子节点试图加入并获取错误消息 为非本地收件人删除消息[Akka.Actor.ActorSelectionMessage]。

尝试了各种配置,但没有运气。 我确保Actor系统名称在灯塔节点和非种子节点中都相同。查看代码和HOCON的

非种子节点Actor系统创建:

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

在Lighthouse上使用此HOCON

    <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>

在非可见节点上使用此HOCON

      <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>

灯塔日志消息:

[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]

0 个答案:

没有答案