Re: [akka-user] 2.4-SNAPSHOT Did bind-hostname/bind-port functionality change?
On Tue, Apr 14, 2015 at 1:07 PM, Viktor Klang viktor.kl...@gmail.com wrote: Hi Greg, have you verified that the configuration is applied to the application? On Tue, Apr 14, 2015 at 10:13 AM, tigerfoot gzol...@gmail.com wrote: Hello, I had a working demo of Akka remoting working in a Docker container. I ran my server in Docker and was able to communicate with it from an external program. My application.conf looked like this: akka { loglevel = ERROR stdout-loglevel = ERROR loggers = [akka.event.slf4j.Slf4jLogger] actor { provider = akka.remote.RemoteActorRefProvider } remote { enabled-transports = [akka.remote.netty.tcp] netty.tcp { # Internal addr bind-hostname = localhost # also tried 127.0.0.1 You are binding to the localhost which docker does not forward connections to. Bind to either the IP address provided by docker if you know it, or to ${HOSTNAME} environment variable, or to 0.0.0.0 to bind to all interfaces. bind-port = 2551 # External Docker addr hostname = 172.16.240.141 port = 9100 } } } Boxed up I run my container like this (to map ports)--the web port mapping works fine: docker run -it -p 9100:2551 -p 9101:8080 --name dexp localhost:5000/root My client tries to connect to it like this: val c = ConfigFactory parseString akka { actor { provider = akka.remote.RemoteActorRefProvider } remote { enabled-transports = [akka.remote.netty.tcp] netty.tcp { hostname = localhost port = 5151 } } } val sys = ActorSystem( boom, c ) val actor = sys.actorSelection(akka.tcp:// dockerexp@172.16.240.141:9100/user/dockerexp) println(Actor: +actor) implicit val timo = Timeout(5.seconds) try { println( Await.result( (actor ? hey).asInstanceOf[Future[String]], 15.seconds) ) } finally { println(Dying...) Thread.sleep(5000) sys.shutdown() } This isn't working anymore--just times out and dies. It did work several months ago when 2.4-SNAPSHOT was first available. Am I doing something wrong? Thanks, Greg -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Cheers, √ -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Martynas Mickevičius Typesafe http://typesafe.com/ – Reactive http://www.reactivemanifesto.org/ Apps on the JVM -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
[akka-user] 2.4-SNAPSHOT Did bind-hostname/bind-port functionality change?
Hello, I had a working demo of Akka remoting working in a Docker container. I ran my server in Docker and was able to communicate with it from an external program. My application.conf looked like this: akka { loglevel = ERROR stdout-loglevel = ERROR loggers = [akka.event.slf4j.Slf4jLogger] actor { provider = akka.remote.RemoteActorRefProvider } remote { enabled-transports = [akka.remote.netty.tcp] netty.tcp { # Internal addr bind-hostname = localhost # also tried 127.0.0.1 bind-port = 2551 # External Docker addr hostname = 172.16.240.141 port = 9100 } } } Boxed up I run my container like this (to map ports)--the web port mapping works fine: docker run -it -p 9100:2551 -p 9101:8080 --name dexp localhost:5000/root My client tries to connect to it like this: val c = ConfigFactory parseString akka { actor { provider = akka.remote.RemoteActorRefProvider } remote { enabled-transports = [akka.remote.netty.tcp] netty.tcp { hostname = localhost port = 5151 } } } val sys = ActorSystem( boom, c ) val actor = sys.actorSelection( akka.tcp://dockerexp@172.16.240.141:9100/user/dockerexp) println(Actor: +actor) implicit val timo = Timeout(5.seconds) try { println( Await.result( (actor ? hey).asInstanceOf[Future[String]], 15. seconds) ) } finally { println(Dying...) Thread.sleep(5000) sys.shutdown() } This isn't working anymore--just times out and dies. It did work several months ago when 2.4-SNAPSHOT was first available. Am I doing something wrong? Thanks, Greg -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
Re: [akka-user] 2.4-SNAPSHOT Did bind-hostname/bind-port functionality change?
Hi Greg, have you verified that the configuration is applied to the application? On Tue, Apr 14, 2015 at 10:13 AM, tigerfoot gzol...@gmail.com wrote: Hello, I had a working demo of Akka remoting working in a Docker container. I ran my server in Docker and was able to communicate with it from an external program. My application.conf looked like this: akka { loglevel = ERROR stdout-loglevel = ERROR loggers = [akka.event.slf4j.Slf4jLogger] actor { provider = akka.remote.RemoteActorRefProvider } remote { enabled-transports = [akka.remote.netty.tcp] netty.tcp { # Internal addr bind-hostname = localhost # also tried 127.0.0.1 bind-port = 2551 # External Docker addr hostname = 172.16.240.141 port = 9100 } } } Boxed up I run my container like this (to map ports)--the web port mapping works fine: docker run -it -p 9100:2551 -p 9101:8080 --name dexp localhost:5000/root My client tries to connect to it like this: val c = ConfigFactory parseString akka { actor { provider = akka.remote.RemoteActorRefProvider } remote { enabled-transports = [akka.remote.netty.tcp] netty.tcp { hostname = localhost port = 5151 } } } val sys = ActorSystem( boom, c ) val actor = sys.actorSelection(akka.tcp:// dockerexp@172.16.240.141:9100/user/dockerexp) println(Actor: +actor) implicit val timo = Timeout(5.seconds) try { println( Await.result( (actor ? hey).asInstanceOf[Future[String]], 15.seconds) ) } finally { println(Dying...) Thread.sleep(5000) sys.shutdown() } This isn't working anymore--just times out and dies. It did work several months ago when 2.4-SNAPSHOT was first available. Am I doing something wrong? Thanks, Greg -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- Cheers, √ -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups Akka User List group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.