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

ActiveMQ broker never starts up fully if the underlying database is started after the broker

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • Major
    • None
    • JBoss A-MQ 6.0
    • broker
    • None
    • Hide
      • Create a Fabric managed child container using a broker config similar to the attached broker-jdbc.xml. Reconfigure it to connect to your JDBC database (I used a remote db which I just disconnected from the network for the test).
      • disconnect the underlying database from the network
      • start the child container that runs the broker and watch that it trying to connect to the db. If the db is not on the network you will most likely receive a "java.net.ConnectException: Operation timed out".
      • wait at least 3 mins or until the broker's log contains "Broker amq-jdbc is being started." Then reconnect the database to the network.
      • There will be no further logging output in the broker's log and if you run a cluster-list it will never show the broker becoming the master.
        Its transport connector is also not opened.

      This broker will never start up unless the entire container gets shut down and restarted.

      Show
      Create a Fabric managed child container using a broker config similar to the attached broker-jdbc.xml. Reconfigure it to connect to your JDBC database (I used a remote db which I just disconnected from the network for the test). disconnect the underlying database from the network start the child container that runs the broker and watch that it trying to connect to the db. If the db is not on the network you will most likely receive a "java.net.ConnectException: Operation timed out". wait at least 3 mins or until the broker's log contains "Broker amq-jdbc is being started." Then reconnect the database to the network. There will be no further logging output in the broker's log and if you run a cluster-list it will never show the broker becoming the master. Its transport connector is also not opened. This broker will never start up unless the entire container gets shut down and restarted.

    Description

      Running an ActiveMQ broker in a Fabric managed env (in its own container) that is configured for JDBC persistence.
      If the underlying database is not active while that broker starts up, it correctly raises an appropriate exception.
      However after 1-2 retries, the broker gives up trying to connect to the database and never re-attempts again.
      As a result the broker never starts up although the underlying db becomes available.

      The relevant broker config reads

          <ioExceptionHandler>
              <jDBCIOExceptionHandler stopStartConnectors="true"/>
          </ioExceptionHandler>
          <persistenceAdapter>
            <jdbcPersistenceAdapter dataSource="#mysql-ds" lockKeepAlivePeriod="1000">
              <locker>
                <lease-database-locker lockAcquireSleepInterval="2000"/>
              </locker>
            </jdbcPersistenceAdapter>
          </persistenceAdapter>
      

      Attachments

        1. broker-jdbc.xml
          4 kB
        2. BrokerLog.txt
          28 kB
        3. BrokerThreadDump.txt
          28 kB
        4. threaddump-1397748695689.tdump
          44 kB

        Activity

          People

            Unassigned Unassigned
            rhn-support-tmielke Torsten Mielke
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: