activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mbu <marcus.bu...@sonyericsson.com>
Subject Messages can not be fetched from queue, java.io.UTFDataFormatException: bad string
Date Thu, 28 Jul 2011 08:49:32 GMT
Hi all,

we have the problem that our camel router stopped fetching messages from one
of our ActiveMQ queues, despite beeing listed as subscribed, without giving
any error entries in the log.

When i now tried to browse the queue using activemq-admin, i get the
stack-trace shown at the end of this mail.

I understand "java.lang.RuntimeException: java.io.IOException: Failed to
read to journal for: offset = 18487793, file = 3, size = 60, type = 0.
Reason: java.io.UTFDataFormatException: bad string" beeing the key line here
and my interpetation is, that this is about a corrupted entry in a database
file.

Is my understanding correct?
Where is "offset = 18487793, file = 3, size = 60, type = 0" pointing to
exactly? (which file? is offset the byte count from start of that file? is
size the size of the string field starting at that offset?) I ask this as i
would like to have a look what's corrupt there exactly.
Is there a way to repair the database and saving the other entries (or event
the corrupted one)?

Some environment info:
ActiveMQ 5.4.1 on Red Hat 5.3 (kernel  2.6.18-128.el5) embedded in Tomcat 6.

Thanks for any advise you can give.
Marcus

The below was run remotely from my WinXP workstation (url changed from
original).

C:\temp\apache-activemq-5.4.1\bin>activemq-admin browse --amqurl
tcp://someserver.somedomain.tld:12345 -Vheader SPACE.INTERNAL.SENDER.QUEUE
Java Runtime: Sun Microsystems Inc. 1.6.0_14 C:\apps\java\1.6.0_14\jdk\jre
  Heap sizes: current=5056k  free=4729k  max=65088k
    JVM args:
-Dactivemq.classpath=C:\temp\apache-activemq-5.4.1\bin\../conf;
-Dactivemq.home=C:\temp\apache-activemq-5.4.1\bin\..
-Dactivemq.base=C:\temp\apache-activemq-5.4.1\bin\..
ACTIVEMQ_HOME: C:\temp\apache-activemq-5.4.1\bin\..
ACTIVEMQ_BASE: C:\temp\apache-activemq-5.4.1\bin\..
ERROR: java.lang.RuntimeException: Failed to execute browse task. Reason:
javax.jms.JMSException: java.lang.RuntimeException: java.io.IOException:
Failed to read to journal for: offset = 18487793, file = 3, size = 60, type
= 0. Reason: java.io.UTFDataFormatException: bad string
java.lang.RuntimeException: Failed to execute browse task. Reason:
javax.jms.JMSException: java.lang.RuntimeException: java.io.IOException:
Failed to read to journal for: offset = 18487793, file = 3, size = 60, type
= 0. Reason: java.io.UTFDataFormatException: bad string
        at
org.apache.activemq.console.command.AmqBrowseCommand.runTask(AmqBrowseCommand.java:130)
        at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at
org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:143)
        at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at
org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:85)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.activemq.console.Main.runTaskClass(Main.java:251)
        at org.apache.activemq.console.Main.main(Main.java:107)
ERROR: java.lang.Exception: javax.jms.JMSException:
java.lang.RuntimeException: java.io.IOException: Failed to read to journal
for: offset = 18487793, file = 3, size = 60, type = 0. Reason:
java.io.UTFDataFormatException: bad string
java.lang.Exception: javax.jms.JMSException: java.lang.RuntimeException:
java.io.IOException: Failed to read to journal for: offset = 18487793, file
= 3, size = 60, type = 0. Reason: java.io.UTFDataFormatException: bad string
        at
org.apache.activemq.console.command.AmqBrowseCommand.runTask(AmqBrowseCommand.java:131)
        at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at
org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:143)
        at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at
org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:85)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.activemq.console.Main.runTaskClass(Main.java:251)
        at org.apache.activemq.console.Main.main(Main.java:107)
Caused by: javax.jms.JMSException: java.lang.RuntimeException:
java.io.IOException: Failed to read to journal for: offset = 18487793, file
= 3, size = 60, type= 0. Reason: java.io.UTFDataFormatException: bad string
        at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:49)
        at
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1287)
        at
org.apache.activemq.ActiveMQSession.syncSendPacket(ActiveMQSession.java:1874)
        at
org.apache.activemq.ActiveMQMessageConsumer.<init>(ActiveMQMessageConsumer.java:254)
        at
org.apache.activemq.ActiveMQQueueBrowser$1.<init>(ActiveMQQueueBrowser.java:100)
        at
org.apache.activemq.ActiveMQQueueBrowser.createConsumer(ActiveMQQueueBrowser.java:98)
        at
org.apache.activemq.ActiveMQQueueBrowser.<init>(ActiveMQQueueBrowser.java:84)
        at
org.apache.activemq.ActiveMQSession.createBrowser(ActiveMQSession.java:1316)
        at
org.apache.activemq.console.filter.AmqMessagesQueryFilter.queryMessages(AmqMessagesQueryFilter.java:90)
        at
org.apache.activemq.console.filter.AmqMessagesQueryFilter.query(AmqMessagesQueryFilter.java:72)
        at
org.apache.activemq.console.filter.WildcardTransformFilter.query(WildcardTransformFilter.java:60)
        at
org.apache.activemq.console.util.AmqMessagesUtil.getMessages(AmqMessagesUtil.java:51)
        at
org.apache.activemq.console.command.AmqBrowseCommand.runTask(AmqBrowseCommand.java:117)
        ... 10 more
Caused by: java.lang.RuntimeException: java.lang.RuntimeException:
java.io.IOException: Failed to read to journal for: offset = 18487793, file
= 3, size = 60, type = 0. Reason: java.io.UTFDataFormatException: bad string
        at
org.apache.activemq.broker.region.cursors.AbstractStoreCursor.reset(AbstractStoreCursor.java:102)
        at
org.apache.activemq.broker.region.cursors.StoreQueueCursor.reset(StoreQueueCursor.java:157)
        at org.apache.activemq.broker.region.Queue.doPageIn(Queue.java:1363)
        at
org.apache.activemq.broker.region.Queue.pageInMessages(Queue.java:1503)
        at
org.apache.activemq.broker.region.Queue.addSubscription(Queue.java:313)
        at
org.apache.activemq.broker.region.AbstractRegion.addConsumer(AbstractRegion.java:279)
        at
org.apache.activemq.broker.region.RegionBroker.addConsumer(RegionBroker.java:380)
        at
org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:86)
        at
org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:86)
        at
org.apache.activemq.advisory.AdvisoryBroker.addConsumer(AdvisoryBroker.java:89)
        at
org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:86)
        at
org.apache.activemq.broker.MutableBrokerFilter.addConsumer(MutableBrokerFilter.java:93)
        at
org.apache.activemq.broker.TransportConnection.processAddConsumer(TransportConnection.java:530)
        at
org.apache.activemq.command.ConsumerInfo.visit(ConsumerInfo.java:349)
        at
org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:297)
        at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:175)
        at
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
        at
org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
        at
org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:210)
        at
org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84)
        at
org.apache.activemq.transport.nio.NIOTransport.serviceRead(NIOTransport.java:128)
        at
org.apache.activemq.transport.nio.NIOTransport.access$000(NIOTransport.java:44)
        at
org.apache.activemq.transport.nio.NIOTransport$1.onSelect(NIOTransport.java:68)
        at
org.apache.activemq.transport.nio.SelectorSelection.onSelect(SelectorSelection.java:78)
        at
org.apache.activemq.transport.nio.SelectorWorker$1.run(SelectorWorker.java:103)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.RuntimeException: java.io.IOException: Failed to read
to journal for: offset = 18487793, file = 3, size = 60, type = 0. Reason:
java.io.UTFDataFormatException: bad string
        at
org.apache.activemq.broker.region.cursors.AbstractStoreCursor.fillBatch(AbstractStoreCursor.java:230)
        at
org.apache.activemq.broker.region.cursors.AbstractStoreCursor.reset(AbstractStoreCursor.java:99)
        ... 27 more
Caused by: java.io.IOException: Failed to read to journal for: offset =
18487793, file = 3, size = 60, type = 0. Reason:
java.io.UTFDataFormatException: bad string
        at
org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:33)
        at
org.apache.activemq.store.amq.AMQPersistenceAdapter.createReadException(AMQPersistenceAdapter.java:672)
        at
org.apache.activemq.store.amq.AMQPersistenceAdapter.readCommand(AMQPersistenceAdapter.java:555)
        at
org.apache.activemq.store.amq.AMQMessageStore.getMessage(AMQMessageStore.java:440)
        at
org.apache.activemq.store.amq.RecoveryListenerAdapter.recoverMessageReference(RecoveryListenerAdapter.java:58)
        at
org.apache.activemq.store.kahadaptor.KahaReferenceStore.recoverReference(KahaReferenceStore.java:88)
        at
org.apache.activemq.store.kahadaptor.KahaReferenceStore.recoverNextMessages(KahaReferenceStore.java:126)
        at
org.apache.activemq.store.amq.AMQMessageStore.recoverNextMessages(AMQMessageStore.java:533)
        at
org.apache.activemq.broker.region.cursors.QueueStorePrefetch.doFillBatch(QueueStorePrefetch.java:81)
        at
org.apache.activemq.broker.region.cursors.AbstractStoreCursor.fillBatch(AbstractStoreCursor.java:227)
        ... 28 more
Caused by: java.io.UTFDataFormatException: bad string
        at
org.apache.activemq.util.DataByteArrayInputStream.readUTF(DataByteArrayInputStream.java:307)
        at
org.apache.activemq.openwire.v5.BaseDataStreamMarshaller.looseUnmarshalString(BaseDataStreamMarshaller.java:572)
        at
org.apache.activemq.openwire.v5.ConnectionInfoMarshaller.looseUnmarshal(ConnectionInfoMarshaller.java:146)
        at
org.apache.activemq.openwire.OpenWireFormat.doUnmarshal(OpenWireFormat.java:368)
        at
org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:207)
        at
org.apache.activemq.store.amq.AMQPersistenceAdapter.readCommand(AMQPersistenceAdapter.java:553)
        ... 35 more

--
View this message in context: http://activemq.2283324.n4.nabble.com/Messages-can-not-be-fetched-from-queue-java-io-UTFDataFormatException-bad-string-tp3700807p3700807.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message