Kahadb archiving does not work accross different physical file systems
Issue
- Cannot archive Journal files in a separate file system
- We cannot use a separate file system to host the A-MQ archived Journal files, e.g. in activemq.xml configuration :
<kahaDB directory="${karaf.data}/live" archiveDataLogs="true" directoryArchive="${karaf.data}/archive"...
where ${karaf.data}/live and ${karaf.data}/archive are not on the same file system.
If the live and archive file systems are different, we get the below error when a Journal file has to be moved to the archive:
ERROR | heckpoint Worker | MessageDatabase | q.store.kahadb.MessageDatabase$3 364 | 171 -
org.apache.activemq.activemq-osgi - 5.11.0.redhat-620153 | Checkpoint failed
java.io.IOException: Failed to move /opt/amqdb/kahadb/db-810.log to /opt/amqdb/archive/kahadb
at org.apache.activemq.util.IOHelper.moveFile(IOHelper.java:189)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
at org.apache.activemq.store.kahadb.disk.journal.DataFile.move(DataFile.java:90)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
at org.apache.activemq.store.kahadb.disk.journal.Journal.forceRemoveDataFile(Journal.java:568)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
at org.apache.activemq.store.kahadb.disk.journal.Journal.removeDataFiles(Journal.java:544)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
at org.apache.activemq.store.kahadb.MessageDatabase.checkpointUpdate(MessageDatabase.java:1715)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
at org.apache.activemq.store.kahadb.MessageDatabase$17.execute(MessageDatabase.java:1513)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
at org.apache.activemq.store.kahadb.disk.page.Transaction.execute(Transaction.java:779)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
at org.apache.activemq.store.kahadb.MessageDatabase.checkpointUpdate(MessageDatabase.java:1510)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
at org.apache.activemq.store.kahadb.MessageDatabase.checkpointCleanup(MessageDatabase.java:940)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
at org.apache.activemq.store.kahadb.MessageDatabase$3.run(MessageDatabase.java:353)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
2015-10-28 11:03:38,266 | INFO | heckpoint Worker | DefaultIOExceptionHandler | q.util.DefaultIOExceptionHandler 165 | 171 -
org.apache.activemq.activemq-osgi - 5.11.0.redhat-620153 | Stopping BrokerService[amqbroker] due to exception, java.io.IOException: Failed to move /opt/amqdb/kahadb/db-810.log to /opt/amqdb/archive/kahadb
java.io.IOException: Failed to move /opt/amqdb/kahadb/db-810.log to /opt/amqdb/archive/kahadb
at org.apache.activemq.util.IOHelper.moveFile(IOHelper.java:189)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
at org.apache.activemq.store.kahadb.disk.journal.DataFile.move(DataFile.java:90)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
at org.apache.activemq.store.kahadb.disk.journal.Journal.forceRemoveDataFile(Journal.java:568)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
at org.apache.activemq.store.kahadb.disk.journal.Journal.removeDataFiles(Journal.java:544)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
at org.apache.activemq.store.kahadb.MessageDatabase.checkpointUpdate(MessageDatabase.java:1715)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
at org.apache.activemq.store.kahadb.MessageDatabase$17.execute(MessageDatabase.java:1513)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
at org.apache.activemq.store.kahadb.disk.page.Transaction.execute(Transaction.java:779)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
at org.apache.activemq.store.kahadb.MessageDatabase.checkpointUpdate(MessageDatabase.java:1510)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
at org.apache.activemq.store.kahadb.MessageDatabase.checkpointCleanup(MessageDatabase.java:940)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
at org.apache.activemq.store.kahadb.MessageDatabase$3.run(MessageDatabase.java:353)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
Environment
- Red Hat JBoss A-MQ 6.2.0
- kahadb archive directory on a separate physical file system
- Red Hat Enterprise Linux (RHEL)
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.