Path to Actor changed by Akka

34 views
Skip to first unread message

Joseph Mansigian

unread,
Apr 14, 2017, 9:06:25 AM4/14/17
to Akka User List

When sending a message to a remote actor I get an always repeatable failed send with a dead letter being produced. The recipient actor is a remote actor in a different JVM than the sending actor but both sender and recipient are executing on the same machine. Both sender and recipient actors belong to the same ActorSystem. I am using the default message dispatcher. I am using akka-2.4.16 with Scala 2.11.8 and all of the JVM are Java 1.8.0_112 running on Linux Mint 17.


Remote Path: akka.tcp://recog...@127.0.0.1:4000/user/Speaker-787570238


Local Path: akka://recognition/user/Speaker-787570238


What happens is when I do an actorSelection using the Remote Path above that path is transformed by Akka into the Local Path above . Akka of course cannot deliver the message because there is no actor at the local path. I have confirmed with a print in the program immediately before the actorSelection that I am giving the Remote Path as the path argument to the actorSelection. I have subscribed to receive DeadLetters and the data there shows that the recipient actor's path has been changed from the Remote Path to the Local Path. I have debug turned on and it corroborates that change occurred to the path.


I have investigated MessageDespatcher to see if this is the behavior of the default dispatcher but was not able to find an answer in the documentation.


Does anyone have any insight in what is going on?


Thank You.



Patrik Nordwall

unread,
Apr 15, 2017, 11:28:11 AM4/15/17
to Akka User List
The problem is not some wrong translation.
Are you sure that the destination actor is running at the given path?

You can enable more logging: http://doc.akka.io/docs/akka/2.5/scala/logging.html#Auxiliary_remote_logging_options

/Patrik
--
>>>>>>>>>> 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+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Joseph Mansigian

unread,
Apr 15, 2017, 2:27:59 PM4/15/17
to Akka User List
You were correct in your suspicion that the destination actor was not running at the given path.  In fact it was not running at all.  In debugging I was thrown off by seeing that a print of 'self.path' in the destination actor expressed a local path and I had configured a remote path to the destination actor. This made me erroneously think that some kind of path translation was being done.
Problem is fixed.  Thank you, Patrik.


On Saturday, April 15, 2017 at 11:28:11 AM UTC-4, Patrik Nordwall wrote:
The problem is not some wrong translation.
Are you sure that the destination actor is running at the given path?

You can enable more logging: http://doc.akka.io/docs/akka/2.5/scala/logging.html#Auxiliary_remote_logging_options

/Patrik
fre 14 apr. 2017 kl. 15:06 skrev Joseph Mansigian <joseph.c....@gmail.com>:

When sending a message to a remote actor I get an always repeatable failed send with a dead letter being produced. The recipient actor is a remote actor in a different JVM than the sending actor but both sender and recipient are executing on the same machine. Both sender and recipient actors belong to the same ActorSystem. I am using the default message dispatcher. I am using akka-2.4.16 with Scala 2.11.8 and all of the JVM are Java 1.8.0_112 running on Linux Mint 17.


Remote Path: akka.tcp://reco...@127.0.0.1:4000/user/Speaker-787570238


Local Path: akka://recognition/user/Speaker-787570238


What happens is when I do an actorSelection using the Remote Path above that path is transformed by Akka into the Local Path above . Akka of course cannot deliver the message because there is no actor at the local path. I have confirmed with a print in the program immediately before the actorSelection that I am giving the Remote Path as the path argument to the actorSelection. I have subscribed to receive DeadLetters and the data there shows that the recipient actor's path has been changed from the Remote Path to the Local Path. I have debug turned on and it corroborates that change occurred to the path.


I have investigated MessageDespatcher to see if this is the behavior of the default dispatcher but was not able to find an answer in the documentation.


Does anyone have any insight in what is going on?


Thank You.



Patrik Nordwall

unread,
Apr 15, 2017, 2:57:16 PM4/15/17
to Akka User List
You are welcome
Reply all
Reply to author
Forward
0 new messages