[A-MQ,Kahadb] restarting after "java.io.IOException: No space left on device" results in "java.io.IOException: Invalid location: X:XXXXX, : java.lang.NegativeArraySizeException"

Solution Verified - Updated -

Issue

  • after broker ran out of space on disk and threw a "java.io.IOException: No space left on device" it was restarted. On the initial restart it raised the following exception and shutdown:
java.io.IOException: Invalid location: X:XXXXXX, : java.lang.NegativeArraySizeException
        at org.apache.activemq.store.kahadb.disk.journal.DataFileAccessor.readRecord(DataFileAccessor.java:91)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
        at org.apache.activemq.store.kahadb.disk.journal.Journal.read(Journal.java:668)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
        at org.apache.activemq.store.kahadb.MessageDatabase.load(MessageDatabase.java:1025)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
        at org.apache.activemq.store.kahadb.MessageDatabase.recoverProducerAudit(MessageDatabase.java:697)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
        at org.apache.activemq.store.kahadb.MessageDatabase.recover(MessageDatabase.java:595)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
        at org.apache.activemq.store.kahadb.MessageDatabase.open(MessageDatabase.java:400)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
        at org.apache.activemq.store.kahadb.MessageDatabase.load(MessageDatabase.java:418)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
        at org.apache.activemq.store.kahadb.MessageDatabase.doStart(MessageDatabase.java:262)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
        at org.apache.activemq.store.kahadb.KahaDBStore.doStart(KahaDBStore.java:205)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
        at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:55)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
        at org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter.doStart(KahaDBPersistenceAdapter.java:223)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
        at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:55)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
        at org.apache.activemq.broker.BrokerService.doStartPersistenceAdapter(BrokerService.java:651)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
        at org.apache.activemq.broker.BrokerService.startPersistenceAdapter(BrokerService.java:640)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
        at org.apache.activemq.broker.BrokerService.start(BrokerService.java:605)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
        at io.fabric8.mq.fabric.ActiveMQServiceFactory$ClusteredConfiguration.doStart(ActiveMQServiceFactory.java:506)[184:io.fabric8.mq.mq-fabric:1.2.0.redhat-153]
        at io.fabric8.mq.fabric.ActiveMQServiceFactory$ClusteredConfiguration.access$400(ActiveMQServiceFactory.java:317)[184:io.fabric8.mq.mq-fabric:1.2.0.redhat-153]
        at io.fabric8.mq.fabric.ActiveMQServiceFactory$ClusteredConfiguration$1.run(ActiveMQServiceFactory.java:449)[184:io.fabric8.mq.mq-fabric:1.2.0.redhat-153]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_45]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_45]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_45]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_45]
        at java.lang.Thread.run(Thread.java:745)[:1.8.0_45]
Caused by: java.lang.NegativeArraySizeException
        at org.apache.activemq.store.kahadb.disk.journal.DataFileAccessor.readRecord(DataFileAccessor.java:86)[171:org.apache.activemq.activemq-osgi:5.11.0.redhat-620153]
        ... 22 more

Environment

  • JBoss A-MQ 6.2.0 P2

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content