activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joe Fernandez" <joe.fernan...@ttmsolutions.com>
Subject RE: "WARNING: Transport failed" ... org.apache.activemq.transport.failover.FailoverTransport handleTransportFailure
Date Fri, 07 Mar 2008 14:36:55 GMT
The SO_TIMEOUT is a standard java.net.Socket option. When set to a non-zero
value, the Socket read() call will block for only the amount of time
specified. If the timeout expires, the SocketTimeoutException will get
hurled, but the Socket connection should still be treated as active. A
timeout of zero (default) instructs the read to block indefinitely. 

The maxInactivityDuration is an OpenWire option that is used for detecting
dead sockets. There are cases where a Socket will never be notified that its
peer has gone away (e.g., its machine has been powered off or disconnected
from the net) so you implement something like maxInactivityDuration to
determine for yourself that the Socket has died. 

There is also the SO_KEEPALIVE standard java.net.Socket option, which when
set causes the underlying TCP stack to send a 'keepalive' probe to the
remote peer system if the connection has been idle for a specified amount of
time. The probe should provoke the peer to send back an ACK thus confirming
that the connection is okay. If the ACK is not received, then it confirms
the peer has gone away and the connection is dead. However, the keepalive
doesn't always work and that is why you sometimes want to implement
something more reliable (like maxInactivityDuration) at the application
layer. 

Joe
www.ttmsolutions.com



> -----Original Message-----
> From: Eric Rodriguez [mailto:toxicafunk@gmail.com]
> Sent: Friday, March 07, 2008 6:14 AM
> To: users@activemq.apache.org
> Subject: Re: "WARNING: Transport failed" ...
> org.apache.activemq.transport.failover.FailoverTransport
> handleTransportFailure
> 
> Is this timeout the same as the:
> 
> soTimeout (long) sets the SO_TIMEOUT value (in milliseconds) on the socket
> 
> configured on the TCP Transport and described here:
> http://activemq.apache.org/activemq-3-transport-configurations.html
> 
> I'm a bit confused about the different tiemouts that can be specified on
> a JMS solution.
> 
> Thanks,
> Eric
> 
> Andrew wrote:
> > That's all it was. Thanks.
> >
> > -----Original Message-----
> > From: James Strachan [mailto:james.strachan@gmail.com]
> > Sent: Tuesday, March 04, 2008 1:06 AM
> > To: users@activemq.apache.org
> > Subject: Re: "WARNING: Transport failed" ...
> > org.apache.activemq.transport.failover.FailoverTransport
> > handleTransportFailure
> >
> > It looks like the socket failed - could be thebroker thinking the
> > socket was inactive. You could try increasing or disabling the
> > inactivity timeout.
> >
> > On 03/03/2008, Andrew <andrew@oc384.net> wrote:
> >> Anyone know why this would happen?  Other clients connected
> simultaneously
> >>  don't disconnect.  Everything is on a simple LAN so no networking
> issues
> >>  should exist for one client and not others..
> >>  Thanks,
> >>  Andrew
> >>
> >>
> >>
> >>  Mar 3, 2008 3:00:55 PM
> >>  org.apache.activemq.transport.failover.FailoverTransport
> >>  handleTransportFailure
> >>  WARNING: Transport failed, attempting to automatically reconnect due
> to:
> >>  java.io.EOFException
> >>  java.io.EOFException
> >>         at java.io.DataInputStream.readInt(DataInputStream.java:375)
> >>         at
> >>
> >
> org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:
> 26
> >>  8)
> >>         at
> >>
> >
> org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.ja
> va
> >>  :192)
> >>         at
> >>
> >
> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:184
> )
> >>         at
> >>
> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:172)
> >>         at java.lang.Thread.run(Thread.java:619)
> >>  Mar 3, 2008 3:00:56 PM
> >>  org.apache.activemq.transport.failover.FailoverTransport$1 iterate
> >>  INFO: Successfully reconnected to tcp://tupolev:61616
> >>
> >>  Mar 3, 2008 3:01:56 PM
> >>  org.apache.activemq.transport.failover.FailoverTransport
> >>  handleTransportFailure
> >>  WARNING: Transport failed, attempting to automatically reconnect due
> to:
> >>  java.io.EOFException
> >>  java.io.EOFException
> >>         at java.io.DataInputStream.readInt(DataInputStream.java:375)
> >>         at
> >>
> >
> org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:
> 26
> >>  8)
> >>         at
> >>
> >
> org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.ja
> va
> >>  :192)
> >>         at
> >>
> >
> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:184
> )
> >>         at
> >>
> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:172)
> >>         at java.lang.Thread.run(Thread.java:619)
> >>  Mar 3, 2008 3:01:56 PM
> >>  org.apache.activemq.transport.failover.FailoverTransport$1 iterate
> >>  INFO: Successfully reconnected to tcp://tupolev:61616
> >>
> >>
> >>
> >
> >


Mime
View raw message