Hi Johan (good name!),

Artery/Aeron uses UDP, while the old remoting is TCP-based, did you
configure your docker nodes with udp port mappings?

--
Johan
Akka Team

On Wed, Nov 9, 2016 at 6:11 PM, <johan.kjolhede.bonniern...@gmail.com>
wrote:

> I'm pretty new to Akka and am currently trying out Akka's new Artery
> backend for akka-remoting (http://doc.akka.io/docs/akka/
> 2.4/scala/remoting-artery.html) while also testing the regular netty.tcp
> transport (http://doc.akka.io/docs/akka/2.4/scala/remoting.html).
>
> It looks fairly straight forward and I have two test applications running:
> * A producer application which sends a message to the consumer every 3
> seconds, and prints some stuff when the reply comes back
> * A consumer application which prints a message when it receives one, and
> then sends back a reply to sender()
>
> However I cannot get the communication to work when running both my
> applications with artery inside docker containers on the same host - it
> perfectly when I use netty.tcp though!.
> Below are the results I achieved:
>
> Results using artery
> Producer  Consumer  Result
> -------------------------
> IntelliJ  Docker    ok
> Docker    IntelliJ  ok
> IntelliJ  IntelliJ  ok
> Docker    Docker    fail (no message reaches the consumer, and the
> producer eventually prints handshake timeouts after 20 seconds/default
> timeout in akka-remote-artery - the same error message I get when not
> running any Consumer at all)
>
> Results using netty.tcp
> Producer  Consumer  Result
> -------------------------
> IntelliJ  Docker    ok
> Docker    IntelliJ  ok
> IntelliJ  IntelliJ  ok
> Docker    Docker    ok
>
> As you see above, I got all combinations to work except when using artery
> to communicate between two local docker containers.
> The akka configurations for the failing artery case are as follows
>
> Consumer conf (prettified output of typesafe Config object logged):
> {
>     "akka": {
>         "actor": {
>             "provider": "remote"
>         },
>         "remote": {
>             "artery": {
>                 "bind": {
>                     "hostname": "0.0.0.0",
>                     "port": 12345
>                 },
>                 "canonical": {
>                     "hostname": "192.168.99.100",
>                     "port": 12345
>                 },
>                 "enabled": "on"
>             }
>         }
>     }
> }
>
> Producer conf (prettified output of typesafe Config object logged):
> {
>     "akka": {
>         "actor": {
>             "provider": "remote"
>         },
>         "remote": {
>             "artery": {
>                 "bind": {
>                     "hostname": "0.0.0.0",
>                     "port": 12346
>                 },
>                 "canonical": {
>                     "hostname": "192.168.99.100",
>                     "port": 12346
>                 },
>                 "enabled": "on"
>             }
>         }
>     }
> }
>
>
> 192.168.99.100 is the IP of my docker machine executing both containers.
> The equivalent netty.tcp config works fine (as seen in the results table
> earlier in this message)
>
> *However using artery I just get zero activity on the consumer, and
> eventually the producer starts logging errors:*
> [ERROR] [11/09/2016 16:24:17.201] 
> [producer-system-akka.remote.default-remote-dispatcher-6]
> [akka.remote.artery.Association(akka://producer-system)] Outbound message
> stream to [akka://consumer-system@192.168.99.100:12345] failed.
> Restarting it. Handshake with [akka://consumer-system@192.168.99.100:12345]
> did not complete within 20000 ms 
> (akka.remote.artery.OutboundHandshake$HandshakeTimeoutException)
> after about 20 seconds, indicating what I assume is a timeout.
>
> When I use netty.tcp it works just fine between the containers.
> What is also strange is that it works with artery when I move one of the
> applications outside of a docker container. Both
>
> When running each application outside docker (e.g. from within intelliJ
> during development) they can communicate with each other fine, but as soon
> as I try to make them talk to each other with artery from docker container
> to docker container, no messages get through to the consumer
> Each application can be configured (cmd line args) to communicate with
> either netty.tcp or artery.
>
> I've repeatedly gone over the configurations, code and startup arguments
> from scratch now so many times, and had colleagues look at it as well. We
> cannot figure out at all what could be wrong here :S.
>
> The following are the docker startup commands. The command line arguments
> you see here are used to generate the conf you see above.
>
> Consumer:
> docker run --shm-size 1024M -p 12345:12345 -p 12345:12345/udp --rm
> akka-remote-eval-consumer:0.1.0-SNAPSHOT --transport tcp --host
> 192.168.99.100 --port 12345 --bind-host 0.0.0.0 --bind-port 12345
>
> Producer:
> docker run --shm-size 1024M -p 11001:11001/udp -p 12346:12346/udp --rm
> akka-remote-eval-producer:0.1.0-SNAPST --transport artery --host
> 192.168.99.100 --port 12346 --bind-host 0.0.0.0 --bind-port 12346
> --consumer-host 192.168.99.100 --consumer-port 12345
>
> Running this on a regular macbook pro with what I think are the latest
> updates, oracle jdk8, docker running with docker-machine.
> Using akka-actor and akka-remote 2.4.12
> Note: We are running an older docker version if that is of any importance:
> 1.10.2
>
> Any ideas of what I could be doing wrong?
>
> / Johan
>
> --
> >>>>>>>>>> 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 https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.

-- 
>>>>>>>>>>      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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to