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

ORA-08103 Error - AMQ is recreating Primary Key index in Database upon failover

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Major Major
    • None
    • JBoss A-MQ 6.1
    • broker
    • User Experience
    • Workaround Exists
    • Hide

      The auto creation of tables logic should be disabled in this instance.

      <jdbcPersistenceAdapter createTablesOnStartup="false" />

      Show
      The auto creation of tables logic should be disabled in this instance. <jdbcPersistenceAdapter createTablesOnStartup="false" />

      Customer is working on JBoss AMQ 6.1.0, and configured below persistenceAdapter in activemq.xml
      -----------------------------------------------------------------------------------------------------
      <persistenceAdapter>
      <jdbcPersistenceAdapter dataSource="#oracle-ds" useDatabaseLock="true" lockKeepAlivePeriod="2000" >
      <locker>
      <lease-database-locker lockAcquireSleepInterval="30000"/>
      </locker>
      </jdbcPersistenceAdapter>
      </persistenceAdapter>
      -----------------------------------------------------------------------------------------------------

      and facing the below error :

      2017-12-06 00:27:45,859 | WARN | JDBC Failure: ORA-08103: object no longer exists

      org.apache.activemq.store.jdbc.JDBCPersistenceAdapter main
      java.sql.SQLException: ORA-08103: object no longer exists

      He has the following query :
      -----------------------------------------------------------------------------------------------------
      ACTIVEMQ_ACKS has a primary key constraint, which is implemented as unique index on the table. If an AMQ instance is master it will query the table. Oracle creates for the query an execution plan based on the index, which will be reused.
      If there is a failover of the master to another AMQ instance it looks like AMQ is dropping and re-creating the primary key constraint on ACTIVEMQ_ACKS,
      If one of the AMQ instances executes a select on ACTIVEMQ_ACKS again and Oracle decides to reuse the existing execution plan, based on the dropped index, an ORA-08103 error will be thrown. We think this happens with even a higher probability if the master bounces back and forth between the nodes

      Thus our question is the following :
      Why does AMQ drop and re-create the primary key index?
      -----------------------------------------------------------------------------------------------------

      Actually, the issue is sporadic at their end and I am not able to recreate it in my environment.
      The drop and recreate is a way to modify the index to add new values, but in production it is a bad idea or bug.

      Attached the full configuration file and logs provided by customer

        1. actvemq.xml
          6 kB
          Rajani Kulkarni
        2. logs.txt
          11 kB
          Rajani Kulkarni

              gtully@redhat.com Gary Tully
              rhn-support-rakulkar Rajani Kulkarni (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: