Andrew MacBean created QPID-5825:
------------------------------------

             Summary: Java broker tries to downgrade to the wrong amqp protocol 
version
                 Key: QPID-5825
                 URL: https://issues.apache.org/jira/browse/QPID-5825
             Project: Qpid
          Issue Type: Bug
          Components: Java Broker
    Affects Versions: 0.28
            Reporter: Andrew MacBean
            Assignee: Andrew MacBean
             Fix For: 0.29


The following test failure was observed using a 0-9-1 test profile:

Tests run: 5, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 11.002 sec <<< 
FAILURE! - in 
org.apache.qpid.systest.disttest.controllerandclient.ControllerAndClientTest
testIteratingFeature(org.apache.qpid.systest.disttest.controllerandclient.ControllerAndClientTest)
  Time elapsed: 1.092 sec  <<< ERROR!
javax.jms.JMSException: Error creating connection: connect() aborted
        at org.apache.qpid.transport.Connection.connect(Connection.java:282)
        at 
org.apache.qpid.client.AMQConnectionDelegate_0_10.makeBrokerConnection(AMQConnectionDelegate_0_10.java:221)
        at 
org.apache.qpid.client.AMQConnection.makeBrokerConnection(AMQConnection.java:620)
        at org.apache.qpid.client.AMQConnection.<init>(AMQConnection.java:399)
        at 
org.apache.qpid.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:121)
        at 
org.apache.qpid.systest.disttest.DistributedTestSystemTestBase.getConnection(DistributedTestSystemTestBase.java:68)
        at 
org.apache.qpid.systest.disttest.DistributedTestSystemTestBase.setUp(DistributedTestSystemTestBase.java:47)
        at 
org.apache.qpid.systest.disttest.controllerandclient.ControllerAndClientTest.setUp(ControllerAndClientTest.java:62)

The logs show that the connection was aborted while trying to determine AMQP 
protocol but this also highlighted that the protocol that was tried after 0-10 
was 0-8 and not 0-9-1 as expected given the protocol downgrade assumed ordering.

main 2014-06-11 03:30:00,976 DEBUG [apache.qpid.transport.Connection] SEND: 
[conn:667876c7] AMQP.1 0-10
IoReceiver - /127.0.0.1:33024 2014-06-11 03:30:00,977 DEBUG 
[qpid.server.protocol.MultiVersionProtocolEngine] Unsupported protocol version 
requested, replying with: AMQP_0_8
IoReceiver - localhost/127.0.0.1:15672 2014-06-11 03:30:00,979 DEBUG 
[apache.qpid.transport.Connection] connection closed: conn:667876c7
main 2014-06-11 03:30:00,979 INFO [apache.qpid.client.AMQConnection] Unable to 
connect to broker at tcp://localhost:15672
org.apache.qpid.AMQException: Cannot connect to broker: connect() aborted 
[error code 200: reply success]
        at 
org.apache.qpid.client.AMQConnectionDelegate_0_10.makeBrokerConnection(AMQConnectionDelegate_0_10.java:241)
        at 
org.apache.qpid.client.AMQConnection.makeBrokerConnection(AMQConnection.java:620)
        at org.apache.qpid.client.AMQConnection.<init>(AMQConnection.java:399)
        at 
org.apache.qpid.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:121)
        at 
org.apache.qpid.systest.disttest.DistributedTestSystemTestBase.getConnection(DistributedTestSystemTestBase.java:68)
        at 
org.apache.qpid.systest.disttest.DistributedTestSystemTestBase.setUp(DistributedTestSystemTestBase.java:47)
        at 
org.apache.qpid.systest.disttest.controllerandclient.ControllerAndClientTest.setUp(ControllerAndClientTest.java:62)
        at junit.framework.TestCase.runBare(TestCase.java:139)
        at 
org.apache.qpid.test.utils.QpidBrokerTestCase.runBare(QpidBrokerTestCase.java:311)
        at junit.framework.TestResult$1.protect(TestResult.java:122)
        at junit.framework.TestResult.runProtected(TestResult.java:142)
        at junit.framework.TestResult.run(TestResult.java:125)
        at junit.framework.TestCase.run(TestCase.java:129)
        at org.apache.qpid.test.utils.QpidTestCase.run(QpidTestCase.java:147)
        at junit.framework.TestSuite.runTest(TestSuite.java:255)
        at junit.framework.TestSuite.run(TestSuite.java:250)
        at 
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
        at 
org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
        at 
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
        at 
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
        at 
org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
        at 
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
        at 
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Caused by: org.apache.qpid.transport.ConnectionException: connect() aborted
        at org.apache.qpid.transport.Connection.connect(Connection.java:282)
        at 
org.apache.qpid.client.AMQConnectionDelegate_0_10.makeBrokerConnection(AMQConnectionDelegate_0_10.java:221)
        ... 22 more
main 2014-06-11 03:30:00,980 DEBUG [apache.qpid.jms.FailoverPolicy] All 
failover methods exhausted
main 2014-06-11 03:30:00,980 DEBUG [apache.qpid.client.AMQConnection] Are we 
connected:false
main 2014-06-11 03:30:00,980 DEBUG [apache.qpid.client.AMQConnection] Last 
attempted ProtocolHandler Version:0-10
main 2014-06-11 03:30:00,981 ERROR [qpid.test.utils.QpidBrokerTestCase] 
exception
javax.jms.JMSException: Error creating connection: connect() aborted
        at 
org.apache.qpid.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:125)
        at 
org.apache.qpid.systest.disttest.DistributedTestSystemTestBase.getConnection(DistributedTestSystemTestBase.java:68)
        at 
org.apache.qpid.systest.disttest.DistributedTestSystemTestBase.setUp(DistributedTestSystemTestBase.java:47)
        at 
org.apache.qpid.systest.disttest.controllerandclient.ControllerAndClientTest.setUp(ControllerAndClientTest.java:62)
        at junit.framework.TestCase.runBare(TestCase.java:139)
        at 
org.apache.qpid.test.utils.QpidBrokerTestCase.runBare(QpidBrokerTestCase.java:311)
        at junit.framework.TestResult$1.protect(TestResult.java:122)
        at junit.framework.TestResult.runProtected(TestResult.java:142)
        at junit.framework.TestResult.run(TestResult.java:125)
        at junit.framework.TestCase.run(TestCase.java:129)
        at org.apache.qpid.test.utils.QpidTestCase.run(QpidTestCase.java:147)
        at junit.framework.TestSuite.runTest(TestSuite.java:255)
        at junit.framework.TestSuite.run(TestSuite.java:250)
        at 
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
        at 
org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
        at 
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
        at 
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
        at 
org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
        at 
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
        at 
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Caused by: org.apache.qpid.AMQConnectionFailureException: connect() aborted 
[error code 200: reply success]
        at org.apache.qpid.client.AMQConnection.<init>(AMQConnection.java:476)
        at 
org.apache.qpid.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:121)
        ... 19 more
Caused by: org.apache.qpid.AMQException: Cannot connect to broker: connect() 
aborted [error code 200: reply success]
        at 
org.apache.qpid.client.AMQConnectionDelegate_0_10.makeBrokerConnection(AMQConnectionDelegate_0_10.java:241)
        at 
org.apache.qpid.client.AMQConnection.makeBrokerConnection(AMQConnection.java:620)
        at org.apache.qpid.client.AMQConnection.<init>(AMQConnection.java:399)
        ... 20 more
Caused by: org.apache.qpid.transport.ConnectionException: connect() aborted
        at org.apache.qpid.transport.Connection.connect(Connection.java:282)
        at 
org.apache.qpid.client.AMQConnectionDelegate_0_10.makeBrokerConnection(AMQConnectionDelegate_0_10.java:221)
        ... 22 more

The ordering of the AMQP protocols needs to be determined reliably to allow the 
MultiVersionProtocolEngine to function as expected.




--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to