Search code examples
akka

Akka example does not include class 'akka.cluster.sbr.SplitBrainResolverProvider'


I'm following example to setup Cluster sharding at https://doc.akka.io/docs/akka/current/typed/cluster-sharding.html

I download the example from https://developer.lightbend.com/start/?group=akka&project=akka-samples-cluster-sharding-java

When I try to run the example using mvn -pl killrweather exec:java -Dexec.args="2553" I receive an exception:

[2021-07-10 22:26:04,974] [INFO] [akka://KillrWeather@127.0.0.1:2553] [akka.cluster.Cluster] [KillrWeather-akka.actor.default-dispatcher-3] [Cluster(akka://KillrWeather)] - Cluster Node [akka://KillrWeather@127.0.0.1:2553] - Starting up, Akka version [2.6.1] ...
[2021-07-10 22:26:05,099] [INFO] [akka://KillrWeather@127.0.0.1:2553] [akka.cluster.Cluster] [KillrWeather-akka.actor.default-dispatcher-3] [Cluster(akka://KillrWeather)] - Cluster Node [akka://KillrWeather@127.0.0.1:2553] - Registered cluster JMX MBean [akka:type=Cluster]
[2021-07-10 22:26:05,099] [INFO] [akka://KillrWeather@127.0.0.1:2553] [akka.cluster.Cluster] [KillrWeather-akka.actor.default-dispatcher-3] [Cluster(akka://KillrWeather)] - Cluster Node [akka://KillrWeather@127.0.0.1:2553] - Started up successfully
[2021-07-10 22:26:05,127] [ERROR] [akka://KillrWeather@127.0.0.1:2553] [akka.cluster.Cluster] [KillrWeather-akka.actor.default-dispatcher-5] [Cluster(akka://KillrWeather)] - Cluster Node [akka://KillrWeather@127.0.0.1:2553] - crashed, [akka://KillrWeather/system/cluster/core/daemon: exception during creation] - shutting down...
akka.actor.ActorInitializationException: akka://KillrWeather/system/cluster/core/daemon: exception during creation
    at akka.actor.ActorInitializationException$.apply(Actor.scala:195)
    at akka.actor.ActorCell.create(ActorCell.scala:657)
    at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:509)
    at akka.actor.ActorCell.systemInvoke(ActorCell.scala:531)
    at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:294)
    at akka.dispatch.Mailbox.run(Mailbox.scala:229)
    at akka.dispatch.Mailbox.exec(Mailbox.scala:242)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
Caused by: akka.ConfigurationException: Could not create cluster downing provider [akka.cluster.sbr.SplitBrainResolverProvider] 

If I remove the line downing-provider-class = "akka.cluster.sbr.SplitBrainResolverProvider" from application.conf

and re-execute the Cluster appears to startup correctly:

[2021-07-10 22:37:22,120] [INFO] [akka://KillrWeather@127.0.0.1:2553] [akka.remote.RemoteActorRefProvider$RemoteDeadLetterActorRef] [KillrWeather-akka.actor.default-dispatcher-24] [akka://KillrWeather/deadLetters] - Message [akka.cluster.InternalClusterAction$InitJoin] from Actor[akka://KillrWeather/system/cluster/core/daemon/firstSeedNodeProcess-1#-1591142875] to Actor[akka://KillrWeather/deadLetters] was not delivered. [2] dead letters encountered. If this is not an expected behavior then Actor[akka://KillrWeather/deadLetters] may have terminated unexpectedly. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
[2021-07-10 22:37:22,120] [INFO] [akka://KillrWeather@127.0.0.1:2553] [akka.remote.RemoteActorRefProvider$RemoteDeadLetterActorRef] [KillrWeather-akka.actor.default-dispatcher-24] [akka://KillrWeather/deadLetters] - Message [akka.cluster.InternalClusterAction$InitJoin] from Actor[akka://KillrWeather/system/cluster/core/daemon/firstSeedNodeProcess-1#-1591142875] to Actor[akka://KillrWeather/deadLetters] was not delivered. [3] dead letters encountered. If this is not an expected behavior then Actor[akka://KillrWeather/deadLetters] may have terminated unexpectedly. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
[2021-07-10 22:37:22,121] [INFO] [akka://KillrWeather@127.0.0.1:2553] [akka.remote.RemoteActorRefProvider$RemoteDeadLetterActorRef] [KillrWeather-akka.actor.default-dispatcher-24] [akka://KillrWeather/deadLetters] - Message [akka.cluster.InternalClusterAction$InitJoin] from Actor[akka://KillrWeather/system/cluster/core/daemon/firstSeedNodeProcess-1#-1591142875] to Actor[akka://KillrWeather/deadLetters] was not delivered. [4] dead letters encountered. If this is not an expected behavior then Actor[akka://KillrWeather/deadLetters] may have terminated unexpectedly. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
[2021-07-10 22:37:22,121] [INFO] [akka://KillrWeather@127.0.0.1:2553] [akka.remote.RemoteActorRefProvider$RemoteDeadLetterActorRef] [KillrWeather-akka.actor.default-dispatcher-24] [akka://KillrWeather/deadLetters] - Message [akka.cluster.InternalClusterAction$InitJoin] from Actor[akka://KillrWeather/system/cluster/core/daemon/firstSeedNodeProcess-1#-1591142875] to Actor[akka://KillrWeather/deadLetters] was not delivered. [5] dead letters encountered. If this is not an expected behavior then Actor[akka://KillrWeather/deadLetters] may have terminated unexpectedly. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
[2021-07-10 22:37:22,121] [INFO] [akka://KillrWeather@127.0.0.1:2553] [akka.remote.RemoteActorRefProvider$RemoteDeadLetterActorRef] [KillrWeather-akka.actor.default-dispatcher-24] [akka://KillrWeather/deadLetters] - Message [akka.cluster.InternalClusterAction$InitJoin] from Actor[akka://KillrWeather/system/cluster/core/daemon/firstSeedNodeProcess-1#-1591142875] to Actor[akka://KillrWeather/deadLetters] was not delivered. [6] dead letters encountered. If this is not an expected behavior then Actor[akka://KillrWeather/deadLetters] may have terminated unexpectedly. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.

Shouldn't the class akka.cluster.sbr.SplitBrainResolverProvider be included as part of the Akka example ?


Solution

  • This issue against the samples seems to indicate that upgrading akka.version to 2.6.15 in pom.xml fixes this.