Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-1275

AMQ142032: Error reading journal file arises in scenarios when server is killed during journal compacting

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 1.5.5, 2.1.0
    • None
    • Broker
    • None

    Description

      In test scenarios where Artemis is killed during journal compacting it may happen that backup fails to load the journal.

      You can see the same exception even if you copy the corrupted journal in attachment into the fresh EAP installation and run the server with the standalone-full-ha profile.

      The stack trace of the exception [1] shows that the error arises when Backup reads JournalCompactor control file. In this case the Live only created the file but it didn't write any record to it. The Backup doesn't expect that the file could have 0 length.

      [1]

      15:32:43,529 WARN  [org.apache.activemq.artemis.journal] (AMQ119000: Activation for server ActiveMQServerImpl::serverUUID=4b1f5a18-2c49-11e7-9fdb-001b217d6d93) AMQ142032: Error reading journal file: java.lang.Il
      legalArgumentException
              at java.nio.Buffer.position(Buffer.java:244) [rt.jar:1.8.0_121]
              at org.apache.activemq.artemis.core.journal.impl.JournalImpl.readJournalFile(JournalImpl.java:418) [artemis-journal-1.5.4.003-redhat-1.jar:1.5.4.003-redhat-1]
              at org.apache.activemq.artemis.core.journal.impl.JournalCompactor.readControlFile(JournalCompactor.java:79) [artemis-journal-1.5.4.003-redhat-1.jar:1.5.4.003-redhat-1]
              at org.apache.activemq.artemis.core.journal.impl.JournalImpl.checkControlFile(JournalImpl.java:2720) [artemis-journal-1.5.4.003-redhat-1.jar:1.5.4.003-redhat-1]
              at org.apache.activemq.artemis.core.journal.impl.JournalImpl.load(JournalImpl.java:1666) [artemis-journal-1.5.4.003-redhat-1.jar:1.5.4.003-redhat-1]
              at org.apache.activemq.artemis.core.journal.impl.JournalImpl.load(JournalImpl.java:1326) [artemis-journal-1.5.4.003-redhat-1.jar:1.5.4.003-redhat-1]
              at org.apache.activemq.artemis.core.journal.impl.JournalImpl.load(JournalImpl.java:1310) [artemis-journal-1.5.4.003-redhat-1.jar:1.5.4.003-redhat-1]
              at org.apache.activemq.artemis.core.persistence.impl.journal.AbstractJournalStorageManager.loadMessageJournal(AbstractJournalStorageManager.java:837) [artemis-server-1.5.4.003-redhat-1.jar:1.5.4.003-redh
      at-1]
              at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.loadJournals(ActiveMQServerImpl.java:2213) [artemis-server-1.5.4.003-redhat-1.jar:1.5.4.003-redhat-1]
              at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.initialisePart2(ActiveMQServerImpl.java:2067) [artemis-server-1.5.4.003-redhat-1.jar:1.5.4.003-redhat-1]
              at org.apache.activemq.artemis.core.server.impl.SharedStoreBackupActivation.run(SharedStoreBackupActivation.java:90) [artemis-server-1.5.4.003-redhat-1.jar:1.5.4.003-redhat-1]
              at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl$ActivationThread.run(ActiveMQServerImpl.java:2491) [artemis-server-1.5.4.003-redhat-1.jar:1.5.4.003-redhat-1]
      
      15:32:43,530 ERROR [org.apache.activemq.artemis.core.server] (AMQ119000: Activation for server ActiveMQServerImpl::serverUUID=4b1f5a18-2c49-11e7-9fdb-001b217d6d93) AMQ224000: Failure in initialisation: java.lang
      .Exception
              at org.apache.activemq.artemis.core.journal.impl.JournalImpl.readJournalFile(JournalImpl.java:702) [artemis-journal-1.5.4.003-redhat-1.jar:1.5.4.003-redhat-1]
              at org.apache.activemq.artemis.core.journal.impl.JournalCompactor.readControlFile(JournalCompactor.java:79) [artemis-journal-1.5.4.003-redhat-1.jar:1.5.4.003-redhat-1]
              at org.apache.activemq.artemis.core.journal.impl.JournalImpl.checkControlFile(JournalImpl.java:2720) [artemis-journal-1.5.4.003-redhat-1.jar:1.5.4.003-redhat-1]
              at org.apache.activemq.artemis.core.journal.impl.JournalImpl.load(JournalImpl.java:1666) [artemis-journal-1.5.4.003-redhat-1.jar:1.5.4.003-redhat-1]
              at org.apache.activemq.artemis.core.journal.impl.JournalImpl.load(JournalImpl.java:1326) [artemis-journal-1.5.4.003-redhat-1.jar:1.5.4.003-redhat-1]
              at org.apache.activemq.artemis.core.journal.impl.JournalImpl.load(JournalImpl.java:1310) [artemis-journal-1.5.4.003-redhat-1.jar:1.5.4.003-redhat-1]
              at org.apache.activemq.artemis.core.persistence.impl.journal.AbstractJournalStorageManager.loadMessageJournal(AbstractJournalStorageManager.java:837) [artemis-server-1.5.4.003-redhat-1.jar:1.5.4.003-redh
      at-1]
              at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.loadJournals(ActiveMQServerImpl.java:2213) [artemis-server-1.5.4.003-redhat-1.jar:1.5.4.003-redhat-1]
              at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.initialisePart2(ActiveMQServerImpl.java:2067) [artemis-server-1.5.4.003-redhat-1.jar:1.5.4.003-redhat-1]
              at org.apache.activemq.artemis.core.server.impl.SharedStoreBackupActivation.run(SharedStoreBackupActivation.java:90) [artemis-server-1.5.4.003-redhat-1.jar:1.5.4.003-redhat-1]
              at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl$ActivationThread.run(ActiveMQServerImpl.java:2491) [artemis-server-1.5.4.003-redhat-1.jar:1.5.4.003-redhat-1]
      Caused by: java.lang.IllegalArgumentException
              at java.nio.Buffer.position(Buffer.java:244) [rt.jar:1.8.0_121]
              at org.apache.activemq.artemis.core.journal.impl.JournalImpl.readJournalFile(JournalImpl.java:418) [artemis-journal-1.5.4.003-redhat-1.jar:1.5.4.003-redhat-1]
              ... 10 more
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              eduda Erich Duda
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: