加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

scala – akka集群种子节点给出错误:为非本地收件人丢弃消息

发布时间:2020-12-16 09:18:28 所属栏目:安全 来源:网络整理
导读:我正在尝试从Win 7机器上创建一个基本的akka??集群: http://doc.akka.io/docs/akka/snapshot/scala/cluster-usage.html 当我运行种子节点时,我收到一个错误(更多在下面) AdriansClusterSystem-akka.actor.default-dispa tcher-16] [akka://AdriansClusterSy
我正在尝试从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窗口中

06001

这两个都启动很好,然后重复显示一条错误消息:

mybuild:-:0.0.1-SNAPSHOT>`run-main sample.cluster.simple.SimpleClusterApp 2552`
[warn] Credentials file C:Usersamocanu.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]

如果现在我做

06003

应该选择一个随机端口并运行一个种子节点,它就像其他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:

Yup它只是挂在那里,我必须关闭sbt窗口来终止它.

解决方法

看起来您的种子节点正在使用ClusterSystem作为actor系统名称,但根据您使用AdriansClusterSystem作为演员系统名称的日志.尝试将种子节点更改为:

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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读