You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Jamie McCrindle <ja...@gmail.com> on 2007/03/05 15:54:45 UTC

Transport failed, attempting to automatically reconnect due to: java.io.EOFException

Hi all,

I keep getting the following exception at what appear to be random intervals:

2007-03-05 14:42:40,367 INFO [ActiveMQ Transport: tcp://localhost/1
27.0.0.1:51515] FailoverTransport.handleTransportFailure | Transport failed, att
empting to automatically reconnect due to: java.io.EOFException
java.io.EOFException
        at java.io.DataInputStream.readInt(DataInputStream.java:358)
        at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.
java:267)
        at org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTranspo
rt.java:156)
        at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:
136)
        at java.lang.Thread.run(Thread.java:595)

Any ideas? It doesn't appear to be affecting the messaging...

I'm using:

ActiveMQ 4.1.0 and a broker url of: tcp://localhost:61616

activemq.conf is the standard one out of the 4.1 distro.

cheers,
j.

Re: Transport failed, attempting to automatically reconnect due to: java.io.EOFException

Posted by xbranko <xb...@netscape.net>.
We are using the failover transport, but still are getting the same
exception, but in a different place (see stack trace):

org.apache.activemq.transport.failover.FailoverTransport Transport failed,
attempting to automatically reconnect due to: java.io.EOFException
java.io.EOFException
        at java.io.DataInputStream.readInt(DataInputStream.java:358)
        at
org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:267)
        at
org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:156)
        at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:136)
        at java.lang.Thread.run(Thread.java:595)

It happens after the message has been sent successfully, and the producer,
session and connection are closed (in that order).

What should one do to prevent it?
Thanks,
Branko
-- 
View this message in context: http://www.nabble.com/Transport-failed%2C-attempting-to-automatically-reconnect-due-to%3A-java.io.EOFException-tf3349326s2354.html#a12264994
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Transport failed, attempting to automatically reconnect due to: java.io.EOFException

Posted by DavidR <da...@corp.idt.net>.
James, 
We have a similar issue under different circumstances.
When we bounce our server which is using spring 2 to produce and consume
messages on a failover queue, we sometimes get a runaway log file due to the
process not shutting down correctly within tomcat.
We then get within seconds, mb's of log saying:

org.apache.activemq.transport.failover.FailoverTransport - Transport failed,
attempting to automatically reconnect due to: java.io.IOException
java.io.IOException
        at
org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:37)
        at
org.apache.activemq.state.ConnectionStateTracker.track(ConnectionStateTracker.java:94)
        at
org.apache.activemq.transport.failover.FailoverTransport.oneway(FailoverTransport.java:383)
        at
org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:43)
        at
org.apache.activemq.transport.ResponseCorrelator.asyncRequest(ResponseCorrelator.java:69)
        at
org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:74)
        at
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1171)
        at
org.apache.activemq.ActiveMQSession.syncSendPacket(ActiveMQSession.java:1660)
        at
org.apache.activemq.ActiveMQMessageConsumer.close(ActiveMQMessageConsumer.java:541)
        at
org.springframework.jms.support.JmsUtils.closeMessageConsumer(JmsUtils.java:144)
        at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.clearResources(DefaultMessageListenerContainer.java:899)
        at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:865)
        at java.lang.Thread.run(Thread.java:595)





dkfn wrote:
> 
> Thanks James,
> 
> I moved away from failover:tcp://localhost:61616 for reasons that now
> completely escape me. I'll put that back in and see the problem goes
> away.
> 
> cheers,
> j.
> 
> On 3/5/07, James Strachan <ja...@gmail.com> wrote:
>> On 3/5/07, Jamie McCrindle <ja...@gmail.com> wrote:
>> > Hi all,
>> >
>> > I keep getting the following exception at what appear to be random
>> intervals:
>> >
>> > 2007-03-05 14:42:40,367 INFO [ActiveMQ Transport: tcp://localhost/1
>> > 27.0.0.1:51515] FailoverTransport.handleTransportFailure | Transport
>> failed, att
>> > empting to automatically reconnect due to: java.io.EOFException
>> > java.io.EOFException
>> >         at java.io.DataInputStream.readInt(DataInputStream.java:358)
>> >         at
>> org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.
>> > java:267)
>> >         at
>> org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTranspo
>> > rt.java:156)
>> >         at
>> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:
>> > 136)
>> >         at java.lang.Thread.run(Thread.java:595)
>> >
>> > Any ideas? It doesn't appear to be affecting the messaging...
>> >
>> > I'm using:
>> >
>> > ActiveMQ 4.1.0 and a broker url of: tcp://localhost:61616
>> >
>> > activemq.conf is the standard one out of the 4.1 distro.
>>
>> It typically just means that the socket has closed while the async
>> reading thread is trying to read from the socket. It can generally be
>> ignored. If you were using a URL of failover:tcp://localhost:61616
>> then the transport would automatically reconnect under the covers for
>> you. If you're not using failover then maybe you're closing
>> connections?
>>
>> --
>>
>> James
>> -------
>> http://radio.weblogs.com/0112098/
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Transport-failed%2C-attempting-to-automatically-reconnect-due-to%3A-java.io.EOFException-tf3349326s2354.html#a11610082
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Transport failed, attempting to automatically reconnect due to: java.io.EOFException

Posted by Tim Bain <tb...@alumni.duke.edu>.
Details of the inactivity monitor are at
http://activemq.apache.org/activemq-inactivitymonitor.html. It's on by
default, so if you haven't modified any settings related to it, it should
be working correctly.

An EOFException typically means that something closed the TCP connection.
Often it's the program on the other end (if you're seeing this in the
client, then the broker may have closed it, or vice versa), so check that
program's logs to see if they tell you anything. It can also happen because
the other process was hard-killed (kill -9), or because a firewall between
the broker and the client killed the connection, or probably other things
as well.

If it happens infrequently and your clients reconnect to the broker and
resume processing without incident, then you can safely ignore it if you
want. If you don't want to ignore it and you want to dig into what's going
on, I'd start with both logs (client and broker), and if you can't see
anything in them then I'd probably try using WireShark to figure out what's
going on at the TCP layer and then go from there.

Tim

On Fri, Jul 14, 2017 at 7:13 PM, akpuvvada <ak...@gmail.com> wrote:

> I have not configured any inactivity monitoring. How can I check if any
> exists by default?
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/Transport-failed-attempting-to-automatically-
> reconnect-due-to-java-io-EOFException-tp2351687p4728568.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: Transport failed, attempting to automatically reconnect due to: java.io.EOFException

Posted by akpuvvada <ak...@gmail.com>.
I have not configured any inactivity monitoring. How can I check if any
exists by default?



--
View this message in context: http://activemq.2283324.n4.nabble.com/Transport-failed-attempting-to-automatically-reconnect-due-to-java-io-EOFException-tp2351687p4728568.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Transport failed, attempting to automatically reconnect due to: java.io.EOFException

Posted by Tim Bain <tb...@alumni.duke.edu>.
Are you using the inactivity monitor on the connection?

On Jul 14, 2017 2:54 AM, "akpuvvada" <ak...@gmail.com> wrote:

> We are also facing the same issue.
> I have two Active MQ Brokers on different machine configured as configured
> as Master/Slave using shared store.
> We are suing the current release version.
>         Transport (tcp://localhost:61616) failed , attempting to
> automatically
> reconnect: java.io.EOFException
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/Transport-failed-attempting-to-automatically-
> reconnect-due-to-java-io-EOFException-tp2351687p4728544.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: Transport failed, attempting to automatically reconnect due to: java.io.EOFException

Posted by akpuvvada <ak...@gmail.com>.
We are also facing the same issue.
I have two Active MQ Brokers on different machine configured as configured
as Master/Slave using shared store.
We are suing the current release version.
 	Transport (tcp://localhost:61616) failed , attempting to automatically
reconnect: java.io.EOFException 



--
View this message in context: http://activemq.2283324.n4.nabble.com/Transport-failed-attempting-to-automatically-reconnect-due-to-java-io-EOFException-tp2351687p4728544.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Transport failed, attempting to automatically reconnect due to: java.io.EOFException

Posted by Jamie McCrindle <ja...@gmail.com>.
Thanks James,

I moved away from failover:tcp://localhost:61616 for reasons that now
completely escape me. I'll put that back in and see the problem goes
away.

cheers,
j.

On 3/5/07, James Strachan <ja...@gmail.com> wrote:
> On 3/5/07, Jamie McCrindle <ja...@gmail.com> wrote:
> > Hi all,
> >
> > I keep getting the following exception at what appear to be random intervals:
> >
> > 2007-03-05 14:42:40,367 INFO [ActiveMQ Transport: tcp://localhost/1
> > 27.0.0.1:51515] FailoverTransport.handleTransportFailure | Transport failed, att
> > empting to automatically reconnect due to: java.io.EOFException
> > java.io.EOFException
> >         at java.io.DataInputStream.readInt(DataInputStream.java:358)
> >         at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.
> > java:267)
> >         at org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTranspo
> > rt.java:156)
> >         at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:
> > 136)
> >         at java.lang.Thread.run(Thread.java:595)
> >
> > Any ideas? It doesn't appear to be affecting the messaging...
> >
> > I'm using:
> >
> > ActiveMQ 4.1.0 and a broker url of: tcp://localhost:61616
> >
> > activemq.conf is the standard one out of the 4.1 distro.
>
> It typically just means that the socket has closed while the async
> reading thread is trying to read from the socket. It can generally be
> ignored. If you were using a URL of failover:tcp://localhost:61616
> then the transport would automatically reconnect under the covers for
> you. If you're not using failover then maybe you're closing
> connections?
>
> --
>
> James
> -------
> http://radio.weblogs.com/0112098/
>

Re: Transport failed, attempting to automatically reconnect due to: java.io.EOFException

Posted by James Strachan <ja...@gmail.com>.
On 3/5/07, Jamie McCrindle <ja...@gmail.com> wrote:
> Hi all,
>
> I keep getting the following exception at what appear to be random intervals:
>
> 2007-03-05 14:42:40,367 INFO [ActiveMQ Transport: tcp://localhost/1
> 27.0.0.1:51515] FailoverTransport.handleTransportFailure | Transport failed, att
> empting to automatically reconnect due to: java.io.EOFException
> java.io.EOFException
>         at java.io.DataInputStream.readInt(DataInputStream.java:358)
>         at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.
> java:267)
>         at org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTranspo
> rt.java:156)
>         at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:
> 136)
>         at java.lang.Thread.run(Thread.java:595)
>
> Any ideas? It doesn't appear to be affecting the messaging...
>
> I'm using:
>
> ActiveMQ 4.1.0 and a broker url of: tcp://localhost:61616
>
> activemq.conf is the standard one out of the 4.1 distro.

It typically just means that the socket has closed while the async
reading thread is trying to read from the socket. It can generally be
ignored. If you were using a URL of failover:tcp://localhost:61616
then the transport would automatically reconnect under the covers for
you. If you're not using failover then maybe you're closing
connections?

-- 

James
-------
http://radio.weblogs.com/0112098/