以下羣集單身人員未啓動。單身團隊演員未啓動
commander = system.actorOf(
ClusterSingletonManager.props(Commander.props(this),
terminationMessage = PoisonPill.getInstance,
settings = ClusterSingletonManagerSettings.create(system).withRole("commander")
), name = "Commander")
沒有引發錯誤消息。
日誌是:
[INFO] [2016年8月3日11:43:58.656] [ScalaTest - 運行 - 磨合ClusterSuite] [akka.remote.Remoting]啓動遠程 [INFO] [08/03/2016 11:43:59.007] [ScalaTest-run-running-ClusterSuite] [akka.remote.Remoting] Remoting開始了;監聽地址:[akka.tcp://[email protected]:59592] [INFO] [08/03/2016 11:43:59.035] [ScalaTest-run-running-ClusterSuite] [akka.cluster.Cluster (akka:// galaxyFarFarAway)]集羣節點[akka.tcp://[email protected]:59592] - 啓動... [INFO] [08/03/2016 11:43:59.218] [ScalaTest-運行 - 運行 - ClusterSuite] [akka.cluster.Cluster(akka:// galaxyFarFarAway)]集羣節點[akka.tcp://[email protected]:59592] - 已註冊的集羣JMX MBean [akka:type =集羣] [INFO] [08/03/2016 11:43:59.218] [ScalaTest-run-running-ClusterSuite] [akka.cluster.Cluster(akka:// galaxyFarFarAway)]集羣節點[akka.tcp://[email protected] .0.1:59592] - 成功啓動 [INFO] [08/03/2016 11:43:59.247] [galaxyFarFarAway-akka.actor.default-dispatcher-2] [akka.cluster.Cluster(akka:// galaxyFarFarAway )]集羣節點[akka.tcp:// galaxyFarFarAway @ 127 .0.0.1:59592] - 度量標準將從MBeans中檢索出來,並且在某些平臺上可能不正確。要提高度量準確性,請將'sigar.jar'添加到類路徑中,並將適當的特定於平臺的本機庫添加到'java.library.path'中。原因:java.lang.ClassNotFoundException:org.hyperic.sigar.Sigar [INFO] [08/03/2016 11:43:59.257] [galaxyFarFarAway-akka.actor.default-dispatcher-2] [akka.cluster.Cluster (akka:// galaxyFarFarAway)]集羣節點[akka.tcp://[email protected]:59592] - 指標集合已成功啓動 [INFO] [08/03/2016 11:43:59.268] [galaxyFarFarAway- akka.actor.default-dispatcher-3] [akka.cluster.Cluster(akka:// galaxyFarFarAway)]集羣節點[akka.tcp://[email protected]:59592] - 沒有配置種子節點,手動集羣聯接所需 斷開從目標VM,地址: '127.0.0.1:59574',運輸: '插座'
的配置是:
akka {
actor {
provider = "akka.cluster.ClusterActorRefProvider"
default-dispatcher {
throughput = 10
}
}
cluster {
roles = [commander]
}
remote {
log-remote-lifecycle-events = off
netty.tcp {
hostname = "127.0.0.1"
port = 0
}
}
akka.extensions=["akka.cluster.metrics.ClusterMetricsExtension"]
}
當我調試Commander
類的代碼時,構造函數甚至沒有被調用到任何地方。當我省略ClusterSingletonManager
並僅用Props
創建它時,它確實可行,但Commander
演員即將創建。 我感覺這個問題背後的配置不正確。你們對此有何評論?