Hi Martynas Mickevičius,

thank you, this fixed the connection problem with the hostname that I
reported in the other thread! :-)

Pierre
> Also I just noticed an error in your configuration. Instead:
>
> remote {
>     enabled-transports = ["akka.remote.netty.tcp"]
>     hostname = "Vortex"
>     netty.tcp.port = 2553
> }
>
> it should be
>
> remote {
>     enabled-transports = ["akka.remote.netty.tcp"]
>     netty.tcp {
>         hostname = "Vortex"
>         port = 2553
>     }
> }
>
>
> On Fri, Jul 11, 2014 at 6:07 PM, Martynas Mickevičius
> <martynas.mickevic...@typesafe.com
> <mailto:martynas.mickevic...@typesafe.com>> wrote:
>
>     Hi Pierre,
>
>     router itself is not an actor. It is an optimized ActorRef which
>     sends messages directly to the routees. Therefore you can't select
>     router with ActorSelection. However you can select individual
>     children with ActorSelection which has names c1, c2, ...:
>
>     ActorSelection router_selection =
>     
> test_system.actorSelection("akka.tcp://PingActorSystem@192.168.2.17:2553/LocalRouter
>     <http://PingActorSystem@192.168.2.17:2553/LocalRouter>/c1");
>
>     But that is not very useful.
>
>
>     On Fri, Jul 11, 2014 at 2:00 PM, Pierre Falda
>     <p.fa...@disbrain.com <mailto:p.fa...@disbrain.com>> wrote:
>
>         Hi everyone,
>
>         I set up a little testing environment to debug another problem
>         with remoting, but I'm stuck on an issue (?) with
>         actorselection: telling a message to a remotely created router
>         works, telling the message to an actorselectopn of that
>         router, routes the message to deadletters.
>         Akka version: 2.3.3
>         (At the end of the mail, the application.conf)
>
>         My test code:
>
>         public class Main {
>
>             public static void main(String[] args) throws
>         InterruptedException {
>
>                 ActorSystem test_system =
>         akka.actor.ActorSystem.create("PingActorSystem");
>
>                
>         
> test_system.eventStream().subscribe(test_system.actorOf(Props.create(EventWatcher.class)),Object.class);
>
>                 ActorRef router =
>         test_system.actorOf(Props.create(LocalRouter.class).withRouter(new
>         FromConfig()),"LocalRouter");
>
>                 ActorSelection router_selection =
>         
> test_system.actorSelection("akka.tcp://PingActorSystem@192.168.2.17:2553/LocalRouter
>         <http://PingActorSystem@192.168.2.17:2553/LocalRouter>");
>
>                 Thread.sleep(1000);
>
>                 System.err.println(String.format("Selection ActorPath:
>         %s AnchorPath:
>         %s",router_selection.pathString(),router_selection.anchorPath()));
>
>                 router.tell(new Integer(1234),ActorRef.noSender());
>
>                 router_selection.tell("PING!?!?",ActorRef.noSender());
>
>             }
>
>         }
>
>         The Output:
>
>         [INFO] [07/11/2014 12:35:43.352] [main] [Remoting] Starting
>         remoting
>         [INFO] [07/11/2014 12:35:43.507] [main] [Remoting] Remoting
>         started; listening on addresses
>         :[akka.tcp://PingActorSystem@192.168.2.17:2553
>         <http://PingActorSystem@192.168.2.17:2553>]
>         [INFO] [07/11/2014 12:35:43.508] [main] [Remoting] Remoting
>         now listens on addresses:
>         [akka.tcp://PingActorSystem@192.168.2.17:2553
>         <http://PingActorSystem@192.168.2.17:2553>]
>         Received: akka.remote.AssociatedEvent
>         Selection ActorPath: /LocalRouter AnchorPath:
>         akka://PingActorSystem/
>         Received: akka.actor.DeadLetter
>         java.lang.String
>         Received: akka.event.Logging$Info
>         [INFO] [07/11/2014 12:35:44.540]
>         [PingActorSystem-akka.actor.default-dispatcher-4]
>         [akka://PingActorSystem/LocalRouter] Message
>         [java.lang.String] from
>         Actor[akka://PingActorSystem/deadLetters] to
>         Actor[akka://PingActorSystem/LocalRouter] was not delivered.
>         [1] dead letters encountered. This logging can be turned off
>         or adjusted with configuration settings
>         'akka.log-dead-letters' and
>         'akka.log-dead-letters-during-shutdown'.
>
>         The remote routees are successfully created and are not dead.
>         I have no log at all on the worker/routees console
>         (PongActorSystem), except for the receive of the numeric message.
>
>         Then I tried to ActorSelect the router from a third machine,
>         but I have the same behaviour: message are correctly sent to
>         the remote router (PingActoSystem), but instead
>         of forwarding it to the remotely deployed routees ( target {
>          nodes = ["akka.tcp://PongActorSystem@192.168.2.17:2552
>         <http://PongActorSystem@192.168.2.17:2552>"] } ) it routes the
>         message to deadletters.
>
>         Does anyone have ever had a similar issue? How could I fix?
>
>         Thanks in advance
>
>         - Pierre
>
>         Configuration:
>
>         akka {
>           loglevel = "INFO"
>           stdout-loglevel = "INFO"
>           actor {
>             provider = "akka.remote.RemoteActorRefProvider"
>             serialize-creators = on
>             serialize-messages = on
>             serializers {
>               java = "akka.serialization.JavaSerializer"
>               proto = "akka.remote.serialization.ProtobufSerializer"
>             }
>
>             serialization-bindings {
>               "java.lang.String" = java
>               "com.google.protobuf.Message" = proto
>             }
>
>             deployment {
>               /LocalRouter {
>                 target {
>                   nodes =
>         ["akka.tcp://PongActorSystem@192.168.2.17:2552
>         <http://PongActorSystem@192.168.2.17:2552>"]
>                 }
>                 router = balancing-pool
>                 nr-of-instances = 1
>               }
>
>             }
>             default-dispatcher {
>               throughput = 10
>               executor = "fork-join-executor"
>             }
>           }
>
>           remote {
>             enabled-transports = ["akka.remote.netty.tcp"]
>             hostname = "Vortex"
>             netty.tcp.port = 2553
>           }
>
>         }
>
>         -- 
>         >>>>>>>>>> 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
>         <mailto:akka-user+unsubscr...@googlegroups.com>.
>         To post to this group, send email to
>         akka-user@googlegroups.com <mailto: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
>
>
>
>
> -- 
> 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 a topic in the
> Google Groups "Akka User List" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/akka-user/L3WIkG6VZtk/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> akka-user+unsubscr...@googlegroups.com
> <mailto:akka-user+unsubscr...@googlegroups.com>.
> To post to this group, send email to akka-user@googlegroups.com
> <mailto: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.


-- 
Pierre Falda
Technical Manager
DisBrain s.r.l.
www.disbrain.com

-- 
>>>>>>>>>>      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.

Reply via email to