You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@mina.apache.org by "Kimpton, C (Chris)" <Ch...@rabobank.com> on 2014/05/13 14:39:49 UTC
Handling of connection timed out in mina
Hi,
I am using the Quickfix/J library (www.quickfixj.org<http://www.quickfixj.org>) which uses MINA for its network connections.
Every morning at pretty much the same time, we see a connection timed out error.
08:17:08:180|TH25 ERROR: Socket (/145.72.29.180:49560): java.io.IOException: Connection timed out
08:17:08:180|TH25 EXCEPTION class java.io.IOException: Connection timed out
08:17:08:180|TH25 Stack Trace:
08:17:08:180|TH25 : sun.nio.ch.FileDispatcher.read0(Native Method)
08:17:08:180|TH25 : sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:21)
08:17:08:180|TH25 : sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:198)
08:17:08:180|TH25 : sun.nio.ch.IOUtil.read(IOUtil.java:171)
08:17:08:180|TH25 : sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:245)
08:17:08:180|TH25 : org.apache.mina.transport.socket.nio.SocketIoProcessor.read(SocketIoProcessor.java:218)
08:17:08:180|TH25 : org.apache.mina.transport.socket.nio.SocketIoProcessor.process(SocketIoProcessor.java:198)
08:17:08:180|TH25 : org.apache.mina.transport.socket.nio.SocketIoProcessor.access$400(SocketIoProcessor.java:45)
08:17:08:180|TH25 : org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(SocketIoProcessor.java:485)
08:17:08:180|TH25 : org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
08:17:08:180|TH25 : java.lang.Thread.run(Thread.java:662)
>From the SocketIOProcessor code, line 511 should catch this exception and log it as a warning - but somehow it came out as an ERROR.
https://git-wip-us.apache.org/repos/asf?p=mina.git;a=blob;f=core/src/main/java/org/apache/mina/transport/socket/nio/SocketIoProcessor.java;h=24c30417211cd99770076c4ac91b5ccaadc1162f;hb=1.1
That code is an infinite loop, so it seems to just try again, when there is an issue. Is that correct?
Any thoughts on why it came out as an error and not a warning?
The actual connection did not seem to be disrupted - FIX heartbeats before and after were fine, not even a login message.
Thanks in advance,
Chris
_____________________________________________________________
This email (including any attachments to it) is confidential, legally privileged, subject to copyright and is sent for the personal attention of the intended recipient only. If you have received this email in error, please advise us immediately and delete it. You are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. Although we have taken reasonable precautions to ensure no viruses are present in this email, we cannot accept responsibility for any loss or damage arising from the viruses in this email or attachments. We exclude any liability for the content of this email, or for the consequences of any actions taken on the basis of the information provided in this email or its attachments, unless that information is subsequently confirmed in writing.
_____________________________________________________________
RE: Handling of connection timed out in mina
Posted by "Kimpton, C (Chris)" <Ch...@rabobank.com>.
Thanks - will see if there is something happening on the link between us :)
-----Original Message-----
From: Emmanuel Lécharny [mailto:elecharny@gmail.com]
Sent: 13 May 2014 16:50
To: users@mina.apache.org
Subject: Re: Handling of connection timed out in mina
Le 13/05/2014 14:39, Kimpton, C (Chris) a écrit :
> Hi,
> I am using the Quickfix/J library (www.quickfixj.org<http://www.quickfixj.org>) which uses MINA for its network connections.
> Every morning at pretty much the same time, we see a connection timed out error.
> 08:17:08:180|TH25 ERROR: Socket (/145.72.29.180:49560):
> java.io.IOException: Connection timed out
> 08:17:08:180|TH25 EXCEPTION class java.io.IOException: Connection
> timed out
> 08:17:08:180|TH25 Stack Trace:
> 08:17:08:180|TH25 : sun.nio.ch.FileDispatcher.read0(Native Method)
> 08:17:08:180|TH25 : sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:21)
> 08:17:08:180|TH25 : sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:198)
> 08:17:08:180|TH25 : sun.nio.ch.IOUtil.read(IOUtil.java:171)
> 08:17:08:180|TH25 : sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:245)
> 08:17:08:180|TH25 : org.apache.mina.transport.socket.nio.SocketIoProcessor.read(SocketIoProcessor.java:218)
> 08:17:08:180|TH25 : org.apache.mina.transport.socket.nio.SocketIoProcessor.process(SocketIoProcessor.java:198)
> 08:17:08:180|TH25 : org.apache.mina.transport.socket.nio.SocketIoProcessor.access$400(SocketIoProcessor.java:45)
> 08:17:08:180|TH25 : org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(SocketIoProcessor.java:485)
> 08:17:08:180|TH25 : org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
> 08:17:08:180|TH25 : java.lang.Thread.run(Thread.java:662)
>
> From the SocketIOProcessor code, line 511 should catch this exception and log it as a warning - but somehow it came out as an ERROR.
>
> https://git-wip-us.apache.org/repos/asf?p=mina.git;a=blob;f=core/src/m
> ain/java/org/apache/mina/transport/socket/nio/SocketIoProcessor.java;h
> =24c30417211cd99770076c4ac91b5ccaadc1162f;hb=1.1
> That code is an infinite loop, so it seems to just try again, when there is an issue. Is that correct?
> Any thoughts on why it came out as an error and not a warning?
Because it *is* an error.
What's going on is that the socket woke up the selector, telling it that there is something to read, but as soon as the thread tries to read from the socket, it's not present.
Are you using a proxy or some router in between ?
>
> The actual connection did not seem to be disrupted - FIX heartbeats before and after were fine, not even a login message.
> Thanks in advance,
> Chris
>
>
> _____________________________________________________________
>
> This email (including any attachments to it) is confidential, legally privileged, subject to copyright and is sent for the personal attention of the intended recipient only. If you have received this email in error, please advise us immediately and delete it. You are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. Although we have taken reasonable precautions to ensure no viruses are present in this email, we cannot accept responsibility for any loss or damage arising from the viruses in this email or attachments. We exclude any liability for the content of this email, or for the consequences of any actions taken on the basis of the information provided in this email or its attachments, unless that information is subsequently confirmed in writing.
> _____________________________________________________________
>
Re: Handling of connection timed out in mina
Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 13/05/2014 14:39, Kimpton, C (Chris) a écrit :
> Hi,
> I am using the Quickfix/J library (www.quickfixj.org<http://www.quickfixj.org>) which uses MINA for its network connections.
> Every morning at pretty much the same time, we see a connection timed out error.
> 08:17:08:180|TH25 ERROR: Socket (/145.72.29.180:49560): java.io.IOException: Connection timed out
> 08:17:08:180|TH25 EXCEPTION class java.io.IOException: Connection timed out
> 08:17:08:180|TH25 Stack Trace:
> 08:17:08:180|TH25 : sun.nio.ch.FileDispatcher.read0(Native Method)
> 08:17:08:180|TH25 : sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:21)
> 08:17:08:180|TH25 : sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:198)
> 08:17:08:180|TH25 : sun.nio.ch.IOUtil.read(IOUtil.java:171)
> 08:17:08:180|TH25 : sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:245)
> 08:17:08:180|TH25 : org.apache.mina.transport.socket.nio.SocketIoProcessor.read(SocketIoProcessor.java:218)
> 08:17:08:180|TH25 : org.apache.mina.transport.socket.nio.SocketIoProcessor.process(SocketIoProcessor.java:198)
> 08:17:08:180|TH25 : org.apache.mina.transport.socket.nio.SocketIoProcessor.access$400(SocketIoProcessor.java:45)
> 08:17:08:180|TH25 : org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(SocketIoProcessor.java:485)
> 08:17:08:180|TH25 : org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
> 08:17:08:180|TH25 : java.lang.Thread.run(Thread.java:662)
>
> From the SocketIOProcessor code, line 511 should catch this exception and log it as a warning - but somehow it came out as an ERROR.
> https://git-wip-us.apache.org/repos/asf?p=mina.git;a=blob;f=core/src/main/java/org/apache/mina/transport/socket/nio/SocketIoProcessor.java;h=24c30417211cd99770076c4ac91b5ccaadc1162f;hb=1.1
> That code is an infinite loop, so it seems to just try again, when there is an issue. Is that correct?
> Any thoughts on why it came out as an error and not a warning?
Because it *is* an error.
What's going on is that the socket woke up the selector, telling it that
there is something to read, but as soon as the thread tries to read from
the socket, it's not present.
Are you using a proxy or some router in between ?
>
> The actual connection did not seem to be disrupted - FIX heartbeats before and after were fine, not even a login message.
> Thanks in advance,
> Chris
>
>
> _____________________________________________________________
>
> This email (including any attachments to it) is confidential, legally privileged, subject to copyright and is sent for the personal attention of the intended recipient only. If you have received this email in error, please advise us immediately and delete it. You are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. Although we have taken reasonable precautions to ensure no viruses are present in this email, we cannot accept responsibility for any loss or damage arising from the viruses in this email or attachments. We exclude any liability for the content of this email, or for the consequences of any actions taken on the basis of the information provided in this email or its attachments, unless that information is subsequently confirmed in writing.
> _____________________________________________________________
>