【问题标题】:Akka cluster configurationAkka 集群配置
【发布时间】:2018-05-04 09:29:20
【问题描述】:

我收到此错误:

[ERROR] [05/04/2018 11:21:26.747] [default-akka.actor.default-dispatcher-19] 
[akka://default/system/cluster/core/daemon/joinSeedNodeProcess-1] bug 
in method caller: not valid to create ConfigValue from: ConfigString("")
com.typesafe.config.ConfigException$BugOrBroken: bug in method caller: not valid to create ConfigValue from: ConfigString("")
at com.typesafe.config.impl.ConfigImpl.fromAnyRef(ConfigImpl.java:275)
at com.typesafe.config.impl.PropertiesParser.fromPathMap(PropertiesParser.java:152)
at com.typesafe.config.impl.PropertiesParser.fromPathMap(PropertiesParser.java:82)
at com.typesafe.config.impl.ConfigImpl.fromAnyRef(ConfigImpl.java:260)
at com.typesafe.config.impl.ConfigImpl.fromPathMap(ConfigImpl.java:200)
at com.typesafe.config.ConfigFactory.parseMap(ConfigFactory.java:855)
at com.typesafe.config.ConfigFactory.parseMap(ConfigFactory.java:866)
at akka.cluster.JoinConfigCompatChecker$.filterWithKeys(JoinConfigCompatChecker.scala:104)
at akka.cluster.JoinSeedNodeProcess$$anonfun$receive$4.applyOrElse(ClusterDaemon.scala:1514)
at akka.actor.Actor.aroundReceive(Actor.scala:517)
at akka.actor.Actor.aroundReceive$(Actor.scala:515)
at akka.cluster.JoinSeedNodeProcess.aroundReceive(ClusterDaemon.scala:1490)
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:588)
at akka.actor.ActorCell.invoke(ActorCell.scala:557)
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:258)
at akka.dispatch.Mailbox.run(Mailbox.scala:225)
at akka.dispatch.Mailbox.exec(Mailbox.scala:235)
at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

尝试创建(仅限本地)akka 集群时。我在 application.conf 中将我的配置简化为几行:

akka {
    actor {
        provider = "akka.cluster.ClusterActorRefProvider"
    }
    cluster {
        seed-nodes = ["akka.tcp://ClusterSystem@127.0.0.1:2552"]
    }
}

在启动 ActorSystem 时得到我的错误:

fun main(args: Array<String>) {
    ActorSystem.create()
}

我正在使用 akka 2.5.12 版和 scala 2.12 版。

【问题讨论】:

  • 您的配置看起来正确。它看起来像是类型安全配置的无效问题版本的类路径问题。你的类路径上还有什么?
  • 你是对的。我使用了一个包com.twitter chill-akka 版本0.9.2,它加载了com.typesafe config 版本1.2.1。那个毁了我的派对

标签: akka akka-cluster


【解决方案1】:

所以我在我的 maven pom 中包含了 com.twitter chill-akka 版本 0.9.2。这包括com.typesage config 版本1.2.1com.typesafe.akka akka-actor-typed版本2.5.12需要的版本是1.3.2

所以现在我的 maven 包含如下所示:

<dependency>
    <groupId>com.twitter</groupId>
    <artifactId>chill-akka_${scala.version}</artifactId>
    <version>0.9.2</version>
    <exclusions>
        <exclusion>
            <groupId>com.typesafe</groupId>
            <artifactId>config</artifactId>
        </exclusion>
    </exclusions>
</dependency>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-04-27
    • 2019-04-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多