Bug 790565 - Java client could not parse IPv6 literal while failover
Summary: Java client could not parse IPv6 literal while failover
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-java
Version: 2.1
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
: ---
Assignee: Andrew Stitcher
QA Contact: MRG Quality Engineering
URL:
Whiteboard:
Depends On:
Blocks: 802466
TreeView+ depends on / blocked
 
Reported: 2012-02-14 20:44 UTC by Zdenek Kraus
Modified: 2020-05-22 14:35 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-22 14:35:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Zdenek Kraus 2012-02-14 20:44:07 UTC
Description of problem:
java cannot parse ipv6 literals. That is crucial when failing
over, because client is unable to parse IPv6 literal from Cluter-url option
supplied by broker.

Version-Release number of selected component (if applicable):
qpid-java-example-0.14-1.el6.
qpid-java-common-0.14-1.el6.
qpid-java-client-0.14-1.el6.


How reproducible:
100%

Steps to Reproduce:
1. start up cluster with --cluster-url with IPv6 able broker (ex.
amqp:tcp:[IPv6])
2. run java failover-able client with failover_exchange policy
3. shut down broker to which that client is connected
4. observe that client cannot failover
  
Actual results:
javax.jms.JMSException: Exception while receiving:Command was interrupted because of failover, before being sent
	at org.apache.qpid.client.AMQSession.toJMSException(AMQSession.java:3536)
	at org.apache.qpid.client.BasicMessageConsumer.receive(BasicMessageConsumer.java:392)
	at Hello.runTest(Hello.java:126)
	at Hello.main(Hello.java:41)
Caused by: org.apache.qpid.transport.SessionException: Command was interrupted because of failover, before being sent
	at org.apache.qpid.transport.Session.checkFailoverRequired(Session.java:775)
	at org.apache.qpid.transport.Session.invoke(Session.java:607)
	at org.apache.qpid.transport.Session.invoke(Session.java:576)
	at org.apache.qpid.transport.SessionInvoker.executionSync(SessionInvoker.java:84)
	at org.apache.qpid.transport.Session.sync(Session.java:798)
	at org.apache.qpid.transport.Session.sync(Session.java:786)
	at org.apache.qpid.client.BasicMessageConsumer_0_10.getMessageFromQueue(BasicMessageConsumer_0_10.java:425)
	at org.apache.qpid.client.BasicMessageConsumer.receive(BasicMessageConsumer.java:375)
	... 2 more


Expected results:
client do failover.

Additional info:
when cluster-url consist only of ipv4 addresses, client do failover

Comment 1 Zdenek Kraus 2012-02-16 09:55:23 UTC
When I shut down the broker, the client prints out Exception:

Exception in thread "IoReceiver - localhost/127.0.0.1:5672" java.lang.StackOverflowError
org.apache.qpid.jms.failover.FailoverExchangeMethod.getNextBrokerDetails(FailoverExchangeMethod.java:202)
org.apache.qpid.jms.failover.FailoverExchangeMethod.getNextBrokerDetails(FailoverExchangeMethod.java:221)
org.apache.qpid.jms.failover.FailoverExchangeMethod.getNextBrokerDetails(FailoverExchangeMethod.java:221)
org.apache.qpid.jms.failover.FailoverExchangeMethod.getNextBrokerDetails(FailoverExchangeMethod.java:221)
... and so on


maybe it'll help identifying the problem.


Note You need to log in before you can comment on or make changes to this bug.