These are chat archives for akkadotnet/akka.net

12th
Feb 2018
Bartosz Sypytkowski
@Horusiath
Feb 12 2018 07:40
@stuartsaltzman have you checked, if you have all references on place? It looks like your nuget didn't get all dependencies
Mladen Mihajlović
@mika76
Feb 12 2018 09:27
hi guys I'm new to Akka.net and have been trying it out with .net core
I have one or two questions if someone could help...
(I used a pluralsight course to get started but have converted and updated the project to use .net core 2)
.1. I added in a config to the App.config file and have added in the configuration section and everything - but it does not seem to be read in at all? This might not be an Akka thing but I thought someone might know what's going on? (I had to put the config in the source directly to make it work finally)
.2. I run a client and remote server in two console apps on the same machine and finally managed to make it connect and work, but when I close the server and start it again the client does not re-connect - I'm wondering is this by design or something - I was under the impression Akka was designed specifically for this kind of thing?
Mladen Mihajlović
@mika76
Feb 12 2018 09:33
.3. Is there a way to change config on the fly (running system) or do I always have to restart the Akka process? (could I maybe add new remote Actors)
Onur Gumus
@OnurGumus
Feb 12 2018 09:34
@mika76 ConfigurationFactory.Load()
then pass it to your actorsystem ctor
Mladen Mihajlović
@mika76
Feb 12 2018 09:34
Hi @OnurGumus - yeah I ended up doing that - but am wondering - does a normal App.config not work in .net core out of the box?
Onur Gumus
@OnurGumus
Feb 12 2018 09:35
I think no.
Not sure though
You don't need to restart akka process but may be just the system
process can stay
Mladen Mihajlović
@mika76
Feb 12 2018 09:36
ok cool - so I could watch the file and if it changes I terminate and restart? I will give it a try thanks
Onur Gumus
@OnurGumus
Feb 12 2018 09:36
yes kill the system and restart that.
for question 2, I am not sure. You might use clusters
Mladen Mihajlović
@mika76
Feb 12 2018 09:43
@OnurGumus yeah I was wondering if clusters will help - this is the next thing to play with - but I find it strange that the remote won't re-connect - was wondering if I'm missing something
Vasily Kirichenko
@vasily-kirichenko
Feb 12 2018 13:06

So, I have same for all noded akka.hocon, which is copied to every node, and this small part embedded into app.config:

akka.remote.dot-netty.tcp {
            hostname = localhost
            port = 2552
 }

After that I use these as following:

let sys = 
    let defaultConfig = 
        Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "..\\akka.hocon")
        |> File.ReadAllText
        |> Configuration.parse

    ActorSystem.Create("klsrl", Configuration.load().WithFallback(defaultConfig))

To make akka work properly I need to substitute hostname with a proper IP, specific to every node (because some servers have two network interfaces).
My current idea is to create a file containing hostname -> IP map, pass it to deploy script, which substitutes "localhost" with the proper IP. Is there a better way?

Onur Gumus
@OnurGumus
Feb 12 2018 15:49
@vasily-kirichenko does hocon support include files?
Vasily Kirichenko
@vasily-kirichenko
Feb 12 2018 17:59
@OnurGumus I've solved it by adding IP and port into our common yaml config, inserting them into akka.remote.dot-netty.tcp { ... } string template and passing to Configuration.parse.
already deployed :)
Michael Tissen
@rubiktubik
Feb 12 2018 18:25

I want to use akka remote, i created 2 Projects with for 2 Nodes. Which have the same configuration except the seed node has fixed port and ip:

akka {
    actor.provider = cluster
    remote {
        dot-netty.tcp {
            port = 0 
            hostname = 0.0.0.0
        }
    }
    cluster {
        seed-nodes = ["akka.tcp://TestSystem@192.168.2.111:8383"]
    }
}

I also use the same system name but the nodes could not connect to seed no with following error:

Cannot find serializer with id [5]. The most probable reason is that the configuration entry 'akka.actor.serializers' is not in sync between the two systems

What is the problem? Do i need to specify a serializer explicit?

Michael Tissen
@rubiktubik
Feb 12 2018 18:51
Problem found, used wrong config file. :worried: