On Tue, 2014-05-06 at 02:05 -0700, Ulf wrote:
> Hello,
>
> I am seeing this log message from akka.
>
> 2014-05-06 10:42:20 akka.actor.OneForOneStrategy SEVERE : Some(null)
> (of class scala.Some)
>
> I am using Akka 2.2.3 and no, I can't upgrade. It's not my decision. I
> also can't show the code. Sorry.
>
> I have some clue about which actor is involved, but I have no clue as
> to how I can proceed with the debugging.
> I have had a brief look at the source for OneForOneStrategy but I got
> no clues from that. It might be due to my own ineptitude, but...
>
> The error happens after the completion of preStart() in the suspect
> actor and it the get stuck in a restart - error - restart ... loop.
>
> Any pointers to what I can do next is appreciated.
Just add a supervision strategy on the parent that logs more information
(ie the parent of the suspected culprit actor) that contains:
override val supervisorStrategy: SupervisorStrategy = OneForOneStrategy(100,
10.seconds, true) {
case _: ActorInitializationException => Stop
case _: ActorKilledException => Stop
case x: Exception => log.error(x, "Error - {} restart because {}", sender,
x.getMessage); SupervisorStrategy.Restart
case _ => Escalate
}
This should normally log the full stacktrace which normally should point
to the line of the exception.
You can also add a preRestart hook to the suspected actor to log more
information.
You should also configure your logs to show the MDC (if you use
slf4j/logback), because it will then show the actor that logged this
line (ie the parent of the restarting actor).
Hope that helps,
--
Brice Figureau
My Blog: http://www.masterzen.fr/
--
>>>>>>>>>> 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.