30 January 2011

Apache ActiveMQ Startup Exception

I don't use ActiveMQ a lot but when I get back to a project where I was using it, I seem to get startup exceptions pretty often.  The stack trace is really long and ugly.

java.io.EOFException: Chunk stream does not exist at page: 0

At first I wasn't sure what was going on, just deleted the activemq folder, unzipped the distro, and back running in minutes.  The next time it happened, I spent a few minutes looking at what I may have done to cause this.


Out of just dumb luck, I found that if I deleted the activemq/data folder contents (not the data folder itself, just the contents - kahadb, localhost, etc), I could restart without error.  Turns out that there's a bug in KahaDB, the default persistence store in ActiveMQ.

I've found no side effects from deleting the data folder contents, none of my deployed apps need to maintain message persistence between shutdowns.

YMMV.

What do you think? Leave a comment.

1 comment: