gpt4 book ai didi

scala - akka 集群种子节点给出错误 : dropping message for non-local recipient

转载 作者:行者123 更新时间:2023-12-03 14:52:21 25 4
gpt4 key购买 nike

我正在尝试根据本文档在 Win 7 机器上创建一个基本的 akka 集群:
http://doc.akka.io/docs/akka/snapshot/scala/cluster-usage.html

当我运行种子节点时出现错误(下面有更多关于它们的信息)

AdriansClusterSystem-akka.actor.default-dispa tcher-16] [akka://AdriansClusterSystem/system/endpointManager/reliableEndpointWr iter-akka.tcp%3A%2F%2FAdriansClusterSystem%40127.0.0.1%3A2552-3/endpointWriter] dropping message [class akka.actor.SelectChildName] for non-local recipient [Act or[akka.tcp://ClusterSystem@127.0.0.1:2552/]] arriving at [akka.tcp://ClusterSys tem@127.0.0.1:2552] inbound addresses are [akka.tcp://AdriansClusterSystem@127.0 .0.1:2552]



问题:
为什么我会收到此错误?我错过了akka文档中的某些内容吗?

我的 .conf 文件:
我在上面的 URL 中列出的文件中添加了这个额外的行 * enabled-transports = ["akka.remote.netty.tcp"]
akka {
actor {
provider = "akka.cluster.ClusterActorRefProvider"
}
remote {
enabled-transports = ["akka.remote.netty.tcp"] <--added this from remoting
log-remote-lifecycle-events = off
netty.tcp {
hostname = "127.0.0.1"
port = 0
}
}
cluster {
seed-nodes = [
"akka.tcp://ClusterSystem@127.0.0.1:2551",
"akka.tcp://ClusterSystem@127.0.0.1:2552"]

auto-down = on
}
}

我启动了 2 个节点,每个节点都在不同的 sbt 窗口中

run-main sample.cluster.simple.SimpleClusterApp 2551  
run-main sample.cluster.simple.SimpleClusterApp 2552


这两个启动都很好,然后反复显示 ERROR信息:
mybuild:-:0.0.1-SNAPSHOT>`run-main sample.cluster.simple.SimpleClusterApp 2552`
[warn] Credentials file C:\Users\amocanu\.ivy2\.credentials does not exist <-- ?
[info] Running sample.cluster.simple.SimpleClusterApp 2552
args[0]= 2552
[INFO] [07/31/2013 10:50:00.397] [run-main] [Remoting] Starting remoting
[INFO] [07/31/2013 10:50:00.661] [run-main] [Remoting] Remoting started; listeni
ng on addresses :[akka.tcp://AdriansClusterSystem@127.0.0.1:2552]
[INFO] [07/31/2013 10:50:00.710] [run-main] [Cluster(akka://AdriansClusterSystem
)] Cluster Node [akka.tcp://AdriansClusterSystem@127.0.0.1:2552] - Starting up..
.
[INFO] [07/31/2013 10:50:00.823] [run-main] [Cluster(akka://AdriansClusterSystem
)] Cluster Node [akka.tcp://AdriansClusterSystem@127.0.0.1:2552] - Registered cl
uster JMX MBean [akka:type=Cluster]
[INFO] [07/31/2013 10:50:00.823] [run-main] [Cluster(akka://AdriansClusterSystem
)] Cluster Node [akka.tcp://AdriansClusterSystem@127.0.0.1:2552] - Started up su
ccessfully
[INFO] [07/31/2013 10:50:00.868] [AdriansClusterSystem-akka.actor.default-dispat
cher-2] [Cluster(akka://AdriansClusterSystem)] Cluster Node [akka.tcp://AdriansC
lusterSystem@127.0.0.1:2552] - Metrics will be retreived from MBeans, and may be
incorrect on some platforms. To increase metric accuracy add the 'sigar.jar' to
the classpath and the appropriate platform-specific native libary to 'java.libr
ary.path'. Reason: java.lang.ClassNotFoundException: org.hyperic.sigar.Sigar
[INFO] [07/31/2013 10:50:00.874] [AdriansClusterSystem-akka.actor.default-dispat
cher-2] [Cluster(akka://AdriansClusterSystem)] Cluster Node [akka.tcp://AdriansC
lusterSystem@127.0.0.1:2552] - Metrics collection has started successfully
[INFO] [07/31/2013 10:50:00.883] [AdriansClusterSystem-akka.actor.default-dispat
cher-13] [akka://AdriansClusterSystem/user/clusterListener] Current members:
[ERROR] [07/31/2013 10:50:01.003] [AdriansClusterSystem-akka.actor.default-dispa
tcher-3] [akka://AdriansClusterSystem/system/endpointManager/reliableEndpointWri
ter-akka.tcp%3A%2F%2FAdriansClusterSystem%40127.0.0.1%3A2551-0/endpointWriter] d
ropping message [class akka.actor.SelectChildName] for non-local recipient [Acto
r[akka.tcp://ClusterSystem@127.0.0.1:2552/]] arriving at [akka.tcp://ClusterSyst
em@127.0.0.1:2552] inbound addresses are [akka.tcp://AdriansClusterSystem@127.0.
0.1:2552]
[ERROR] [07/31/2013 10:50:01.009] [AdriansClusterSystem-akka.actor.default-dispa
tcher-16] [akka://AdriansClusterSystem/system/endpointManager/reliableEndpointWr
iter-akka.tcp%3A%2F%2FAdriansClusterSystem%40127.0.0.1%3A2552-3/endpointWriter]
dropping message [class akka.actor.SelectChildName] for non-local recipient [Act
or[akka.tcp://ClusterSystem@127.0.0.1:2552/]] arriving at [akka.tcp://ClusterSys
tem@127.0.0.1:2552] inbound addresses are [akka.tcp://AdriansClusterSystem@127.0
.0.1:2552]

如果我现在这样做

run-main sample.cluster.simple.SimpleClusterApp


它应该选择一个随机端口并在其上运行一个种子节点,它与其他 2 个种子节点一样开始,然后显示一个未找到的类异常为 INFO并且没有当前成员
[INFO] [07/31/2013 11:19:36.612] [AdriansClusterSystem-akka.actor.default-dispat
cher-3] [Cluster(akka://AdriansClusterSystem)] Cluster Node [akka.tcp://AdriansC
lusterSystem@127.0.0.1:54824] - Metrics will be retreived from MBeans, and may b
e incorrect on some platforms. To increase metric accuracy add the 'sigar.jar' t
o the classpath and the appropriate platform-specific native libary to 'java.lib
rary.path'. Reason: java.lang.ClassNotFoundException: org.hyperic.sigar.Sigar
[INFO] [07/31/2013 11:19:36.619] [AdriansClusterSystem-akka.actor.default-dispat
cher-3] [Cluster(akka://AdriansClusterSystem)] Cluster Node [akka.tcp://AdriansC
lusterSystem@127.0.0.1:54824] - Metrics collection has started successfully
[INFO] [07/31/2013 11:19:36.633] [AdriansClusterSystem-akka.actor.default-dispat
cher-12] [akka://AdriansClusterSystem/user/clusterListener] Current members:

是的,它只是卡在那里,我必须关闭 sbt 窗 Eloquent 能终止它。

最佳答案

看起来您的种子节点正在使用 ClusterSystem作为参与者系统名称,但根据您使用的日志,AdriansClusterSystem作为您的 Actor 系统名称。尝试将种子节点更改为:

seed-nodes = [
"akka.tcp://AdriansClusterSystem@127.0.0.1:2551",
"akka.tcp://AdriansClusterSystem@127.0.0.1:2552"]

关于scala - akka 集群种子节点给出错误 : dropping message for non-local recipient,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17974689/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com