These are chat archives for akkadotnet/akka.net

24th
Dec 2017
Juan Suero
@juansuerogit
Dec 24 2017 02:24
having a hard time running akka.net with docker container i have 2 front end akka systems and a backend they share. all that works in visual studio F5 but then i deploy to docker doesnt connect to each other.
Juan Suero
@juansuerogit
Dec 24 2017 03:06
i get exception in client {Akka.Actor.ActorNotFoundException: Exception occurred while resolving ActorSelection --->
from client i do ...
ActorSelection("akka.tcp://XXXXXXActorSystem@192.168.1.4:55573/user/XXXXX")
Juan Suero
@juansuerogit
Dec 24 2017 03:17
i tried..
                helios.tcp {
                    transport-class = ""Akka.Remote.Transport.Helios.HeliosTcpTransport, Akka.Remote""
                    transport-protocol = tcp
                    port = 55573
                    hostname = ""192.168.1.4"" 
                    bind-hostname = ""0.0.0.0""
                    bind-port = 55573
                }
but i get System.Net.Sockets.SocketException: Cannot assign requested address
Siemienik Paweł
@Siemienik
Dec 24 2017 08:20
Is it able to run Akka on .net core?
Vasily Kirichenko
@vasily-kirichenko
Dec 24 2017 12:33
@Siemienik yes:
image.png
Natan Vivo
@nvivo
Dec 24 2017 15:49
@fogbridgegit the binding address must be the outside ip. I got around this with docker making docker use the host network
Juan Suero
@juansuerogit
Dec 24 2017 16:08
@nvivo to paraphrase since im docker newb.. you are saying that the "hostname" should be the IP inside docker and the "bind-hostname" should be the ip outside docker. e.g. my local lan ip? but then, wont the line of code .. ActorSelection("akka.tcp://XXXXXXActorSystem@192.168.1.4:55573/user/XXXXX")
fail because it needs to logically match the "hostname" ?
i ended up creating a docker-compose file looks like this:
image.png
image.png
Natan Vivo
@nvivo
Dec 24 2017 16:12
from what I understand, hostname is what you will bind the socket to, the binding-hostname is a translation for the outside
as long as other nodes can reach that IP, it will work
there is a guide here for scala akka, but the concept and config is the same: https://hackernoon.com/akka-cluster-in-docker-a-straight-forwards-configuration-b6deea32752d
Juan Suero
@juansuerogit
Dec 24 2017 16:13
@nvivo ok thanks bro ill try that and see which one works better. i ended up using static ips and stuff as you see from the screenshot. but ill try this and see what it brings also
Natan Vivo
@nvivo
Dec 24 2017 16:14
yeah, you may need to get some variables working to make this dynamic. as I said, I ended up setting up docker to use the host network, and I use dynamic ports
ended up being easier for me, but see what you get
Juan Suero
@juansuerogit
Dec 24 2017 16:15
ok,,, for information sakes this is my config files
                helios.tcp {
                    transport-class = ""Akka.Remote.Transport.Helios.HeliosTcpTransport, Akka.Remote""
                    transport-protocol = tcp
                    port = 55573
                    hostname = ""172.16.238.30"" 
                }
ActorSelection("akka.tcp://xxxxxxActorSystem@172.16.238.30:55573/user/xxxxx")