You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Akka.Cluster and Akka.Cluster.Sharding: should throw human-friendly exception when accessing cluster / sharding plugins when clustering is not running
#6163
Closed
Aaronontheweb opened this issue
Oct 10, 2022
· 0 comments
Version Information
Version of Akka.NET? v1.4.43
Which Akka.NET Modules? Akka.Cluster, Akka.Cluster.Sharding
Describe the bug
When attempting to access the Cluster plugin when akka.actor.provider is not set to cluster:
varcluster= Cluster.Get(sys);// throws here
cluster.Join(cluster.SelfAddress);// force cluster up
AwaitCondition(()=> cluster.Members.Count(m => m.Status ==Up)==0);
resulting exception: System.NullReferenceException: Object reference not set to an instance of an object.
at Akka.Cluster.ClusterSettings..ctor(Config config, String systemName)
at Akka.Cluster.Cluster..ctor(ActorSystemImpl system)
at Akka.Cluster.ClusterExtension.CreateExtension(ExtendedActorSystem system)
at Akka.Actor.ExtensionIdProvider`1.Akka.Actor.IExtensionId.CreateExtension(ExtendedActorSystem system)
at Akka.Actor.Internal.ActorSystemImpl.<>c__DisplayClass61_0.<RegisterExtension>b__1()
Expected behavior
It would be better if a less ambiguous error message was raised - i.e. an AkkaConfigurationException warning uses that their akka.cluster.provider or akka.cluster configuration sections might be missing / misconfigured.
Actual behavior
A very ambiguous NRE that doesn't help new Akka.Cluster users understand how to fix their problem.
Additional context
Doesn't ClusterSharding also throw a weird error message if we aren't currently part of a cluster? Shouldn't we make that clearer as well?
The text was updated successfully, but these errors were encountered:
Aaronontheweb
changed the title
Akka.Cluster and Akka.Cluster.Sharding: should throw human-friendly exception when accessing cluster / sharding pluigns when clustering is not running
Akka.Cluster and Akka.Cluster.Sharding: should throw human-friendly exception when accessing cluster / sharding plugins when clustering is not running
Oct 17, 2022
Version Information
Version of Akka.NET? v1.4.43
Which Akka.NET Modules? Akka.Cluster, Akka.Cluster.Sharding
Describe the bug
When attempting to access the
Cluster
plugin whenakka.actor.provider
is not set tocluster
:Or the
ClusterSharding
plugin:The following exception is thrown:
Expected behavior
It would be better if a less ambiguous error message was raised - i.e. an
AkkaConfigurationException
warning uses that theirakka.cluster.provider
orakka.cluster
configuration sections might be missing / misconfigured.Actual behavior
A very ambiguous NRE that doesn't help new Akka.Cluster users understand how to fix their problem.
Additional context
Doesn't
ClusterSharding
also throw a weird error message if we aren't currently part of a cluster? Shouldn't we make that clearer as well?The text was updated successfully, but these errors were encountered: