thanks Tom - I'll take a look
On Jun 7, 2007, at 2:42 AM, Tom Samplonius wrote:
Hiram,
I have switched back to Derby already.
If you want to re-create this problem:
* Post a lot of messages to a queue (150,000). Enough to cause
Kaha to switch to fill data-1 and roll over to data-2.
* Consume some messages. I'm not sure how many is required. I
normally happen to consume about 100,000.
* Kill -9 the java process, while you are consuming messages. This
is intended to simulate a power failure of the ActiveMQ node.
* Start ActiveMQ again, which predictable starts a Kaha recovery.
This takes a while. On my slow server, it takes about 20 minutes.
It normally see the recovery process remove data-1, as it did not
contain any unconsumed messages.
* Produce one new message for queue, and it crashes right away.
----- "Hiram Chirino" <[EMAIL PROTECTED]> wrote:
Hum.. looks like there is some corruption going on. Will have to dig
into this and get back with you. The new message store in ActiveMQ
4.2 is brand new and as you can tell we are still working out the
kinks. If you want, you can switch to using the old mechanism used
in
4.1.
On 6/4/07, Tom Samplonius <[EMAIL PROTECTED]> wrote:
There is a problem when using the default persistence settings,
and
ActiveMQ is shutdown uncleanly with messages in a queue. After a
restart (and log recovery), and attempt to read a message out of
the
queue, generates the following error (and ActiveMQ hangs).
It appears that there are too many "-" in a concatenation
somewhere,
as the logfiles are "data-1", "data-2", etc, not "data--1", which
is
probably is what is generating the exception.
This is with 4.2-SNAPSHOT-20070602.
ERROR AsyncDataManager - Looking for key 1 but not
found
in fileMap: {3=data-3 number = 3 , length = 9051046 refCount = 3}
ERROR QueueStorePrefetch - Failed to fill batch
java.io.IOException: Failed to read to journal for: offset =
20785811,
file = 1, size = -1, type = 0. Reason: java.io.IOException: Could
not
locate data file data--1
at
org.apache.activemq.util.IOExceptionSupport.create
(IOExceptionSupport.java:31)
at
org.apache.activemq.store.amq.AMQPersistenceAdapter.createReadExcepti
on(AMQPersistenceAdapter.java:529)
at
org.apache.activemq.store.amq.AMQPersistenceAdapter.readCommand
(AMQPersistenceAdapter.java:409)
at
org.apache.activemq.store.amq.AMQMessageStore.getMessage
(AMQMessageStore.java:382)
at
org.apache.activemq.store.amq.RecoveryListenerAdapter.recoverMessageR
eference(RecoveryListenerAdapter.java:52)
at
org.apache.activemq.store.kahadaptor.KahaReferenceStore.recover
(KahaReferenceStore.java:63)
at
org.apache.activemq.store.kahadaptor.KahaReferenceStore.recoverNextMe
ssages(KahaReferenceStore.java:89)
at
org.apache.activemq.store.amq.AMQMessageStore.recoverNextMessages
(AMQMessageStore.java:477)
at
org.apache.activemq.broker.region.cursors.QueueStorePrefetch.fillBatc
h(QueueStorePrefetch.java:159)
at
org.apache.activemq.broker.region.cursors.QueueStorePrefetch.hasNext(
QueueStorePrefetch.java:110)
at
org.apache.activemq.broker.region.cursors.StoreQueueCursor.hasNext
(StoreQueueCursor.java:122)
at
org.apache.activemq.broker.region.Queue.doPageIn(Queue.java:1007)
at
org.apache.activemq.broker.region.Queue.doPageIn(Queue.java:992)
at
org.apache.activemq.broker.region.Queue.addSubscription(Queue.java:
215)
at
org.apache.activemq.broker.region.AbstractRegion.addConsumer
(AbstractRegion.java:241)
at
org.apache.activemq.broker.region.RegionBroker.addConsumer
(RegionBroker.java:341)
at
org.apache.activemq.broker.BrokerFilter.addConsumer
(BrokerFilter.java:87)
at
org.apache.activemq.advisory.AdvisoryBroker.addConsumer
(AdvisoryBroker.java:79)
at
org.apache.activemq.broker.BrokerFilter.addConsumer
(BrokerFilter.java:87)
at
org.apache.activemq.broker.MutableBrokerFilter.addConsumer
(MutableBrokerFilter.java:97)
at
org.apache.activemq.broker.TransportConnection.processAddConsumer
(TransportConnection.java:566)
at
org.apache.activemq.command.ConsumerInfo.visit(ConsumerInfo.java:313)
at
org.apache.activemq.broker.TransportConnection.service
(TransportConnection.java:282)
at
org.apache.activemq.broker.TransportConnection$1.onCommand
(TransportConnection.java:188)
at
org.apache.activemq.transport.TransportFilter.onCommand
(TransportFilter.java:65)
at
org.apache.activemq.transport.stomp.StompTransportFilter.sendToActive
MQ(StompTransportFilter.java:81)
at
org.apache.activemq.transport.stomp.ProtocolConverter.sendToActiveMQ(
ProtocolConverter.java:119)
at
org.apache.activemq.transport.stomp.ProtocolConverter.onStompSubscrib
e(ProtocolConverter.java:351)
at
org.apache.activemq.transport.stomp.ProtocolConverter.onStompCommad
(ProtocolConverter.java:149)
at
org.apache.activemq.transport.stomp.StompTransportFilter.onCommand
(StompTransportFilter.java:71)
at
org.apache.activemq.transport.TransportSupport.doConsume
(TransportSupport.java:84)
at
org.apache.activemq.transport.tcp.TcpTransport.run
(TcpTransport.java:137)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.io.IOException: Could not locate data file
data--1
at
org.apache.activemq.kaha.impl.async.AsyncDataManager.getDataFile
(AsyncDataManager.java:259)
at
org.apache.activemq.kaha.impl.async.AsyncDataManager.read
(AsyncDataManager.java:477)
at
org.apache.activemq.store.amq.AMQPersistenceAdapter.readCommand
(AMQPersistenceAdapter.java:406)
... 30 more
--
Regards,
Hiram
Blog: http://hiramchirino.com