Bug 790565

Summary: Java client could not parse IPv6 literal while failover
Product: Red Hat Enterprise MRG Reporter: Zdenek Kraus <zkraus>
Component: qpid-javaAssignee: Andrew Stitcher <astitcher>
Status: CLOSED WONTFIX QA Contact: MRG Quality Engineering <mrgqe-bugs>
Severity: high Docs Contact:
Priority: medium    
Version: 2.1CC: jross
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-22 14:35:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 802466    

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.