qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Godfrey <rob.j.godf...@gmail.com>
Subject Re: Unhandled exception when using High Availabilty in Qpid Java Broker 6.0.0
Date Thu, 10 Mar 2016 20:20:23 GMT
Apologies for this - you have indeed run into bug :-(

I've raised a JIRA - https://issues.apache.org/jira/browse/QPID-7136 .

I've committed a fix both to trunk, and the 6.0.x branch which I hope will
fix this issue...  If you want to test it out you can use the 6.0.x branch
which can be found here:

https://svn.apache.org/repos/asf/qpid/java/branches/6.0.x


Hope this helps,
-- Rob

On 10 March 2016 at 20:10, Adel Boutros <sta191919@gmail.com> wrote:

> Hello,
>
> When we provide a failover URL where the first URL is that of a replicate
> broker, the connection will trigger an IllegalStateException which is not
> caught anywhere. Thus making the broker crash and the session creation fail
> on the client-side.
>
> Shouldn't the "close" method log the exception silently instead of crashing
> the broker?
>
> *Code*
>
> String brokerUrl =
> "failover:(amqp://localhost:5672,amqp://localhost:10352)";
> ConnectionFactory connectionFactory = new JmsConnectionFactory(brokerUrl);
> Connection connection = connectionFactory.createConnection();
> Session session = connection.createSession(false,
> Session.AUTO_ACKNOWLEDGE);
>
> *Test case*
> Assuming that the broker on *localhost:5672 *is alive but as a *REPLICATE*
> and the one on* localhost:10352* as the *MASTER*
>
> *Stack trace*
> java.lang.IllegalStateException: The virtual host state of UNAVAILABLE does
> not permit this operation.
>         at
>
> org.apache.qpid.server.virtualhost.berkeleydb.BDBHAReplicaVirtualHostImpl.throwUnsupportedForReplica(BDBHAReplicaVirtualHostImpl.java:567)
>         at
>
> org.apache.qpid.server.virtualhost.berkeleydb.BDBHAReplicaVirtualHostImpl.deregisterConnection(BDBHAReplicaVirtualHostImpl.java:562)
>         at
>
> org.apache.qpid.server.protocol.v1_0.Connection_1_0.closed(Connection_1_0.java:282)
>         at
>
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0.closed(AMQPConnection_1_0.java:470)
>         at
>
> org.apache.qpid.server.transport.MultiVersionProtocolEngine.closed(MultiVersionProtocolEngine.java:112)
>         at
>
> org.apache.qpid.server.transport.NonBlockingConnection.shutdown(NonBlockingConnection.java:359)
>         at
>
> org.apache.qpid.server.transport.NonBlockingConnection.doWork(NonBlockingConnection.java:299)
>         at
>
> org.apache.qpid.server.transport.NetworkConnectionScheduler.processConnection(NetworkConnectionScheduler.java:108)
>         at
>
> org.apache.qpid.server.transport.SelectorThread$ConnectionProcessor.processConnection(SelectorThread.java:499)
>         at
>
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.performSelect(SelectorThread.java:337)
>         at
>
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.run(SelectorThread.java:86)
>         at
>
> org.apache.qpid.server.transport.SelectorThread.run(SelectorThread.java:457)
>         at
>
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:744)
>
> If you invert the order of the URLs to put the master first or simply kill
> the REPLICATE broker, then there will be no exception triggered.
>
> Regards,
> Adel Boutros
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message