Sorry to hi-jack this 2 month old thread; but I actually had the same 
problem and having it in "DEBUG" log isn't quite enough for me.

Basically there's a feature of my app that could use the failure mode for 
diagnostics: "timeout" in our use-case typically means someone forgot to 
open their firewall where "connection refused" means we probably have the 
wrong connection information. Ideally, this would get surfaced in my GUI, 
instead of someone needing to ping/telnet/netcat on the terminal to 
disambiguate these cases.

Not absolutely critical, but just thought I'd add some feedback in favor of 
adding this to the ConnectionFailed case class.

On Tuesday, April 8, 2014 8:29:27 AM UTC-7, Andrew Charles wrote:
>
> I'm building a simple load testing application that uses akka to connect 
> to a server via TCP.  I am using the examples provided for connecting to a 
> TCP endpoint in the akka IO docs.
>
> One thing I immediately run into is that while the system will tell you 
> that a connection attempt has failed, there is no way to access the reason 
> it failed.  After looking at the source code for TcpOutgoingConnection, it 
> looks like it is simply output to the DEBUG level in akka and that's it.
>
> Here is my code for handling a connection failure:
>
> case CommandFailed(c: Connect) => 
> println(s"Connect failed to $remote. Reason: ${c.failureMessage}. Will try 
> again in 30 seconds")
>
> This simply tells me CommandFailed(Connect) without giving me a detailed 
> reason, such as "connection refused".
>
> Perhaps I'm missing something here, but is there a way to get to this 
> information so I can display it on the console without having to force akka 
> into DEBUG log mode?  
>
> Thanks for any assistance! 
>

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

Reply via email to