0

I am new to Akka.Net and tried to follow a simple procedure from "Remotely Deploying Actors" tutorial on the getakka.net site.

I however get a System.ArgumentNullException which says 'Value cannot be null. (Parameter 'typeName')'.

Here's my server actor creation block:

var thishocon = HoconLeader.FromFile("akka.net.hocon");
ActorSystem myactorSystem = ActorSystem.Create("server-system", thishocon);

And my akka.net.hocon file for the (console) server:

akka {
    actor {
        provider = "Akka.Remote.RemoteActorRefProvider, Akka.Remote"
        # provider = remote
        serializers {
            hyperion = "Akka.Serialization.HyperionSerializer,
                        Akka.Serialization.Hyperion"
        }
    }

    remote {
        dot-netty.tcp {
        # helios.tcp {
            port = 8081 # bound to a specific port
            hostname = localhost
        }
    }
}

The error shows up on the line where I try to reference the remote actor system on the asp.net core client:

Config myhocon = HoconLeader.FromFile("akka.net.hocon");
var actorSystem = ActorSystem.Create("aspnet-actor-system", myhocon);

And here's my akka.net.hocon for the asp.net core client:

akka {
    actor {
        provider "Akka.Remote.RemoteActorRefProvider, Akka.Remote"
        # provider = remote
        deployment {
            /calculator {
                remote = "akka.tcp://server-system@localhost:8081"
            }
        }
        serializers {
            hyperion = "Akka.Serialization.HyperionSerializer,
                        Akka.Serialization.Hyperion"
        }
    }
    remote {
        dot-netty.tcp {
        # helios.tcp {
            port = 0 # bound to a dynamic port assigned by the OS
            hostname = localhost
        }
    }
}

The FromFile method simply creates a config from the specified text document:

public static Config FromFile (string path)
        {
            var hoconContent = System.IO.File.ReadAllText(path);
            return ConfigurationFactory.ParseString(hoconContent);
        }

I have set visual studio to start the server before the client of course. The server does start listening on the desired port but then the error happens: aKKA.NET null exception

Could this be a firewall issue or what?

Levi Ramsey
  • 18,884
  • 1
  • 16
  • 30
Bolu Morawo
  • 189
  • 1
  • 1
  • 6

0 Answers0