Broker starts on corrupted kahadb despite checkForCorruptJournalFiles="true" and ignoreMissingJournalfiles="false"

Solution In Progress - Updated -

Environment

  • JBoss A-MQ 6.2

Issue

We run ActiveMQ with KahaDB persistence adapter being configured as

<persistenceAdapter>
  <kahaDB directory="/opt/fuse/amq/kahadb"
    checkForCorruptJournalFiles="true"
    checksumJournalFiles="true"
    ignoreMissingJournalfiles="false"
    />
</persistenceAdapter>

If a journal record gets corrupted (e.g. an unconsumed message) and if the index also gets corrupted, the broker will restart without raising errors.
It logs the corrupted records at INFO level as in

Corrupt journal records found in '/tmp/kahadb/db-1.log' between offsets: 594..13262

but fully starts up thereafter. Due to ignoreMissingJournalFiles=false it should raise an error and exit.

If only the journal record of an unconsumed message gets corrupted but the index remains valid, the broker will correctly refuse to start but raise

Failed to start Apache ActiveMQ ([amq, null], java.io.IOException: Detected missing/corrupt journal files. 1 messages affected.)

Resolution

Upgrade to JBoss A-MQ 6.2.1 R1 or later to have this bug resolved.

Root Cause

Bug ENTMQ-1421.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.