activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ttmgary <gary.wat...@ttmsolutions.com>
Subject Re: Consumer client stops after failover
Date Tue, 20 Apr 2010 15:51:03 GMT

Frank,

I'm not sure where you stand on this, as it has been a while, but I believe
your problem is the re-emergence of 
https://issues.apache.org/activemq/browse/AMQ-796 AMQ-796 . I recently
confirmed that this problem exists in 5.3.0 and 5.3.1. Which AMQ release are
you using?

You can work around the problem by simply adding and starting a do-nothing,
non-daemon thread to your app.

Gary


Frank Werner wrote:
> 
> Hello everybody,
> 
> I'm using a little consumer client (java file attached) to monitor a
> message topic. If the broker which the client is connected to does not
> fail, everything is ok. If the broker fails, the client tries to connect
> to
> the second broker (the debug says he did!) and then the client stops
> without an exception or any other message. If I start the script then
> again
> it connects to the second broker and shows me the messages.
> 
> In very rare cases the switchover works perfectly, so I do not assume that
> there is
> an issue with my two brokers in general. In that cases the second last
> ResponseCorrelator lines are shown to, so I think that this is not the
> cause for this issue?
> 
> Is there somebody in the ActiveMQ world, who can give me a hint to solve
> this problem?
> 
> Thanks in advance,
> -Frank-
> 
> Here is the debug output:
> 
> 2010-03-03 17:21:38,300 DEBUG
> org.apache.activemq.transport.failover.FailoverTransport: Reconnect was
> triggered but transport is not started yet. Wait for start to connect the
> transport.
> 2010-03-03 17:21:38,434 DEBUG
> org.apache.activemq.transport.failover.FailoverTransport: Started.
> 2010-03-03 17:21:38,434 DEBUG
> org.apache.activemq.transport.failover.FailoverTransport: Waking up
> reconnect task
> 2010-03-03 17:21:38,437 DEBUG
> org.apache.activemq.transport.failover.FailoverTransport: urlList
> connectionList:[tcp://broker2:61616, tcp://broker1:61616]
> 2010-03-03 17:21:38,437 DEBUG
> org.apache.activemq.transport.failover.FailoverTransport: Attempting
> connect to: tcp://broker2:61616
> 2010-03-03 17:21:38,513 DEBUG
> org.apache.activemq.transport.WireFormatNegotiator: Sending:
> WireFormatInfo { version=5, properties={CacheSize=1024, CacheEnabled=true,
> SizePrefixDisabled=false, MaxInactivityDurationInitalDelay=10000,
> TcpNoDelayEnabled=true, MaxInactivityDuration=30000,
> TightEncodingEnabled=true, StackTraceEnabled=true},
> magic=[A,c,t,i,v,e,M,Q]}
> 2010-03-03 17:21:38,517 DEBUG
> org.apache.activemq.transport.WireFormatNegotiator: Received WireFormat:
> WireFormatInfo { version=5, properties={CacheSize=1024, CacheEnabled=true,
> SizePrefixDisabled=false, MaxInactivityDurationInitalDelay=10000,
> TcpNoDelayEnabled=true, MaxInactivityDuration=30000,
> TightEncodingEnabled=true, StackTraceEnabled=true},
> magic=[A,c,t,i,v,e,M,Q]}
> 2010-03-03 17:21:38,517 DEBUG
> org.apache.activemq.transport.WireFormatNegotiator:
> tcp://broker2/10.0.91.112:61616 before negotiation:
> OpenWireFormat{version=5, cacheEnabled=false, stackTraceEnabled=false,
> tightEncodingEnabled=false, sizePrefixDisabled=false}
> 2010-03-03 17:21:38,518 DEBUG
> org.apache.activemq.transport.WireFormatNegotiator:
> tcp://broker2/10.0.91.112:61616 after negotiation:
> OpenWireFormat{version=5, cacheEnabled=true, stackTraceEnabled=true,
> tightEncodingEnabled=true, sizePrefixDisabled=false}
> 2010-03-03 17:21:38,519 DEBUG
> org.apache.activemq.transport.failover.FailoverTransport: Connection
> established
> 2010-03-03 17:21:38,519 INFO 
> org.apache.activemq.transport.failover.FailoverTransport: Successfully
> connected to tcp://broker2:61616
> Waiting for messages [CTRL-C to abort] ...
> 2010-03-03 17:21:58,524 DEBUG
> org.apache.activemq.transport.InactivityMonitor: 10000 ms elapsed since
> last write check.
> 2010-03-03 17:22:08,523 DEBUG
> org.apache.activemq.transport.InactivityMonitor: 9999 ms elapsed since
> last write check.
> 2010-03-03 17:22:18,519 DEBUG
> org.apache.activemq.transport.InactivityMonitor: 29995 ms elapsed since
> last read check.
> 2010-03-03 17:22:18,523 DEBUG
> org.apache.activemq.transport.InactivityMonitor: 10000 ms elapsed since
> last write check.
> 2010-03-03 17:22:28,523 DEBUG
> org.apache.activemq.transport.InactivityMonitor: 10000 ms elapsed since
> last write check.
> 2010-03-03 17:22:38,523 DEBUG
> org.apache.activemq.transport.InactivityMonitor: 10000 ms elapsed since
> last write check.
> 2010-03-03 17:22:48,523 DEBUG
> org.apache.activemq.transport.InactivityMonitor: 30003 ms elapsed since
> last read check.
> 2010-03-03 17:22:48,523 DEBUG
> org.apache.activemq.transport.InactivityMonitor: 10000 ms elapsed since
> last write check.
> 
> < ... at this point I stop broker1 ...>
> 
> 2010-03-03 17:22:56,672 DEBUG
> org.apache.activemq.transport.tcp.TcpTransport: Stopping transport
> tcp://broker2/10.0.91.112:61616
> 2010-03-03 17:22:56,673 WARN 
> org.apache.activemq.transport.failover.FailoverTransport: Transport failed
> to tcp://broker2:61616 , attempting to automatically reconnect due to:
> java.io.EOFException
> 2010-03-03 17:22:56,675 DEBUG
> org.apache.activemq.transport.failover.FailoverTransport: Transport failed
> with the following exception:
> java.io.EOFException
>         at java.io.DataInputStream.readInt(DataInputStream.java:375)
>         at
> org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:272)
>         at
> org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:210)
>         at
> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:202)
>         at
> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:185)
>         at java.lang.Thread.run(Thread.java:619)
> 2010-03-03 17:22:56,678 DEBUG
> org.apache.activemq.transport.failover.FailoverTransport: urlList
> connectionList:[tcp://broker1:61616, tcp://broker2:61616]
> 2010-03-03 17:22:56,678 DEBUG
> org.apache.activemq.transport.failover.FailoverTransport: Attempting
> connect to: tcp://broker1:61616
> 2010-03-03 17:22:56,687 DEBUG
> org.apache.activemq.transport.WireFormatNegotiator: Sending:
> WireFormatInfo { version=5, properties={CacheSize=1024, CacheEnabled=true,
> SizePrefixDisabled=false, MaxInactivityDurationInitalDelay=10000,
> TcpNoDelayEnabled=true, MaxInactivityDuration=30000,
> TightEncodingEnabled=true, StackTraceEnabled=true},
> magic=[A,c,t,i,v,e,M,Q]}
> 2010-03-03 17:22:56,689 DEBUG
> org.apache.activemq.transport.WireFormatNegotiator: Received WireFormat:
> WireFormatInfo { version=5, properties={CacheSize=1024, CacheEnabled=true,
> SizePrefixDisabled=false, MaxInactivityDurationInitalDelay=10000,
> TcpNoDelayEnabled=true, MaxInactivityDuration=30000,
> TightEncodingEnabled=true, StackTraceEnabled=true},
> magic=[A,c,t,i,v,e,M,Q]}
> 2010-03-03 17:22:56,689 DEBUG
> org.apache.activemq.transport.WireFormatNegotiator:
> tcp://broker1/10.91.0.11:61616 before negotiation:
> OpenWireFormat{version=5, cacheEnabled=false, stackTraceEnabled=false,
> tightEncodingEnabled=false, sizePrefixDisabled=false}
> 2010-03-03 17:22:56,690 DEBUG
> org.apache.activemq.transport.WireFormatNegotiator:
> tcp://broker1/10.91.0.11:61616 after negotiation:
> OpenWireFormat{version=5, cacheEnabled=true, stackTraceEnabled=true,
> tightEncodingEnabled=true, sizePrefixDisabled=false}
> 2010-03-03 17:22:56,690 DEBUG
> org.apache.activemq.transport.failover.FailoverTransport: Connection
> established
> 2010-03-03 17:22:56,690 INFO 
> org.apache.activemq.transport.failover.FailoverTransport: Successfully
> reconnected to tcp://broker1:61616
> 
> < ... FailoverTransport says: All is ok ... >
> 
> 2010-03-03 17:22:56,696 DEBUG
> org.apache.activemq.transport.ResponseCorrelator: Received unexpected
> response: {Response {commandId = 0, responseRequired = false,
> correlationId = 1}}for command id: 1
> 2010-03-03 17:22:56,699 DEBUG
> org.apache.activemq.transport.ResponseCorrelator: Received unexpected
> response: {Response {commandId = 0, responseRequired = false,
> correlationId = 2}}for command id: 2
> 
> < ... Here my program stops :-( ... >
> 
>  http://old.nabble.com/file/p27778246/fepctrlcli.java fepctrlcli.java 
> 
> 

-- 
View this message in context: http://old.nabble.com/Consumer-client-stops-after-failover-tp27778246p28287889.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message