You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Matt Pavlovich (Jira)" <ji...@apache.org> on 2021/03/03 17:23:00 UTC

[jira] [Updated] (AMQ-6528) Problem of shutting down ActiveMQ client with failover transport running in java container (Karaf)

     [ https://issues.apache.org/jira/browse/AMQ-6528?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Pavlovich updated AMQ-6528:
--------------------------------
    Affects Version/s: 5.10.0

> Problem of shutting down ActiveMQ client with failover transport running in java container (Karaf)
> --------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-6528
>                 URL: https://issues.apache.org/jira/browse/AMQ-6528
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: JMS client, Transport
>    Affects Versions: 5.10.0
>         Environment: ActiveMQ client running in Karaf container
>            Reporter: Eduard Tukhvatullin
>            Priority: Major
>
> ActiveMQ 5.10.0 client connects to broker with failover protocol and fails to stop from Karaf console in case of massive sending job. Here is the important part of a stacktrace: 
> 17:31:17,254 | WARN  | pool-47-thread-5 | FailoverTransport                | sport.failover.FailoverTransport  260 | handleTransportFailure | Transport (tcp:///192.168.210.36:61616@57522) failed, reason:  , attempting to automatically reconnect
> java.io.InterruptedIOException 
>         at org.apache.activemq.transport.WireFormatNegotiator.oneway(WireFormatNegotiator.java:102)[418:ru.icl.osgi.TestMOMFailover:0.3.9] 
>         at org.apache.activemq.transport.failover.FailoverTransport.oneway(FailoverTransport.java:658)[418:ru.icl.osgi.TestMOMFailover:0.3.9] 
>         at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:68)[418:ru.icl.osgi.TestMOMFailover:0.3.9] 
>         at org.apache.activemq.transport.ResponseCorrelator.asyncRequest(ResponseCorrelator.java:81)[418:ru.icl.osgi.TestMOMFailover:0.3.9] 
>         at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:86)[418:ru.icl.osgi.TestMOMFailover:0.3.9] 
>         at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1406)[418:ru.icl.osgi.TestMOMFailover:0.3.9] 
>         at org.apache.activemq.ActiveMQSession.syncSendPacket(ActiveMQSession.java:2018)[418:ru.icl.osgi.TestMOMFailover:0.3.9] 
>         at org.apache.activemq.ActiveMQMessageProducer.<init>(ActiveMQMessageProducer.java:125)[418:ru.icl.osgi.TestMOMFailover:0.3.9] 
>         at org.apache.activemq.ActiveMQSession.createProducer(ActiveMQSession.java:1048)[418:ru.icl.osgi.TestMOMFailover:0.3.9] 
> ..... 
> 17:31:17,267 | INFO  | ActiveMQ Task-2  | FailoverTransport                | sport.failover.FailoverTransport 1057 | doReconnect | Successfully reconnected to tcp://192.168.210.78:61616 
> I've found that FailoverTransport.handleTransportFailure() method considers ANY exception as a transport failure. After that it successully reconnects and job continues running. 
> But InterruptedIOException is the consequence of an external job interruption and not of a transport failure. 
> So adding the next snippet into the head of FailoverTransport.handleTransportFailure() method became a solution  for me: 
> if (e instanceof InterruptedIOException) { 
>     throw new InterruptedException("handleTransportFailure is interrupted due to " + e.getMessage()); 
> } 
> I've looked at the 5.14.1 sources a little bit and it seems they have the same problem toŠ¾.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)