Skip to content

Cluster client example fails at runtime (is not an 'ExtensionId', skipping...) #3006

@jameswilddev

Description

@jameswilddev

I am following the example/tutorial at http://getakka.net/articles/clustering/cluster-client.html#an-example, which recommends adding the line:

akka.extensions = ["Akka.Cluster.Tools.Client.ClusterClientReceptionist"]

to your HOCON. However, after doing this, I see errors during startup:

[ERROR][18/08/2017 08:43:05][Thread 0010][ActorSystem(Repro)] [Akka.Cluster.Tools.Client.ClusterClientReceptionist] is not an 'ExtensionId', skipping...
Cause: Unknown

I've had a look at the code which generates this error:

{
var extensions = new List<IExtensionId>();
foreach(var extensionFqn in _settings.Config.GetStringList("akka.extensions"))
{
var extensionType = Type.GetType(extensionFqn);
if(extensionType == null || !typeof(IExtensionId).IsAssignableFrom(extensionType) || extensionType.GetTypeInfo().IsAbstract || !extensionType.GetTypeInfo().IsClass)
{
_log.Error("[{0}] is not an 'ExtensionId', skipping...", extensionFqn);

This seems to take the strings in akka.extensions and look them up as types using Type.GetType. This part fails as there is no assembly name (change the configuration to akka.extensions = ["Akka.Cluster.Tools.Client.ClusterClientReceptionist, Akka.Cluster.Tools"] and it can now find the type).

But then, a subsequent check fails; the type specified needs to implement Akka.Actor.IExtensionId, which Akka.Cluster.Tools.Client.ClusterClientReceptionist does not:

https://github.com/akkadotnet/akka.net/blob/dev/src/contrib/cluster/Akka.Cluster.Tools/Client/ClusterClientReceptionist.cs#L20

Am I doing something wrong?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions