Uploaded image for project: 'JBoss A-MQ'
  1. JBoss A-MQ
  2. ENTMQ-2161

Regression: EOFException problem in ENTMQ-683 is back in A-MQ 6.3

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • None
    • None
    • jms-client
    • None
    • Hide

      1. Install EAP 6.4 and A-MQ 6.3 (build 254)
      2. In EAP 6.4, deploy the resource adapter from A-MQ 6.3 into standalone/deployments.
      3. Add the resource adapter config as attached
      4. Start broker and EAP
      5. Watch for EOFException messages in the broker log.
      6. Replace the A-MQ 6.3 resource adapter with the one from A-MQ 6.2-084. Note that the messages are rare, if present at all

      It doesn't matter to the problem whether I use failover: or tcp: URLs for the broker, but with failover: I can see the connections being recycled in the EAP log.

      Note that the frequency of the EOFException is an exact match for the sum of the following two EAP configuration settings. They are not included by default, but can be added to make the problem easier to see.

        <system-properties>
              <property name="RecoveryEnvironmentBean.periodicRecoveryPeriod" value="20"/>
              <property name="RecoveryEnvironmentBean.recoveryBackoffPeriod" value="2"/>
          </system-properties>
      
      <resource-adapter id="org.apache.activemq.ra">
                          <archive>
                              activemq-rar.rar
                          </archive>
                          <transaction-support>XATransaction</transaction-support>
                          <config-property name="ServerUrl">
                              failover:(tcp://localhost:61616)?jms.rmIdFromConnectionId=false
                          </config-property>
                          <config-property name="UserName">
                              admin
                          </config-property>
                          <config-property name="Password">
                              admin
                          </config-property>
                          <connection-definitions>
                              <connection-definition class-name="org.apache.activemq.ra.ActiveMQManagedConnectionFactory" jndi-name="java:/ConnectionFactory" enabled="true" use-java-context="true" pool-name="ConnectionFactory">
                                  <xa-pool>
                                      <min-pool-size>1</min-pool-size>
                                      <max-pool-size>1</max-pool-size>
                                      <prefill>false</prefill>
                                      <is-same-rm-override>true</is-same-rm-override>
                                  </xa-pool>
                                  <recovery>
                                      <recover-credential>
                                          <user-name>admin</user-name>
                                          <password>admin</password>
                                      </recover-credential>
                                  </recovery>
                              </connection-definition>
                          </connection-definitions>
                          <admin-objects>
                              <admin-object class-name="org.apache.activemq.command.ActiveMQQueue" jndi-name="queue/testqueue" use-java-context="true" pool-name="test_queue">
                                  <config-property name="PhysicalName">
                                      testQueue
                                  </config-property>
                              </admin-object>
                          </admin-objects>
                      </resource-adapter>
      
      Show
      1. Install EAP 6.4 and A-MQ 6.3 (build 254) 2. In EAP 6.4, deploy the resource adapter from A-MQ 6.3 into standalone/deployments. 3. Add the resource adapter config as attached 4. Start broker and EAP 5. Watch for EOFException messages in the broker log. 6. Replace the A-MQ 6.3 resource adapter with the one from A-MQ 6.2-084. Note that the messages are rare, if present at all It doesn't matter to the problem whether I use failover: or tcp: URLs for the broker, but with failover: I can see the connections being recycled in the EAP log. Note that the frequency of the EOFException is an exact match for the sum of the following two EAP configuration settings. They are not included by default, but can be added to make the problem easier to see. <system-properties> <property name= "RecoveryEnvironmentBean.periodicRecoveryPeriod" value= "20" /> <property name= "RecoveryEnvironmentBean.recoveryBackoffPeriod" value= "2" /> </system-properties> <resource-adapter id= "org.apache.activemq.ra" > <archive> activemq-rar.rar </archive> <transaction-support>XATransaction</transaction-support> <config-property name= "ServerUrl" > failover:(tcp: //localhost:61616)?jms.rmIdFromConnectionId= false </config-property> <config-property name= "UserName" > admin </config-property> <config-property name= "Password" > admin </config-property> <connection-definitions> <connection-definition class- name= "org.apache.activemq.ra.ActiveMQManagedConnectionFactory" jndi-name= "java:/ConnectionFactory" enabled= " true " use-java-context= " true " pool-name= "ConnectionFactory" > <xa-pool> <min-pool-size>1</min-pool-size> <max-pool-size>1</max-pool-size> <prefill> false </prefill> <is-same-rm-override> true </is-same-rm-override> </xa-pool> <recovery> <recover-credential> <user-name>admin</user-name> <password>admin</password> </recover-credential> </recovery> </connection-definition> </connection-definitions> <admin-objects> <admin-object class- name= "org.apache.activemq.command.ActiveMQQueue" jndi-name= "queue/testqueue" use-java-context= " true " pool-name= "test_queue" > <config-property name= "PhysicalName" > testQueue </config-property> </admin-object> </admin-objects> </resource-adapter>

      When the A-MQ resource adapter RAR is used in EAP 6.4, the transaction manager's recovery process opens and closes connections to the broker at fixed intervals. When it does this, the connection is not closed cleanly. This results in an "EOFException" message in the broker, and a dangling socket in TIME_WAIT state.

      This problem was raised as ENTMQ-683, and marked as fixed in A-MQ 6.2.1. I confirm that I cannot reproduce the problem with the resource adapter from 6.2.1 build 084, but I can reproduce it again, all other settings remaining the same, with the one from A-MQ 6.3 build 254. The version of the broker does not seem to matter, only the resource adapter.

        1. logs_6.2.1.zip
          27 kB
        2. logs_6.3.zip
          45 kB
        3. eap-mdb-ora-demo.zip
          14 kB

              gtully@redhat.com Gary Tully
              rhn-support-kboone Kevin Boone
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: