-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
createActor capability failures are not easy to diagnose #14
Comments
Not entirely sure if it fits to this, but I am having trouble with continuing to process something even though an actor couldn't be created and the AS therefore not having the correct capabilities. Scenario: Code(actor_test.py) I start an actor system by using the start scripts from the docu
Logging output (with B)
Logging output (without B)
|
Hi @KorbinianK, Your situation is related in that it's hard to supply the information that would help you diagnose this directly, and it's also having some subtle effects.
def receiveUnrecognizedMessage(self, message, sender):
logging.warning("Handler got unknown message from %s: %s (%s)", sender, message, type(message))
def receiveMsg_PoisonMessage(self, poisonmsg, sender):
origmsg = poisonmsg.poisonMessage
if isinstance(origmsg, Message):
logging.warning('Message returned as poison: %s', poisonmsg)
self.send(self.myAddress, origmsg) # fake a response from the actual target
else:
logging.error("Unrecognized poisonmessage from %s: %s (%s)', sender, origmsg, type(origmsg))
Hopefully this helps and will be useful in your actual implementation. If you have more problems, or if I haven't explained the above very clearly, please let me know. -Kevin |
Thanks a lot again for the very detailed and useful explanation. It cleared up a few things and helped a great deal. I'm working towards a boilerplate handler and message for my implementation and catching those messages will certainly be useful 👍 So glad this project still receives support by the developer, having lots of fun with the actor system. |
When a createActor is performed and there is no ActorSystem that can meet the requirements of that Actor, the failure tends to be obscure: the thespian.log internal log will contain something like "Pending Actor create for ActorAddr-(T|:43797) failed (3586): None", and subsequent messages are likely to result in a PoisonMessage response:
From thespianpy#50:
"The message wrapped into the poison message (attribute poisonMessage) is the initialization message sent to the named actor after creation. The attribute details contains the string Child Aborted."
It would be nice if there was a clearer indication of the createActor failure and the corresponding failure reason.
The text was updated successfully, but these errors were encountered: