You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Juan Nin <ju...@gmail.com> on 2013/03/08 14:08:44 UTC
mKahaDB: "PageFile is not loaded" exception
Hi!
I'm testing mKahaDB under ActiveMQ 5.8.0, so as to have separate journals
for queues with different behaviours.
In the config I'm setting up 3 journals:
- one for "queue1.>" queues
- another one for "queue2.>" queues
- and a default one for the other queues
Startup goes fine and each journal directory is created:
$ ls -l /usr/local/apache-activemq-5.8.0/data/kahadb/
total 0
drwxr-xr-x 6 root staff 204 Mar 8 10:27 0
drwxr-xr-x 6 root staff 204 Mar 8 10:27 queue#3a#2f#2fqueue1.#3e
drwxr-xr-x 6 root staff 204 Mar 8 10:27 queue#3a#2f#2fqueue2.#3e
drwxr-xr-x 3 root staff 102 Mar 8 10:27 txStore
Log:
2013-03-08 10:27:11,171 | INFO | Refreshing
org.apache.activemq.xbean.XBeanBrokerFactory$1@205ddb6e: startup date [Fri
Mar 08 10:27:11 UYST 2013]; root of context hierarchy |
org.apache.activemq.xbean.XBeanBrokerFactory$1 | WrapperSimpleAppMain
2013-03-08 10:27:11,955 | INFO |
PListStore:[/usr/local/apache-activemq-5.8.0/bin/macosx/../../data/localhost/tmp_storage]
started | org.apache.activemq.store.kahadb.plist.PListStoreImpl |
WrapperSimpleAppMain
2013-03-08 10:27:12,042 | INFO | Using Persistence Adapter:
MultiKahaDBPersistenceAdapter[/usr/local/apache-activemq-5.8.0/bin/macosx/../../data/kahadb][KahaDBPersistenceAdapter[/usr/local/apache-activemq-5.8.0/bin/macosx/../../data/kahadb/queue#3a#2f#2fqueue1.#3e],
KahaDBPersistenceAdapter[/usr/local/apache-activemq-5.8.0/bin/macosx/../../data/kahadb/queue#3a#2f#2fqueue2.#3e],
KahaDBPersistenceAdapter[/usr/local/apache-activemq-5.8.0/bin/macosx/../../data/kahadb/0]]
| org.apache.activemq.broker.BrokerService | WrapperSimpleAppMain
2013-03-08 10:27:12,045 | INFO | JMX consoles can connect to
service:jmx:rmi:///jndi/rmi://localhost:2011/jmxrmi |
org.apache.activemq.broker.jmx.ManagementContext | JMX connector
2013-03-08 10:27:12,532 | INFO | Apache ActiveMQ 5.8.0 (localhost,
ID:myhostname.local-65211-1362745632411-0:1) is starting |
org.apache.activemq.broker.BrokerService | WrapperSimpleAppMain
2013-03-08 10:27:12,533 | INFO | pending local transactions: [] |
org.apache.activemq.store.kahadb.MultiKahaDBTransactionStore |
WrapperSimpleAppMain
2013-03-08 10:27:12,548 | INFO | Listening for connections at:
tcp://myhostname.local:61616 |
org.apache.activemq.transport.TransportServerThreadSupport |
WrapperSimpleAppMain
2013-03-08 10:27:12,548 | INFO | Connector openwire Started |
org.apache.activemq.broker.TransportConnector | WrapperSimpleAppMain
2013-03-08 10:27:12,551 | INFO | Listening for connections at:
stomp://myhostname.local:61613 |
org.apache.activemq.transport.TransportServerThreadSupport |
WrapperSimpleAppMain
2013-03-08 10:27:12,551 | INFO | Connector stomp Started |
org.apache.activemq.broker.TransportConnector | WrapperSimpleAppMain
2013-03-08 10:27:12,552 | INFO | Apache ActiveMQ 5.8.0 (localhost,
ID:myhostname.local-65211-1362745632411-0:1) started |
org.apache.activemq.broker.BrokerService | WrapperSimpleAppMain
2013-03-08 10:27:12,552 | INFO | For help or more information please see:
http://activemq.apache.org | org.apache.activemq.broker.BrokerService |
WrapperSimpleAppMain
2013-03-08 10:27:12,910 | INFO | Web console type: embedded |
org.apache.activemq.web.WebConsoleStarter | WrapperSimpleAppMain
2013-03-08 10:27:13,014 | INFO | ActiveMQ WebConsole initialized. |
org.apache.activemq.web.WebConsoleStarter | WrapperSimpleAppMain
2013-03-08 10:27:13,060 | INFO | Initializing Spring FrameworkServlet
'dispatcher' | /admin | WrapperSimpleAppMain
2013-03-08 10:27:13,216 | INFO | jolokia-agent: No access restrictor found
at classpath:/jolokia-access.xml, access to all MBeans is allowed | /api |
WrapperSimpleAppMain
I'm using a simple PHP script, using Stomp of course, to produce messages.
Submitting messages to each "type" of queue works fine, and I see each
different journal being modified.
I submitted messages to "queue1.test", "queue2.test" and "queue3.test".
Now, if after that I delete let's say "queue2.test" via the ActiveMQ web
console, the journal directory "queue#3a#2f#2fqueue2.#3e" is also deleted,
and I see the following on the log:
2013-03-08 10:28:53,389 | INFO | Stopping async queue tasks |
org.apache.activemq.store.kahadb.KahaDBStore | qtp230367322-54
2013-03-08 10:28:53,389 | INFO | Stopping async topic tasks |
org.apache.activemq.store.kahadb.KahaDBStore | qtp230367322-54
2013-03-08 10:28:53,390 | INFO | Stopped KahaDB |
org.apache.activemq.store.kahadb.KahaDBStore | qtp230367322-54
If then I try to submit messages to "queue2.test" it fails, directory is
never created back, and I see the following on the log:
2013-03-08 10:29:17,903 | WARN | Async error occurred:
java.lang.IllegalStateException: PageFile is not loaded |
org.apache.activemq.broker.TransportConnection.Service | ActiveMQ
Transport: tcp:///0:0:0:0:0:0:0:1%0:65222@61613
java.lang.IllegalStateException: PageFile is not loaded
at
org.apache.activemq.store.kahadb.disk.page.PageFile.assertLoaded(PageFile.java:809)
at org.apache.activemq.store.kahadb.disk.page.PageFile.tx(PageFile.java:303)
at
org.apache.activemq.store.kahadb.KahaDBStore$KahaDBMessageStore.getMessageCount(KahaDBStore.java:478)
at
org.apache.activemq.store.ProxyMessageStore.getMessageCount(ProxyMessageStore.java:101)
at
org.apache.activemq.store.ProxyMessageStore.getMessageCount(ProxyMessageStore.java:101)
at org.apache.activemq.broker.region.Queue.initialize(Queue.java:376)
at
org.apache.activemq.broker.region.DestinationFactoryImpl.createDestination(DestinationFactoryImpl.java:87)
at
org.apache.activemq.broker.region.AbstractRegion.createDestination(AbstractRegion.java:526)
at
org.apache.activemq.broker.jmx.ManagedQueueRegion.createDestination(ManagedQueueRegion.java:56)
at
org.apache.activemq.broker.region.AbstractRegion.addDestination(AbstractRegion.java:136)
at
org.apache.activemq.broker.region.RegionBroker.addDestination(RegionBroker.java:277)
at
org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:145)
at
org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:145)
at
org.apache.activemq.broker.MutableBrokerFilter.addDestination(MutableBrokerFilter.java:151)
at
org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:387)
at
org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:282)
at
org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:96)
at
org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:317)
at
org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:135)
at
org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:499)
at
org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:749)
at
org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:329)
at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:184)
at
org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:45)
at
org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:288)
at
org.apache.activemq.transport.stomp.StompTransportFilter.sendToActiveMQ(StompTransportFilter.java:84)
at
org.apache.activemq.transport.stomp.ProtocolConverter.sendToActiveMQ(ProtocolConverter.java:195)
at
org.apache.activemq.transport.stomp.ProtocolConverter.onStompSend(ProtocolConverter.java:321)
at
org.apache.activemq.transport.stomp.ProtocolConverter.onStompCommand(ProtocolConverter.java:233)
at
org.apache.activemq.transport.stomp.StompTransportFilter.onCommand(StompTransportFilter.java:73)
at
org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
at
org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:214)
at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:196)
at java.lang.Thread.run(Thread.java:680)
2013-03-08 10:29:17,905 | WARN | Exception occurred processing:
null: java.lang.IllegalStateException: PageFile is not loaded |
org.apache.activemq.transport.stomp.ProtocolConverter | ActiveMQ Connection
Dispatcher: tcp://0:0:0:0:0:0:0:1%0:65222
Is this a bug, or am I missing anything?
I've tested it under OSX 10.8.2 (Mountain Lion) and also under CentOS 5.8
with the exact same behaviour.
This is my activemq.xml:
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/schema/core
http://activemq.apache.org/schema/core/activemq-core.xsd">
<!-- Allows us to use system properties as variables in this
configuration file -->
<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<value>file:${activemq.base}/conf/credentials.properties</value>
</property>
</bean>
<broker xmlns="http://activemq.apache.org/schema/core"
brokerName="localhost" dataDirectory="${activemq.base}/data"
advisorySupport="false">
<destinationPolicy>
<policyMap>
<policyEntries>
<!-- producerFlowControl off -->
<policyEntry queue=">" producerFlowControl="false"
optimizedDispatch="true" memoryLimit="100mb" >
<deadLetterStrategy>
<!-- Use the prefix 'DLQ.' for the destination name,
and make the DLQ a queue rather than a topic -->
<individualDeadLetterStrategy queuePrefix="DLQ."
useQueueForQueueMessages="true" />
</deadLetterStrategy>
</policyEntry>
</policyEntries>
</policyMap>
</destinationPolicy>
<managementContext>
<managementContext connectorPort="2011"/>
</managementContext>
<persistenceAdapter>
<mKahaDB directory="${activemq.base}/data/kahadb">
<filteredPersistenceAdapters>
<filteredKahaDB queue="queue1.>">
<persistenceAdapter>
<kahaDB />
</persistenceAdapter>
</filteredKahaDB>
<filteredKahaDB queue="queue2.>">
<persistenceAdapter>
<kahaDB />
</persistenceAdapter>
</filteredKahaDB>
<filteredKahaDB>
<persistenceAdapter>
<kahaDB />
</persistenceAdapter>
</filteredKahaDB>
</filteredPersistenceAdapters>
</mKahaDB>
</persistenceAdapter>
<systemUsage>
<systemUsage>
<!-- maximum memory to be used by the broker -->
<memoryUsage>
<memoryUsage limit="512 mb"/>
</memoryUsage>
<!-- maximum disk store to be used for persistent messages -->
<storeUsage>
<storeUsage limit="50 gb"/>
</storeUsage>
<!-- non persistent messages -->
<tempUsage>
<tempUsage limit="5 gb"/>
</tempUsage>
</systemUsage>
</systemUsage>
<transportConnectors>
<transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
<transportConnector name="stomp" uri="stomp://0.0.0.0:61613"/>
</transportConnectors>
</broker>
<import resource="jetty.xml"/>
</beans>
Thanks in advance.
Juan
Re: mKahaDB: "PageFile is not loaded" exception
Posted by Gary Tully <ga...@gmail.com>.
thanks for the test case. The fix is on trunk. U can validate in tonights
5.9-snapshot if you wish.
On 26 March 2013 15:54, Juan Nin <ju...@gmail.com> wrote:
> Issue has been created, and Unit test attached to it:
> https://issues.apache.org/jira/browse/AMQ-4407
>
> Regards.
>
> On Wed, Mar 20, 2013 at 1:34 PM, Juan Nin <ju...@gmail.com> wrote:
>
> > Thx Gary!
> >
> > Will have my Team look into the Unit test, etc
> >
> >
> > On Tue, Mar 12, 2013 at 5:52 PM, Gary Tully <ga...@gmail.com>
> wrote:
> >
> >> that is a bug for sure. There was a related issue resolved in 5.8 -
> >> https://issues.apache.org/jira/browse/AMQ-4220 and the fix has a nice
> >> test.
> >> Maybe u can come up with a variant of that test case that can easily
> >> reproduce. In any event. please raise an issue to track this.
> >> see the test:
> >>
> >>
> https://fisheye6.atlassian.com/browse/activemq/trunk/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4220Test.java?hb=true
> >>
> >>
> >> On 12 March 2013 15:42, Juan Nin <ju...@gmail.com> wrote:
> >>
> >> > Hi, any insights into this anyone?
> >> >
> >> > Thanks in advance.
> >> >
> >> > ---------- Forwarded message ----------
> >> > From: Juan Nin <ju...@gmail.com>
> >> > Date: Fri, Mar 8, 2013 at 11:08 AM
> >> > Subject: mKahaDB: "PageFile is not loaded" exception
> >> > To: users@activemq.apache.org
> >> >
> >> >
> >> > Hi!
> >> >
> >> > I'm testing mKahaDB under ActiveMQ 5.8.0, so as to have separate
> >> journals
> >> > for queues with different behaviours.
> >> > In the config I'm setting up 3 journals:
> >> >
> >> > - one for "queue1.>" queues
> >> > - another one for "queue2.>" queues
> >> > - and a default one for the other queues
> >> >
> >> > Startup goes fine and each journal directory is created:
> >> >
> >> > $ ls -l /usr/local/apache-activemq-5.8.0/data/kahadb/
> >> > total 0
> >> > drwxr-xr-x 6 root staff 204 Mar 8 10:27 0
> >> > drwxr-xr-x 6 root staff 204 Mar 8 10:27 queue#3a#2f#2fqueue1.#3e
> >> > drwxr-xr-x 6 root staff 204 Mar 8 10:27 queue#3a#2f#2fqueue2.#3e
> >> > drwxr-xr-x 3 root staff 102 Mar 8 10:27 txStore
> >> >
> >> >
> >> > Log:
> >> >
> >> > 2013-03-08 10:27:11,171 | INFO | Refreshing
> >> > org.apache.activemq.xbean.XBeanBrokerFactory$1@205ddb6e: startup date
> >> [Fri
> >> > Mar 08 10:27:11 UYST 2013]; root of context hierarchy |
> >> > org.apache.activemq.xbean.XBeanBrokerFactory$1 | WrapperSimpleAppMain
> >> > 2013-03-08 10:27:11,955 | INFO |
> >> >
> >> >
> >>
> PListStore:[/usr/local/apache-activemq-5.8.0/bin/macosx/../../data/localhost/tmp_storage]
> >> > started | org.apache.activemq.store.kahadb.plist.PListStoreImpl |
> >> > WrapperSimpleAppMain
> >> > 2013-03-08 10:27:12,042 | INFO | Using Persistence Adapter:
> >> >
> >> >
> >>
> MultiKahaDBPersistenceAdapter[/usr/local/apache-activemq-5.8.0/bin/macosx/../../data/kahadb][KahaDBPersistenceAdapter[/usr/local/apache-activemq-5.8.0/bin/macosx/../../data/kahadb/queue#3a#2f#2fqueue1.#3e],
> >> >
> >> >
> >>
> KahaDBPersistenceAdapter[/usr/local/apache-activemq-5.8.0/bin/macosx/../../data/kahadb/queue#3a#2f#2fqueue2.#3e],
> >> >
> >> >
> >>
> KahaDBPersistenceAdapter[/usr/local/apache-activemq-5.8.0/bin/macosx/../../data/kahadb/0]]
> >> > | org.apache.activemq.broker.BrokerService | WrapperSimpleAppMain
> >> > 2013-03-08 10:27:12,045 | INFO | JMX consoles can connect to
> >> > service:jmx:rmi:///jndi/rmi://localhost:2011/jmxrmi |
> >> > org.apache.activemq.broker.jmx.ManagementContext | JMX connector
> >> > 2013-03-08 10:27:12,532 | INFO | Apache ActiveMQ 5.8.0 (localhost,
> >> > ID:myhostname.local-65211-1362745632411-0:1) is starting |
> >> > org.apache.activemq.broker.BrokerService | WrapperSimpleAppMain
> >> > 2013-03-08 10:27:12,533 | INFO | pending local transactions: [] |
> >> > org.apache.activemq.store.kahadb.MultiKahaDBTransactionStore |
> >> > WrapperSimpleAppMain
> >> > 2013-03-08 10:27:12,548 | INFO | Listening for connections at:
> >> > tcp://myhostname.local:61616 |
> >> > org.apache.activemq.transport.TransportServerThreadSupport |
> >> > WrapperSimpleAppMain
> >> > 2013-03-08 10:27:12,548 | INFO | Connector openwire Started |
> >> > org.apache.activemq.broker.TransportConnector | WrapperSimpleAppMain
> >> > 2013-03-08 10:27:12,551 | INFO | Listening for connections at:
> >> > stomp://myhostname.local:61613 |
> >> > org.apache.activemq.transport.TransportServerThreadSupport |
> >> > WrapperSimpleAppMain
> >> > 2013-03-08 10:27:12,551 | INFO | Connector stomp Started |
> >> > org.apache.activemq.broker.TransportConnector | WrapperSimpleAppMain
> >> > 2013-03-08 10:27:12,552 | INFO | Apache ActiveMQ 5.8.0 (localhost,
> >> > ID:myhostname.local-65211-1362745632411-0:1) started |
> >> > org.apache.activemq.broker.BrokerService | WrapperSimpleAppMain
> >> > 2013-03-08 10:27:12,552 | INFO | For help or more information please
> >> see:
> >> > http://activemq.apache.org |
> org.apache.activemq.broker.BrokerService |
> >> > WrapperSimpleAppMain
> >> > 2013-03-08 10:27:12,910 | INFO | Web console type: embedded |
> >> > org.apache.activemq.web.WebConsoleStarter | WrapperSimpleAppMain
> >> > 2013-03-08 10:27:13,014 | INFO | ActiveMQ WebConsole initialized. |
> >> > org.apache.activemq.web.WebConsoleStarter | WrapperSimpleAppMain
> >> > 2013-03-08 10:27:13,060 | INFO | Initializing Spring FrameworkServlet
> >> > 'dispatcher' | /admin | WrapperSimpleAppMain
> >> > 2013-03-08 10:27:13,216 | INFO | jolokia-agent: No access restrictor
> >> found
> >> > at classpath:/jolokia-access.xml, access to all MBeans is allowed |
> >> /api |
> >> > WrapperSimpleAppMain
> >> >
> >> >
> >> > I'm using a simple PHP script, using Stomp of course, to produce
> >> messages.
> >> > Submitting messages to each "type" of queue works fine, and I see each
> >> > different journal being modified.
> >> >
> >> > I submitted messages to "queue1.test", "queue2.test" and
> "queue3.test".
> >> >
> >> > Now, if after that I delete let's say "queue2.test" via the ActiveMQ
> web
> >> > console, the journal directory "queue#3a#2f#2fqueue2.#3e" is also
> >> deleted,
> >> > and I see the following on the log:
> >> >
> >> > 2013-03-08 10:28:53,389 | INFO | Stopping async queue tasks |
> >> > org.apache.activemq.store.kahadb.KahaDBStore | qtp230367322-54
> >> > 2013-03-08 10:28:53,389 | INFO | Stopping async topic tasks |
> >> > org.apache.activemq.store.kahadb.KahaDBStore | qtp230367322-54
> >> > 2013-03-08 10:28:53,390 | INFO | Stopped KahaDB |
> >> > org.apache.activemq.store.kahadb.KahaDBStore | qtp230367322-54
> >> >
> >> >
> >> > If then I try to submit messages to "queue2.test" it fails, directory
> is
> >> > never created back, and I see the following on the log:
> >> >
> >> > 2013-03-08 10:29:17,903 | WARN | Async error occurred:
> >> > java.lang.IllegalStateException: PageFile is not loaded |
> >> > org.apache.activemq.broker.TransportConnection.Service | ActiveMQ
> >> > Transport: tcp:///0:0:0:0:0:0:0:1%0:65222@61613
> >> > java.lang.IllegalStateException: PageFile is not loaded
> >> > at
> >> >
> >> >
> >>
> org.apache.activemq.store.kahadb.disk.page.PageFile.assertLoaded(PageFile.java:809)
> >> > at
> >> >
> >>
> org.apache.activemq.store.kahadb.disk.page.PageFile.tx(PageFile.java:303)
> >> > at
> >> >
> >> >
> >>
> org.apache.activemq.store.kahadb.KahaDBStore$KahaDBMessageStore.getMessageCount(KahaDBStore.java:478)
> >> > at
> >> >
> >> >
> >>
> org.apache.activemq.store.ProxyMessageStore.getMessageCount(ProxyMessageStore.java:101)
> >> > at
> >> >
> >> >
> >>
> org.apache.activemq.store.ProxyMessageStore.getMessageCount(ProxyMessageStore.java:101)
> >> > at org.apache.activemq.broker.region.Queue.initialize(Queue.java:376)
> >> > at
> >> >
> >> >
> >>
> org.apache.activemq.broker.region.DestinationFactoryImpl.createDestination(DestinationFactoryImpl.java:87)
> >> > at
> >> >
> >> >
> >>
> org.apache.activemq.broker.region.AbstractRegion.createDestination(AbstractRegion.java:526)
> >> > at
> >> >
> >> >
> >>
> org.apache.activemq.broker.jmx.ManagedQueueRegion.createDestination(ManagedQueueRegion.java:56)
> >> > at
> >> >
> >> >
> >>
> org.apache.activemq.broker.region.AbstractRegion.addDestination(AbstractRegion.java:136)
> >> > at
> >> >
> >> >
> >>
> org.apache.activemq.broker.region.RegionBroker.addDestination(RegionBroker.java:277)
> >> > at
> >> >
> >> >
> >>
> org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:145)
> >> > at
> >> >
> >> >
> >>
> org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:145)
> >> > at
> >> >
> >> >
> >>
> org.apache.activemq.broker.MutableBrokerFilter.addDestination(MutableBrokerFilter.java:151)
> >> > at
> >> >
> >>
> org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:387)
> >> > at
> >> >
> >> >
> >>
> org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:282)
> >> > at
> >> >
> >> >
> >>
> org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:96)
> >> > at
> >> >
> >> >
> >>
> org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:317)
> >> > at
> >> >
> >> >
> >>
> org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:135)
> >> > at
> >> >
> >> >
> >>
> org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:499)
> >> > at
> >> >
> >>
> org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:749)
> >> > at
> >> >
> >> >
> >>
> org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:329)
> >> > at
> >> >
> >> >
> >>
> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:184)
> >> > at
> >> >
> >> >
> >>
> org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:45)
> >> > at
> >> >
> >> >
> >>
> org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:288)
> >> > at
> >> >
> >> >
> >>
> org.apache.activemq.transport.stomp.StompTransportFilter.sendToActiveMQ(StompTransportFilter.java:84)
> >> > at
> >> >
> >> >
> >>
> org.apache.activemq.transport.stomp.ProtocolConverter.sendToActiveMQ(ProtocolConverter.java:195)
> >> > at
> >> >
> >> >
> >>
> org.apache.activemq.transport.stomp.ProtocolConverter.onStompSend(ProtocolConverter.java:321)
> >> > at
> >> >
> >> >
> >>
> org.apache.activemq.transport.stomp.ProtocolConverter.onStompCommand(ProtocolConverter.java:233)
> >> > at
> >> >
> >> >
> >>
> org.apache.activemq.transport.stomp.StompTransportFilter.onCommand(StompTransportFilter.java:73)
> >> > at
> >> >
> >> >
> >>
> org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
> >> > at
> >> >
> >>
> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:214)
> >> > at
> >> >
> >>
> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:196)
> >> > at java.lang.Thread.run(Thread.java:680)
> >> > 2013-03-08 10:29:17,905 | WARN | Exception occurred processing:
> >> > null: java.lang.IllegalStateException: PageFile is not loaded |
> >> > org.apache.activemq.transport.stomp.ProtocolConverter | ActiveMQ
> >> Connection
> >> > Dispatcher: tcp://0:0:0:0:0:0:0:1%0:65222
> >> >
> >> >
> >> > Is this a bug, or am I missing anything?
> >> > I've tested it under OSX 10.8.2 (Mountain Lion) and also under CentOS
> >> 5.8
> >> > with the exact same behaviour.
> >> >
> >> > This is my activemq.xml:
> >> >
> >> >
> >> > <beans
> >> > xmlns="http://www.springframework.org/schema/beans"
> >> > xmlns:amq="http://activemq.apache.org/schema/core"
> >> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >> > xsi:schemaLocation="http://www.springframework.org/schema/beans
> >> > http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
> >> > http://activemq.apache.org/schema/core
> >> > http://activemq.apache.org/schema/core/activemq-core.xsd">
> >> >
> >> > <!-- Allows us to use system properties as variables in this
> >> > configuration file -->
> >> > <bean
> >> >
> >> >
> >>
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
> >> > <property name="locations">
> >> >
> >> > <value>file:${activemq.base}/conf/credentials.properties</value>
> >> > </property>
> >> > </bean>
> >> >
> >> > <broker xmlns="http://activemq.apache.org/schema/core"
> >> > brokerName="localhost" dataDirectory="${activemq.base}/data"
> >> > advisorySupport="false">
> >> >
> >> > <destinationPolicy>
> >> > <policyMap>
> >> > <policyEntries>
> >> > <!-- producerFlowControl off -->
> >> > <policyEntry queue=">" producerFlowControl="false"
> >> > optimizedDispatch="true" memoryLimit="100mb" >
> >> > <deadLetterStrategy>
> >> > <!-- Use the prefix 'DLQ.' for the destination
> name,
> >> > and make the DLQ a queue rather than a topic -->
> >> > <individualDeadLetterStrategy queuePrefix="DLQ."
> >> > useQueueForQueueMessages="true" />
> >> > </deadLetterStrategy>
> >> > </policyEntry>
> >> > </policyEntries>
> >> > </policyMap>
> >> > </destinationPolicy>
> >> >
> >> > <managementContext>
> >> > <managementContext connectorPort="2011"/>
> >> > </managementContext>
> >> >
> >> >
> >> > <persistenceAdapter>
> >> > <mKahaDB directory="${activemq.base}/data/kahadb">
> >> > <filteredPersistenceAdapters>
> >> > <filteredKahaDB queue="queue1.>">
> >> > <persistenceAdapter>
> >> > <kahaDB />
> >> > </persistenceAdapter>
> >> > </filteredKahaDB>
> >> > <filteredKahaDB queue="queue2.>">
> >> > <persistenceAdapter>
> >> > <kahaDB />
> >> > </persistenceAdapter>
> >> > </filteredKahaDB>
> >> > <filteredKahaDB>
> >> > <persistenceAdapter>
> >> > <kahaDB />
> >> > </persistenceAdapter>
> >> > </filteredKahaDB>
> >> > </filteredPersistenceAdapters>
> >> > </mKahaDB>
> >> > </persistenceAdapter>
> >> >
> >> > <systemUsage>
> >> > <systemUsage>
> >> > <!-- maximum memory to be used by the broker -->
> >> > <memoryUsage>
> >> > <memoryUsage limit="512 mb"/>
> >> > </memoryUsage>
> >> > <!-- maximum disk store to be used for persistent messages -->
> >> > <storeUsage>
> >> > <storeUsage limit="50 gb"/>
> >> > </storeUsage>
> >> > <!-- non persistent messages -->
> >> > <tempUsage>
> >> > <tempUsage limit="5 gb"/>
> >> > </tempUsage>
> >> > </systemUsage>
> >> > </systemUsage>
> >> >
> >> > <transportConnectors>
> >> > <transportConnector name="openwire" uri="tcp://
> >> 0.0.0.0:61616
> >> > "/>
> >> > <transportConnector name="stomp" uri="stomp://0.0.0.0:61613"/>
> >> > </transportConnectors>
> >> >
> >> > </broker>
> >> > <import resource="jetty.xml"/>
> >> >
> >> > </beans>
> >> >
> >> >
> >> > Thanks in advance.
> >> >
> >> > Juan
> >> >
> >>
> >>
> >>
> >> --
> >> http://redhat.com
> >> http://blog.garytully.com
> >>
> >
> >
>
--
http://redhat.com
http://blog.garytully.com
Re: mKahaDB: "PageFile is not loaded" exception
Posted by Juan Nin <ju...@gmail.com>.
Issue has been created, and Unit test attached to it:
https://issues.apache.org/jira/browse/AMQ-4407
Regards.
On Wed, Mar 20, 2013 at 1:34 PM, Juan Nin <ju...@gmail.com> wrote:
> Thx Gary!
>
> Will have my Team look into the Unit test, etc
>
>
> On Tue, Mar 12, 2013 at 5:52 PM, Gary Tully <ga...@gmail.com> wrote:
>
>> that is a bug for sure. There was a related issue resolved in 5.8 -
>> https://issues.apache.org/jira/browse/AMQ-4220 and the fix has a nice
>> test.
>> Maybe u can come up with a variant of that test case that can easily
>> reproduce. In any event. please raise an issue to track this.
>> see the test:
>>
>> https://fisheye6.atlassian.com/browse/activemq/trunk/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4220Test.java?hb=true
>>
>>
>> On 12 March 2013 15:42, Juan Nin <ju...@gmail.com> wrote:
>>
>> > Hi, any insights into this anyone?
>> >
>> > Thanks in advance.
>> >
>> > ---------- Forwarded message ----------
>> > From: Juan Nin <ju...@gmail.com>
>> > Date: Fri, Mar 8, 2013 at 11:08 AM
>> > Subject: mKahaDB: "PageFile is not loaded" exception
>> > To: users@activemq.apache.org
>> >
>> >
>> > Hi!
>> >
>> > I'm testing mKahaDB under ActiveMQ 5.8.0, so as to have separate
>> journals
>> > for queues with different behaviours.
>> > In the config I'm setting up 3 journals:
>> >
>> > - one for "queue1.>" queues
>> > - another one for "queue2.>" queues
>> > - and a default one for the other queues
>> >
>> > Startup goes fine and each journal directory is created:
>> >
>> > $ ls -l /usr/local/apache-activemq-5.8.0/data/kahadb/
>> > total 0
>> > drwxr-xr-x 6 root staff 204 Mar 8 10:27 0
>> > drwxr-xr-x 6 root staff 204 Mar 8 10:27 queue#3a#2f#2fqueue1.#3e
>> > drwxr-xr-x 6 root staff 204 Mar 8 10:27 queue#3a#2f#2fqueue2.#3e
>> > drwxr-xr-x 3 root staff 102 Mar 8 10:27 txStore
>> >
>> >
>> > Log:
>> >
>> > 2013-03-08 10:27:11,171 | INFO | Refreshing
>> > org.apache.activemq.xbean.XBeanBrokerFactory$1@205ddb6e: startup date
>> [Fri
>> > Mar 08 10:27:11 UYST 2013]; root of context hierarchy |
>> > org.apache.activemq.xbean.XBeanBrokerFactory$1 | WrapperSimpleAppMain
>> > 2013-03-08 10:27:11,955 | INFO |
>> >
>> >
>> PListStore:[/usr/local/apache-activemq-5.8.0/bin/macosx/../../data/localhost/tmp_storage]
>> > started | org.apache.activemq.store.kahadb.plist.PListStoreImpl |
>> > WrapperSimpleAppMain
>> > 2013-03-08 10:27:12,042 | INFO | Using Persistence Adapter:
>> >
>> >
>> MultiKahaDBPersistenceAdapter[/usr/local/apache-activemq-5.8.0/bin/macosx/../../data/kahadb][KahaDBPersistenceAdapter[/usr/local/apache-activemq-5.8.0/bin/macosx/../../data/kahadb/queue#3a#2f#2fqueue1.#3e],
>> >
>> >
>> KahaDBPersistenceAdapter[/usr/local/apache-activemq-5.8.0/bin/macosx/../../data/kahadb/queue#3a#2f#2fqueue2.#3e],
>> >
>> >
>> KahaDBPersistenceAdapter[/usr/local/apache-activemq-5.8.0/bin/macosx/../../data/kahadb/0]]
>> > | org.apache.activemq.broker.BrokerService | WrapperSimpleAppMain
>> > 2013-03-08 10:27:12,045 | INFO | JMX consoles can connect to
>> > service:jmx:rmi:///jndi/rmi://localhost:2011/jmxrmi |
>> > org.apache.activemq.broker.jmx.ManagementContext | JMX connector
>> > 2013-03-08 10:27:12,532 | INFO | Apache ActiveMQ 5.8.0 (localhost,
>> > ID:myhostname.local-65211-1362745632411-0:1) is starting |
>> > org.apache.activemq.broker.BrokerService | WrapperSimpleAppMain
>> > 2013-03-08 10:27:12,533 | INFO | pending local transactions: [] |
>> > org.apache.activemq.store.kahadb.MultiKahaDBTransactionStore |
>> > WrapperSimpleAppMain
>> > 2013-03-08 10:27:12,548 | INFO | Listening for connections at:
>> > tcp://myhostname.local:61616 |
>> > org.apache.activemq.transport.TransportServerThreadSupport |
>> > WrapperSimpleAppMain
>> > 2013-03-08 10:27:12,548 | INFO | Connector openwire Started |
>> > org.apache.activemq.broker.TransportConnector | WrapperSimpleAppMain
>> > 2013-03-08 10:27:12,551 | INFO | Listening for connections at:
>> > stomp://myhostname.local:61613 |
>> > org.apache.activemq.transport.TransportServerThreadSupport |
>> > WrapperSimpleAppMain
>> > 2013-03-08 10:27:12,551 | INFO | Connector stomp Started |
>> > org.apache.activemq.broker.TransportConnector | WrapperSimpleAppMain
>> > 2013-03-08 10:27:12,552 | INFO | Apache ActiveMQ 5.8.0 (localhost,
>> > ID:myhostname.local-65211-1362745632411-0:1) started |
>> > org.apache.activemq.broker.BrokerService | WrapperSimpleAppMain
>> > 2013-03-08 10:27:12,552 | INFO | For help or more information please
>> see:
>> > http://activemq.apache.org | org.apache.activemq.broker.BrokerService |
>> > WrapperSimpleAppMain
>> > 2013-03-08 10:27:12,910 | INFO | Web console type: embedded |
>> > org.apache.activemq.web.WebConsoleStarter | WrapperSimpleAppMain
>> > 2013-03-08 10:27:13,014 | INFO | ActiveMQ WebConsole initialized. |
>> > org.apache.activemq.web.WebConsoleStarter | WrapperSimpleAppMain
>> > 2013-03-08 10:27:13,060 | INFO | Initializing Spring FrameworkServlet
>> > 'dispatcher' | /admin | WrapperSimpleAppMain
>> > 2013-03-08 10:27:13,216 | INFO | jolokia-agent: No access restrictor
>> found
>> > at classpath:/jolokia-access.xml, access to all MBeans is allowed |
>> /api |
>> > WrapperSimpleAppMain
>> >
>> >
>> > I'm using a simple PHP script, using Stomp of course, to produce
>> messages.
>> > Submitting messages to each "type" of queue works fine, and I see each
>> > different journal being modified.
>> >
>> > I submitted messages to "queue1.test", "queue2.test" and "queue3.test".
>> >
>> > Now, if after that I delete let's say "queue2.test" via the ActiveMQ web
>> > console, the journal directory "queue#3a#2f#2fqueue2.#3e" is also
>> deleted,
>> > and I see the following on the log:
>> >
>> > 2013-03-08 10:28:53,389 | INFO | Stopping async queue tasks |
>> > org.apache.activemq.store.kahadb.KahaDBStore | qtp230367322-54
>> > 2013-03-08 10:28:53,389 | INFO | Stopping async topic tasks |
>> > org.apache.activemq.store.kahadb.KahaDBStore | qtp230367322-54
>> > 2013-03-08 10:28:53,390 | INFO | Stopped KahaDB |
>> > org.apache.activemq.store.kahadb.KahaDBStore | qtp230367322-54
>> >
>> >
>> > If then I try to submit messages to "queue2.test" it fails, directory is
>> > never created back, and I see the following on the log:
>> >
>> > 2013-03-08 10:29:17,903 | WARN | Async error occurred:
>> > java.lang.IllegalStateException: PageFile is not loaded |
>> > org.apache.activemq.broker.TransportConnection.Service | ActiveMQ
>> > Transport: tcp:///0:0:0:0:0:0:0:1%0:65222@61613
>> > java.lang.IllegalStateException: PageFile is not loaded
>> > at
>> >
>> >
>> org.apache.activemq.store.kahadb.disk.page.PageFile.assertLoaded(PageFile.java:809)
>> > at
>> >
>> org.apache.activemq.store.kahadb.disk.page.PageFile.tx(PageFile.java:303)
>> > at
>> >
>> >
>> org.apache.activemq.store.kahadb.KahaDBStore$KahaDBMessageStore.getMessageCount(KahaDBStore.java:478)
>> > at
>> >
>> >
>> org.apache.activemq.store.ProxyMessageStore.getMessageCount(ProxyMessageStore.java:101)
>> > at
>> >
>> >
>> org.apache.activemq.store.ProxyMessageStore.getMessageCount(ProxyMessageStore.java:101)
>> > at org.apache.activemq.broker.region.Queue.initialize(Queue.java:376)
>> > at
>> >
>> >
>> org.apache.activemq.broker.region.DestinationFactoryImpl.createDestination(DestinationFactoryImpl.java:87)
>> > at
>> >
>> >
>> org.apache.activemq.broker.region.AbstractRegion.createDestination(AbstractRegion.java:526)
>> > at
>> >
>> >
>> org.apache.activemq.broker.jmx.ManagedQueueRegion.createDestination(ManagedQueueRegion.java:56)
>> > at
>> >
>> >
>> org.apache.activemq.broker.region.AbstractRegion.addDestination(AbstractRegion.java:136)
>> > at
>> >
>> >
>> org.apache.activemq.broker.region.RegionBroker.addDestination(RegionBroker.java:277)
>> > at
>> >
>> >
>> org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:145)
>> > at
>> >
>> >
>> org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:145)
>> > at
>> >
>> >
>> org.apache.activemq.broker.MutableBrokerFilter.addDestination(MutableBrokerFilter.java:151)
>> > at
>> >
>> org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:387)
>> > at
>> >
>> >
>> org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:282)
>> > at
>> >
>> >
>> org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:96)
>> > at
>> >
>> >
>> org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:317)
>> > at
>> >
>> >
>> org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:135)
>> > at
>> >
>> >
>> org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:499)
>> > at
>> >
>> org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:749)
>> > at
>> >
>> >
>> org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:329)
>> > at
>> >
>> >
>> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:184)
>> > at
>> >
>> >
>> org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:45)
>> > at
>> >
>> >
>> org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:288)
>> > at
>> >
>> >
>> org.apache.activemq.transport.stomp.StompTransportFilter.sendToActiveMQ(StompTransportFilter.java:84)
>> > at
>> >
>> >
>> org.apache.activemq.transport.stomp.ProtocolConverter.sendToActiveMQ(ProtocolConverter.java:195)
>> > at
>> >
>> >
>> org.apache.activemq.transport.stomp.ProtocolConverter.onStompSend(ProtocolConverter.java:321)
>> > at
>> >
>> >
>> org.apache.activemq.transport.stomp.ProtocolConverter.onStompCommand(ProtocolConverter.java:233)
>> > at
>> >
>> >
>> org.apache.activemq.transport.stomp.StompTransportFilter.onCommand(StompTransportFilter.java:73)
>> > at
>> >
>> >
>> org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
>> > at
>> >
>> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:214)
>> > at
>> >
>> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:196)
>> > at java.lang.Thread.run(Thread.java:680)
>> > 2013-03-08 10:29:17,905 | WARN | Exception occurred processing:
>> > null: java.lang.IllegalStateException: PageFile is not loaded |
>> > org.apache.activemq.transport.stomp.ProtocolConverter | ActiveMQ
>> Connection
>> > Dispatcher: tcp://0:0:0:0:0:0:0:1%0:65222
>> >
>> >
>> > Is this a bug, or am I missing anything?
>> > I've tested it under OSX 10.8.2 (Mountain Lion) and also under CentOS
>> 5.8
>> > with the exact same behaviour.
>> >
>> > This is my activemq.xml:
>> >
>> >
>> > <beans
>> > xmlns="http://www.springframework.org/schema/beans"
>> > xmlns:amq="http://activemq.apache.org/schema/core"
>> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> > xsi:schemaLocation="http://www.springframework.org/schema/beans
>> > http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>> > http://activemq.apache.org/schema/core
>> > http://activemq.apache.org/schema/core/activemq-core.xsd">
>> >
>> > <!-- Allows us to use system properties as variables in this
>> > configuration file -->
>> > <bean
>> >
>> >
>> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
>> > <property name="locations">
>> >
>> > <value>file:${activemq.base}/conf/credentials.properties</value>
>> > </property>
>> > </bean>
>> >
>> > <broker xmlns="http://activemq.apache.org/schema/core"
>> > brokerName="localhost" dataDirectory="${activemq.base}/data"
>> > advisorySupport="false">
>> >
>> > <destinationPolicy>
>> > <policyMap>
>> > <policyEntries>
>> > <!-- producerFlowControl off -->
>> > <policyEntry queue=">" producerFlowControl="false"
>> > optimizedDispatch="true" memoryLimit="100mb" >
>> > <deadLetterStrategy>
>> > <!-- Use the prefix 'DLQ.' for the destination name,
>> > and make the DLQ a queue rather than a topic -->
>> > <individualDeadLetterStrategy queuePrefix="DLQ."
>> > useQueueForQueueMessages="true" />
>> > </deadLetterStrategy>
>> > </policyEntry>
>> > </policyEntries>
>> > </policyMap>
>> > </destinationPolicy>
>> >
>> > <managementContext>
>> > <managementContext connectorPort="2011"/>
>> > </managementContext>
>> >
>> >
>> > <persistenceAdapter>
>> > <mKahaDB directory="${activemq.base}/data/kahadb">
>> > <filteredPersistenceAdapters>
>> > <filteredKahaDB queue="queue1.>">
>> > <persistenceAdapter>
>> > <kahaDB />
>> > </persistenceAdapter>
>> > </filteredKahaDB>
>> > <filteredKahaDB queue="queue2.>">
>> > <persistenceAdapter>
>> > <kahaDB />
>> > </persistenceAdapter>
>> > </filteredKahaDB>
>> > <filteredKahaDB>
>> > <persistenceAdapter>
>> > <kahaDB />
>> > </persistenceAdapter>
>> > </filteredKahaDB>
>> > </filteredPersistenceAdapters>
>> > </mKahaDB>
>> > </persistenceAdapter>
>> >
>> > <systemUsage>
>> > <systemUsage>
>> > <!-- maximum memory to be used by the broker -->
>> > <memoryUsage>
>> > <memoryUsage limit="512 mb"/>
>> > </memoryUsage>
>> > <!-- maximum disk store to be used for persistent messages -->
>> > <storeUsage>
>> > <storeUsage limit="50 gb"/>
>> > </storeUsage>
>> > <!-- non persistent messages -->
>> > <tempUsage>
>> > <tempUsage limit="5 gb"/>
>> > </tempUsage>
>> > </systemUsage>
>> > </systemUsage>
>> >
>> > <transportConnectors>
>> > <transportConnector name="openwire" uri="tcp://
>> 0.0.0.0:61616
>> > "/>
>> > <transportConnector name="stomp" uri="stomp://0.0.0.0:61613"/>
>> > </transportConnectors>
>> >
>> > </broker>
>> > <import resource="jetty.xml"/>
>> >
>> > </beans>
>> >
>> >
>> > Thanks in advance.
>> >
>> > Juan
>> >
>>
>>
>>
>> --
>> http://redhat.com
>> http://blog.garytully.com
>>
>
>
Re: mKahaDB: "PageFile is not loaded" exception
Posted by Juan Nin <ju...@gmail.com>.
Thx Gary!
Will have my Team look into the Unit test, etc
On Tue, Mar 12, 2013 at 5:52 PM, Gary Tully <ga...@gmail.com> wrote:
> that is a bug for sure. There was a related issue resolved in 5.8 -
> https://issues.apache.org/jira/browse/AMQ-4220 and the fix has a nice
> test.
> Maybe u can come up with a variant of that test case that can easily
> reproduce. In any event. please raise an issue to track this.
> see the test:
>
> https://fisheye6.atlassian.com/browse/activemq/trunk/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4220Test.java?hb=true
>
>
> On 12 March 2013 15:42, Juan Nin <ju...@gmail.com> wrote:
>
> > Hi, any insights into this anyone?
> >
> > Thanks in advance.
> >
> > ---------- Forwarded message ----------
> > From: Juan Nin <ju...@gmail.com>
> > Date: Fri, Mar 8, 2013 at 11:08 AM
> > Subject: mKahaDB: "PageFile is not loaded" exception
> > To: users@activemq.apache.org
> >
> >
> > Hi!
> >
> > I'm testing mKahaDB under ActiveMQ 5.8.0, so as to have separate journals
> > for queues with different behaviours.
> > In the config I'm setting up 3 journals:
> >
> > - one for "queue1.>" queues
> > - another one for "queue2.>" queues
> > - and a default one for the other queues
> >
> > Startup goes fine and each journal directory is created:
> >
> > $ ls -l /usr/local/apache-activemq-5.8.0/data/kahadb/
> > total 0
> > drwxr-xr-x 6 root staff 204 Mar 8 10:27 0
> > drwxr-xr-x 6 root staff 204 Mar 8 10:27 queue#3a#2f#2fqueue1.#3e
> > drwxr-xr-x 6 root staff 204 Mar 8 10:27 queue#3a#2f#2fqueue2.#3e
> > drwxr-xr-x 3 root staff 102 Mar 8 10:27 txStore
> >
> >
> > Log:
> >
> > 2013-03-08 10:27:11,171 | INFO | Refreshing
> > org.apache.activemq.xbean.XBeanBrokerFactory$1@205ddb6e: startup date
> [Fri
> > Mar 08 10:27:11 UYST 2013]; root of context hierarchy |
> > org.apache.activemq.xbean.XBeanBrokerFactory$1 | WrapperSimpleAppMain
> > 2013-03-08 10:27:11,955 | INFO |
> >
> >
> PListStore:[/usr/local/apache-activemq-5.8.0/bin/macosx/../../data/localhost/tmp_storage]
> > started | org.apache.activemq.store.kahadb.plist.PListStoreImpl |
> > WrapperSimpleAppMain
> > 2013-03-08 10:27:12,042 | INFO | Using Persistence Adapter:
> >
> >
> MultiKahaDBPersistenceAdapter[/usr/local/apache-activemq-5.8.0/bin/macosx/../../data/kahadb][KahaDBPersistenceAdapter[/usr/local/apache-activemq-5.8.0/bin/macosx/../../data/kahadb/queue#3a#2f#2fqueue1.#3e],
> >
> >
> KahaDBPersistenceAdapter[/usr/local/apache-activemq-5.8.0/bin/macosx/../../data/kahadb/queue#3a#2f#2fqueue2.#3e],
> >
> >
> KahaDBPersistenceAdapter[/usr/local/apache-activemq-5.8.0/bin/macosx/../../data/kahadb/0]]
> > | org.apache.activemq.broker.BrokerService | WrapperSimpleAppMain
> > 2013-03-08 10:27:12,045 | INFO | JMX consoles can connect to
> > service:jmx:rmi:///jndi/rmi://localhost:2011/jmxrmi |
> > org.apache.activemq.broker.jmx.ManagementContext | JMX connector
> > 2013-03-08 10:27:12,532 | INFO | Apache ActiveMQ 5.8.0 (localhost,
> > ID:myhostname.local-65211-1362745632411-0:1) is starting |
> > org.apache.activemq.broker.BrokerService | WrapperSimpleAppMain
> > 2013-03-08 10:27:12,533 | INFO | pending local transactions: [] |
> > org.apache.activemq.store.kahadb.MultiKahaDBTransactionStore |
> > WrapperSimpleAppMain
> > 2013-03-08 10:27:12,548 | INFO | Listening for connections at:
> > tcp://myhostname.local:61616 |
> > org.apache.activemq.transport.TransportServerThreadSupport |
> > WrapperSimpleAppMain
> > 2013-03-08 10:27:12,548 | INFO | Connector openwire Started |
> > org.apache.activemq.broker.TransportConnector | WrapperSimpleAppMain
> > 2013-03-08 10:27:12,551 | INFO | Listening for connections at:
> > stomp://myhostname.local:61613 |
> > org.apache.activemq.transport.TransportServerThreadSupport |
> > WrapperSimpleAppMain
> > 2013-03-08 10:27:12,551 | INFO | Connector stomp Started |
> > org.apache.activemq.broker.TransportConnector | WrapperSimpleAppMain
> > 2013-03-08 10:27:12,552 | INFO | Apache ActiveMQ 5.8.0 (localhost,
> > ID:myhostname.local-65211-1362745632411-0:1) started |
> > org.apache.activemq.broker.BrokerService | WrapperSimpleAppMain
> > 2013-03-08 10:27:12,552 | INFO | For help or more information please
> see:
> > http://activemq.apache.org | org.apache.activemq.broker.BrokerService |
> > WrapperSimpleAppMain
> > 2013-03-08 10:27:12,910 | INFO | Web console type: embedded |
> > org.apache.activemq.web.WebConsoleStarter | WrapperSimpleAppMain
> > 2013-03-08 10:27:13,014 | INFO | ActiveMQ WebConsole initialized. |
> > org.apache.activemq.web.WebConsoleStarter | WrapperSimpleAppMain
> > 2013-03-08 10:27:13,060 | INFO | Initializing Spring FrameworkServlet
> > 'dispatcher' | /admin | WrapperSimpleAppMain
> > 2013-03-08 10:27:13,216 | INFO | jolokia-agent: No access restrictor
> found
> > at classpath:/jolokia-access.xml, access to all MBeans is allowed | /api
> |
> > WrapperSimpleAppMain
> >
> >
> > I'm using a simple PHP script, using Stomp of course, to produce
> messages.
> > Submitting messages to each "type" of queue works fine, and I see each
> > different journal being modified.
> >
> > I submitted messages to "queue1.test", "queue2.test" and "queue3.test".
> >
> > Now, if after that I delete let's say "queue2.test" via the ActiveMQ web
> > console, the journal directory "queue#3a#2f#2fqueue2.#3e" is also
> deleted,
> > and I see the following on the log:
> >
> > 2013-03-08 10:28:53,389 | INFO | Stopping async queue tasks |
> > org.apache.activemq.store.kahadb.KahaDBStore | qtp230367322-54
> > 2013-03-08 10:28:53,389 | INFO | Stopping async topic tasks |
> > org.apache.activemq.store.kahadb.KahaDBStore | qtp230367322-54
> > 2013-03-08 10:28:53,390 | INFO | Stopped KahaDB |
> > org.apache.activemq.store.kahadb.KahaDBStore | qtp230367322-54
> >
> >
> > If then I try to submit messages to "queue2.test" it fails, directory is
> > never created back, and I see the following on the log:
> >
> > 2013-03-08 10:29:17,903 | WARN | Async error occurred:
> > java.lang.IllegalStateException: PageFile is not loaded |
> > org.apache.activemq.broker.TransportConnection.Service | ActiveMQ
> > Transport: tcp:///0:0:0:0:0:0:0:1%0:65222@61613
> > java.lang.IllegalStateException: PageFile is not loaded
> > at
> >
> >
> org.apache.activemq.store.kahadb.disk.page.PageFile.assertLoaded(PageFile.java:809)
> > at
> > org.apache.activemq.store.kahadb.disk.page.PageFile.tx(PageFile.java:303)
> > at
> >
> >
> org.apache.activemq.store.kahadb.KahaDBStore$KahaDBMessageStore.getMessageCount(KahaDBStore.java:478)
> > at
> >
> >
> org.apache.activemq.store.ProxyMessageStore.getMessageCount(ProxyMessageStore.java:101)
> > at
> >
> >
> org.apache.activemq.store.ProxyMessageStore.getMessageCount(ProxyMessageStore.java:101)
> > at org.apache.activemq.broker.region.Queue.initialize(Queue.java:376)
> > at
> >
> >
> org.apache.activemq.broker.region.DestinationFactoryImpl.createDestination(DestinationFactoryImpl.java:87)
> > at
> >
> >
> org.apache.activemq.broker.region.AbstractRegion.createDestination(AbstractRegion.java:526)
> > at
> >
> >
> org.apache.activemq.broker.jmx.ManagedQueueRegion.createDestination(ManagedQueueRegion.java:56)
> > at
> >
> >
> org.apache.activemq.broker.region.AbstractRegion.addDestination(AbstractRegion.java:136)
> > at
> >
> >
> org.apache.activemq.broker.region.RegionBroker.addDestination(RegionBroker.java:277)
> > at
> >
> >
> org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:145)
> > at
> >
> >
> org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:145)
> > at
> >
> >
> org.apache.activemq.broker.MutableBrokerFilter.addDestination(MutableBrokerFilter.java:151)
> > at
> >
> org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:387)
> > at
> >
> >
> org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:282)
> > at
> >
> >
> org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:96)
> > at
> >
> >
> org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:317)
> > at
> >
> >
> org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:135)
> > at
> >
> >
> org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:499)
> > at
> >
> org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:749)
> > at
> >
> >
> org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:329)
> > at
> >
> >
> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:184)
> > at
> >
> >
> org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:45)
> > at
> >
> >
> org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:288)
> > at
> >
> >
> org.apache.activemq.transport.stomp.StompTransportFilter.sendToActiveMQ(StompTransportFilter.java:84)
> > at
> >
> >
> org.apache.activemq.transport.stomp.ProtocolConverter.sendToActiveMQ(ProtocolConverter.java:195)
> > at
> >
> >
> org.apache.activemq.transport.stomp.ProtocolConverter.onStompSend(ProtocolConverter.java:321)
> > at
> >
> >
> org.apache.activemq.transport.stomp.ProtocolConverter.onStompCommand(ProtocolConverter.java:233)
> > at
> >
> >
> org.apache.activemq.transport.stomp.StompTransportFilter.onCommand(StompTransportFilter.java:73)
> > at
> >
> >
> org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
> > at
> >
> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:214)
> > at
> > org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:196)
> > at java.lang.Thread.run(Thread.java:680)
> > 2013-03-08 10:29:17,905 | WARN | Exception occurred processing:
> > null: java.lang.IllegalStateException: PageFile is not loaded |
> > org.apache.activemq.transport.stomp.ProtocolConverter | ActiveMQ
> Connection
> > Dispatcher: tcp://0:0:0:0:0:0:0:1%0:65222
> >
> >
> > Is this a bug, or am I missing anything?
> > I've tested it under OSX 10.8.2 (Mountain Lion) and also under CentOS 5.8
> > with the exact same behaviour.
> >
> > This is my activemq.xml:
> >
> >
> > <beans
> > xmlns="http://www.springframework.org/schema/beans"
> > xmlns:amq="http://activemq.apache.org/schema/core"
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xsi:schemaLocation="http://www.springframework.org/schema/beans
> > http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
> > http://activemq.apache.org/schema/core
> > http://activemq.apache.org/schema/core/activemq-core.xsd">
> >
> > <!-- Allows us to use system properties as variables in this
> > configuration file -->
> > <bean
> >
> >
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
> > <property name="locations">
> >
> > <value>file:${activemq.base}/conf/credentials.properties</value>
> > </property>
> > </bean>
> >
> > <broker xmlns="http://activemq.apache.org/schema/core"
> > brokerName="localhost" dataDirectory="${activemq.base}/data"
> > advisorySupport="false">
> >
> > <destinationPolicy>
> > <policyMap>
> > <policyEntries>
> > <!-- producerFlowControl off -->
> > <policyEntry queue=">" producerFlowControl="false"
> > optimizedDispatch="true" memoryLimit="100mb" >
> > <deadLetterStrategy>
> > <!-- Use the prefix 'DLQ.' for the destination name,
> > and make the DLQ a queue rather than a topic -->
> > <individualDeadLetterStrategy queuePrefix="DLQ."
> > useQueueForQueueMessages="true" />
> > </deadLetterStrategy>
> > </policyEntry>
> > </policyEntries>
> > </policyMap>
> > </destinationPolicy>
> >
> > <managementContext>
> > <managementContext connectorPort="2011"/>
> > </managementContext>
> >
> >
> > <persistenceAdapter>
> > <mKahaDB directory="${activemq.base}/data/kahadb">
> > <filteredPersistenceAdapters>
> > <filteredKahaDB queue="queue1.>">
> > <persistenceAdapter>
> > <kahaDB />
> > </persistenceAdapter>
> > </filteredKahaDB>
> > <filteredKahaDB queue="queue2.>">
> > <persistenceAdapter>
> > <kahaDB />
> > </persistenceAdapter>
> > </filteredKahaDB>
> > <filteredKahaDB>
> > <persistenceAdapter>
> > <kahaDB />
> > </persistenceAdapter>
> > </filteredKahaDB>
> > </filteredPersistenceAdapters>
> > </mKahaDB>
> > </persistenceAdapter>
> >
> > <systemUsage>
> > <systemUsage>
> > <!-- maximum memory to be used by the broker -->
> > <memoryUsage>
> > <memoryUsage limit="512 mb"/>
> > </memoryUsage>
> > <!-- maximum disk store to be used for persistent messages -->
> > <storeUsage>
> > <storeUsage limit="50 gb"/>
> > </storeUsage>
> > <!-- non persistent messages -->
> > <tempUsage>
> > <tempUsage limit="5 gb"/>
> > </tempUsage>
> > </systemUsage>
> > </systemUsage>
> >
> > <transportConnectors>
> > <transportConnector name="openwire" uri="tcp://0.0.0.0:61616
> > "/>
> > <transportConnector name="stomp" uri="stomp://0.0.0.0:61613"/>
> > </transportConnectors>
> >
> > </broker>
> > <import resource="jetty.xml"/>
> >
> > </beans>
> >
> >
> > Thanks in advance.
> >
> > Juan
> >
>
>
>
> --
> http://redhat.com
> http://blog.garytully.com
>
Re: mKahaDB: "PageFile is not loaded" exception
Posted by Gary Tully <ga...@gmail.com>.
that is a bug for sure. There was a related issue resolved in 5.8 -
https://issues.apache.org/jira/browse/AMQ-4220 and the fix has a nice test.
Maybe u can come up with a variant of that test case that can easily
reproduce. In any event. please raise an issue to track this.
see the test:
https://fisheye6.atlassian.com/browse/activemq/trunk/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4220Test.java?hb=true
On 12 March 2013 15:42, Juan Nin <ju...@gmail.com> wrote:
> Hi, any insights into this anyone?
>
> Thanks in advance.
>
> ---------- Forwarded message ----------
> From: Juan Nin <ju...@gmail.com>
> Date: Fri, Mar 8, 2013 at 11:08 AM
> Subject: mKahaDB: "PageFile is not loaded" exception
> To: users@activemq.apache.org
>
>
> Hi!
>
> I'm testing mKahaDB under ActiveMQ 5.8.0, so as to have separate journals
> for queues with different behaviours.
> In the config I'm setting up 3 journals:
>
> - one for "queue1.>" queues
> - another one for "queue2.>" queues
> - and a default one for the other queues
>
> Startup goes fine and each journal directory is created:
>
> $ ls -l /usr/local/apache-activemq-5.8.0/data/kahadb/
> total 0
> drwxr-xr-x 6 root staff 204 Mar 8 10:27 0
> drwxr-xr-x 6 root staff 204 Mar 8 10:27 queue#3a#2f#2fqueue1.#3e
> drwxr-xr-x 6 root staff 204 Mar 8 10:27 queue#3a#2f#2fqueue2.#3e
> drwxr-xr-x 3 root staff 102 Mar 8 10:27 txStore
>
>
> Log:
>
> 2013-03-08 10:27:11,171 | INFO | Refreshing
> org.apache.activemq.xbean.XBeanBrokerFactory$1@205ddb6e: startup date [Fri
> Mar 08 10:27:11 UYST 2013]; root of context hierarchy |
> org.apache.activemq.xbean.XBeanBrokerFactory$1 | WrapperSimpleAppMain
> 2013-03-08 10:27:11,955 | INFO |
>
> PListStore:[/usr/local/apache-activemq-5.8.0/bin/macosx/../../data/localhost/tmp_storage]
> started | org.apache.activemq.store.kahadb.plist.PListStoreImpl |
> WrapperSimpleAppMain
> 2013-03-08 10:27:12,042 | INFO | Using Persistence Adapter:
>
> MultiKahaDBPersistenceAdapter[/usr/local/apache-activemq-5.8.0/bin/macosx/../../data/kahadb][KahaDBPersistenceAdapter[/usr/local/apache-activemq-5.8.0/bin/macosx/../../data/kahadb/queue#3a#2f#2fqueue1.#3e],
>
> KahaDBPersistenceAdapter[/usr/local/apache-activemq-5.8.0/bin/macosx/../../data/kahadb/queue#3a#2f#2fqueue2.#3e],
>
> KahaDBPersistenceAdapter[/usr/local/apache-activemq-5.8.0/bin/macosx/../../data/kahadb/0]]
> | org.apache.activemq.broker.BrokerService | WrapperSimpleAppMain
> 2013-03-08 10:27:12,045 | INFO | JMX consoles can connect to
> service:jmx:rmi:///jndi/rmi://localhost:2011/jmxrmi |
> org.apache.activemq.broker.jmx.ManagementContext | JMX connector
> 2013-03-08 10:27:12,532 | INFO | Apache ActiveMQ 5.8.0 (localhost,
> ID:myhostname.local-65211-1362745632411-0:1) is starting |
> org.apache.activemq.broker.BrokerService | WrapperSimpleAppMain
> 2013-03-08 10:27:12,533 | INFO | pending local transactions: [] |
> org.apache.activemq.store.kahadb.MultiKahaDBTransactionStore |
> WrapperSimpleAppMain
> 2013-03-08 10:27:12,548 | INFO | Listening for connections at:
> tcp://myhostname.local:61616 |
> org.apache.activemq.transport.TransportServerThreadSupport |
> WrapperSimpleAppMain
> 2013-03-08 10:27:12,548 | INFO | Connector openwire Started |
> org.apache.activemq.broker.TransportConnector | WrapperSimpleAppMain
> 2013-03-08 10:27:12,551 | INFO | Listening for connections at:
> stomp://myhostname.local:61613 |
> org.apache.activemq.transport.TransportServerThreadSupport |
> WrapperSimpleAppMain
> 2013-03-08 10:27:12,551 | INFO | Connector stomp Started |
> org.apache.activemq.broker.TransportConnector | WrapperSimpleAppMain
> 2013-03-08 10:27:12,552 | INFO | Apache ActiveMQ 5.8.0 (localhost,
> ID:myhostname.local-65211-1362745632411-0:1) started |
> org.apache.activemq.broker.BrokerService | WrapperSimpleAppMain
> 2013-03-08 10:27:12,552 | INFO | For help or more information please see:
> http://activemq.apache.org | org.apache.activemq.broker.BrokerService |
> WrapperSimpleAppMain
> 2013-03-08 10:27:12,910 | INFO | Web console type: embedded |
> org.apache.activemq.web.WebConsoleStarter | WrapperSimpleAppMain
> 2013-03-08 10:27:13,014 | INFO | ActiveMQ WebConsole initialized. |
> org.apache.activemq.web.WebConsoleStarter | WrapperSimpleAppMain
> 2013-03-08 10:27:13,060 | INFO | Initializing Spring FrameworkServlet
> 'dispatcher' | /admin | WrapperSimpleAppMain
> 2013-03-08 10:27:13,216 | INFO | jolokia-agent: No access restrictor found
> at classpath:/jolokia-access.xml, access to all MBeans is allowed | /api |
> WrapperSimpleAppMain
>
>
> I'm using a simple PHP script, using Stomp of course, to produce messages.
> Submitting messages to each "type" of queue works fine, and I see each
> different journal being modified.
>
> I submitted messages to "queue1.test", "queue2.test" and "queue3.test".
>
> Now, if after that I delete let's say "queue2.test" via the ActiveMQ web
> console, the journal directory "queue#3a#2f#2fqueue2.#3e" is also deleted,
> and I see the following on the log:
>
> 2013-03-08 10:28:53,389 | INFO | Stopping async queue tasks |
> org.apache.activemq.store.kahadb.KahaDBStore | qtp230367322-54
> 2013-03-08 10:28:53,389 | INFO | Stopping async topic tasks |
> org.apache.activemq.store.kahadb.KahaDBStore | qtp230367322-54
> 2013-03-08 10:28:53,390 | INFO | Stopped KahaDB |
> org.apache.activemq.store.kahadb.KahaDBStore | qtp230367322-54
>
>
> If then I try to submit messages to "queue2.test" it fails, directory is
> never created back, and I see the following on the log:
>
> 2013-03-08 10:29:17,903 | WARN | Async error occurred:
> java.lang.IllegalStateException: PageFile is not loaded |
> org.apache.activemq.broker.TransportConnection.Service | ActiveMQ
> Transport: tcp:///0:0:0:0:0:0:0:1%0:65222@61613
> java.lang.IllegalStateException: PageFile is not loaded
> at
>
> org.apache.activemq.store.kahadb.disk.page.PageFile.assertLoaded(PageFile.java:809)
> at
> org.apache.activemq.store.kahadb.disk.page.PageFile.tx(PageFile.java:303)
> at
>
> org.apache.activemq.store.kahadb.KahaDBStore$KahaDBMessageStore.getMessageCount(KahaDBStore.java:478)
> at
>
> org.apache.activemq.store.ProxyMessageStore.getMessageCount(ProxyMessageStore.java:101)
> at
>
> org.apache.activemq.store.ProxyMessageStore.getMessageCount(ProxyMessageStore.java:101)
> at org.apache.activemq.broker.region.Queue.initialize(Queue.java:376)
> at
>
> org.apache.activemq.broker.region.DestinationFactoryImpl.createDestination(DestinationFactoryImpl.java:87)
> at
>
> org.apache.activemq.broker.region.AbstractRegion.createDestination(AbstractRegion.java:526)
> at
>
> org.apache.activemq.broker.jmx.ManagedQueueRegion.createDestination(ManagedQueueRegion.java:56)
> at
>
> org.apache.activemq.broker.region.AbstractRegion.addDestination(AbstractRegion.java:136)
> at
>
> org.apache.activemq.broker.region.RegionBroker.addDestination(RegionBroker.java:277)
> at
>
> org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:145)
> at
>
> org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:145)
> at
>
> org.apache.activemq.broker.MutableBrokerFilter.addDestination(MutableBrokerFilter.java:151)
> at
> org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:387)
> at
>
> org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:282)
> at
>
> org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:96)
> at
>
> org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:317)
> at
>
> org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:135)
> at
>
> org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:499)
> at
> org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:749)
> at
>
> org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:329)
> at
>
> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:184)
> at
>
> org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:45)
> at
>
> org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:288)
> at
>
> org.apache.activemq.transport.stomp.StompTransportFilter.sendToActiveMQ(StompTransportFilter.java:84)
> at
>
> org.apache.activemq.transport.stomp.ProtocolConverter.sendToActiveMQ(ProtocolConverter.java:195)
> at
>
> org.apache.activemq.transport.stomp.ProtocolConverter.onStompSend(ProtocolConverter.java:321)
> at
>
> org.apache.activemq.transport.stomp.ProtocolConverter.onStompCommand(ProtocolConverter.java:233)
> at
>
> org.apache.activemq.transport.stomp.StompTransportFilter.onCommand(StompTransportFilter.java:73)
> at
>
> org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
> at
> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:214)
> at
> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:196)
> at java.lang.Thread.run(Thread.java:680)
> 2013-03-08 10:29:17,905 | WARN | Exception occurred processing:
> null: java.lang.IllegalStateException: PageFile is not loaded |
> org.apache.activemq.transport.stomp.ProtocolConverter | ActiveMQ Connection
> Dispatcher: tcp://0:0:0:0:0:0:0:1%0:65222
>
>
> Is this a bug, or am I missing anything?
> I've tested it under OSX 10.8.2 (Mountain Lion) and also under CentOS 5.8
> with the exact same behaviour.
>
> This is my activemq.xml:
>
>
> <beans
> xmlns="http://www.springframework.org/schema/beans"
> xmlns:amq="http://activemq.apache.org/schema/core"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
> http://activemq.apache.org/schema/core
> http://activemq.apache.org/schema/core/activemq-core.xsd">
>
> <!-- Allows us to use system properties as variables in this
> configuration file -->
> <bean
>
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
> <property name="locations">
>
> <value>file:${activemq.base}/conf/credentials.properties</value>
> </property>
> </bean>
>
> <broker xmlns="http://activemq.apache.org/schema/core"
> brokerName="localhost" dataDirectory="${activemq.base}/data"
> advisorySupport="false">
>
> <destinationPolicy>
> <policyMap>
> <policyEntries>
> <!-- producerFlowControl off -->
> <policyEntry queue=">" producerFlowControl="false"
> optimizedDispatch="true" memoryLimit="100mb" >
> <deadLetterStrategy>
> <!-- Use the prefix 'DLQ.' for the destination name,
> and make the DLQ a queue rather than a topic -->
> <individualDeadLetterStrategy queuePrefix="DLQ."
> useQueueForQueueMessages="true" />
> </deadLetterStrategy>
> </policyEntry>
> </policyEntries>
> </policyMap>
> </destinationPolicy>
>
> <managementContext>
> <managementContext connectorPort="2011"/>
> </managementContext>
>
>
> <persistenceAdapter>
> <mKahaDB directory="${activemq.base}/data/kahadb">
> <filteredPersistenceAdapters>
> <filteredKahaDB queue="queue1.>">
> <persistenceAdapter>
> <kahaDB />
> </persistenceAdapter>
> </filteredKahaDB>
> <filteredKahaDB queue="queue2.>">
> <persistenceAdapter>
> <kahaDB />
> </persistenceAdapter>
> </filteredKahaDB>
> <filteredKahaDB>
> <persistenceAdapter>
> <kahaDB />
> </persistenceAdapter>
> </filteredKahaDB>
> </filteredPersistenceAdapters>
> </mKahaDB>
> </persistenceAdapter>
>
> <systemUsage>
> <systemUsage>
> <!-- maximum memory to be used by the broker -->
> <memoryUsage>
> <memoryUsage limit="512 mb"/>
> </memoryUsage>
> <!-- maximum disk store to be used for persistent messages -->
> <storeUsage>
> <storeUsage limit="50 gb"/>
> </storeUsage>
> <!-- non persistent messages -->
> <tempUsage>
> <tempUsage limit="5 gb"/>
> </tempUsage>
> </systemUsage>
> </systemUsage>
>
> <transportConnectors>
> <transportConnector name="openwire" uri="tcp://0.0.0.0:61616
> "/>
> <transportConnector name="stomp" uri="stomp://0.0.0.0:61613"/>
> </transportConnectors>
>
> </broker>
> <import resource="jetty.xml"/>
>
> </beans>
>
>
> Thanks in advance.
>
> Juan
>
--
http://redhat.com
http://blog.garytully.com
Fwd: mKahaDB: "PageFile is not loaded" exception
Posted by Juan Nin <ju...@gmail.com>.
Hi, any insights into this anyone?
Thanks in advance.
---------- Forwarded message ----------
From: Juan Nin <ju...@gmail.com>
Date: Fri, Mar 8, 2013 at 11:08 AM
Subject: mKahaDB: "PageFile is not loaded" exception
To: users@activemq.apache.org
Hi!
I'm testing mKahaDB under ActiveMQ 5.8.0, so as to have separate journals
for queues with different behaviours.
In the config I'm setting up 3 journals:
- one for "queue1.>" queues
- another one for "queue2.>" queues
- and a default one for the other queues
Startup goes fine and each journal directory is created:
$ ls -l /usr/local/apache-activemq-5.8.0/data/kahadb/
total 0
drwxr-xr-x 6 root staff 204 Mar 8 10:27 0
drwxr-xr-x 6 root staff 204 Mar 8 10:27 queue#3a#2f#2fqueue1.#3e
drwxr-xr-x 6 root staff 204 Mar 8 10:27 queue#3a#2f#2fqueue2.#3e
drwxr-xr-x 3 root staff 102 Mar 8 10:27 txStore
Log:
2013-03-08 10:27:11,171 | INFO | Refreshing
org.apache.activemq.xbean.XBeanBrokerFactory$1@205ddb6e: startup date [Fri
Mar 08 10:27:11 UYST 2013]; root of context hierarchy |
org.apache.activemq.xbean.XBeanBrokerFactory$1 | WrapperSimpleAppMain
2013-03-08 10:27:11,955 | INFO |
PListStore:[/usr/local/apache-activemq-5.8.0/bin/macosx/../../data/localhost/tmp_storage]
started | org.apache.activemq.store.kahadb.plist.PListStoreImpl |
WrapperSimpleAppMain
2013-03-08 10:27:12,042 | INFO | Using Persistence Adapter:
MultiKahaDBPersistenceAdapter[/usr/local/apache-activemq-5.8.0/bin/macosx/../../data/kahadb][KahaDBPersistenceAdapter[/usr/local/apache-activemq-5.8.0/bin/macosx/../../data/kahadb/queue#3a#2f#2fqueue1.#3e],
KahaDBPersistenceAdapter[/usr/local/apache-activemq-5.8.0/bin/macosx/../../data/kahadb/queue#3a#2f#2fqueue2.#3e],
KahaDBPersistenceAdapter[/usr/local/apache-activemq-5.8.0/bin/macosx/../../data/kahadb/0]]
| org.apache.activemq.broker.BrokerService | WrapperSimpleAppMain
2013-03-08 10:27:12,045 | INFO | JMX consoles can connect to
service:jmx:rmi:///jndi/rmi://localhost:2011/jmxrmi |
org.apache.activemq.broker.jmx.ManagementContext | JMX connector
2013-03-08 10:27:12,532 | INFO | Apache ActiveMQ 5.8.0 (localhost,
ID:myhostname.local-65211-1362745632411-0:1) is starting |
org.apache.activemq.broker.BrokerService | WrapperSimpleAppMain
2013-03-08 10:27:12,533 | INFO | pending local transactions: [] |
org.apache.activemq.store.kahadb.MultiKahaDBTransactionStore |
WrapperSimpleAppMain
2013-03-08 10:27:12,548 | INFO | Listening for connections at:
tcp://myhostname.local:61616 |
org.apache.activemq.transport.TransportServerThreadSupport |
WrapperSimpleAppMain
2013-03-08 10:27:12,548 | INFO | Connector openwire Started |
org.apache.activemq.broker.TransportConnector | WrapperSimpleAppMain
2013-03-08 10:27:12,551 | INFO | Listening for connections at:
stomp://myhostname.local:61613 |
org.apache.activemq.transport.TransportServerThreadSupport |
WrapperSimpleAppMain
2013-03-08 10:27:12,551 | INFO | Connector stomp Started |
org.apache.activemq.broker.TransportConnector | WrapperSimpleAppMain
2013-03-08 10:27:12,552 | INFO | Apache ActiveMQ 5.8.0 (localhost,
ID:myhostname.local-65211-1362745632411-0:1) started |
org.apache.activemq.broker.BrokerService | WrapperSimpleAppMain
2013-03-08 10:27:12,552 | INFO | For help or more information please see:
http://activemq.apache.org | org.apache.activemq.broker.BrokerService |
WrapperSimpleAppMain
2013-03-08 10:27:12,910 | INFO | Web console type: embedded |
org.apache.activemq.web.WebConsoleStarter | WrapperSimpleAppMain
2013-03-08 10:27:13,014 | INFO | ActiveMQ WebConsole initialized. |
org.apache.activemq.web.WebConsoleStarter | WrapperSimpleAppMain
2013-03-08 10:27:13,060 | INFO | Initializing Spring FrameworkServlet
'dispatcher' | /admin | WrapperSimpleAppMain
2013-03-08 10:27:13,216 | INFO | jolokia-agent: No access restrictor found
at classpath:/jolokia-access.xml, access to all MBeans is allowed | /api |
WrapperSimpleAppMain
I'm using a simple PHP script, using Stomp of course, to produce messages.
Submitting messages to each "type" of queue works fine, and I see each
different journal being modified.
I submitted messages to "queue1.test", "queue2.test" and "queue3.test".
Now, if after that I delete let's say "queue2.test" via the ActiveMQ web
console, the journal directory "queue#3a#2f#2fqueue2.#3e" is also deleted,
and I see the following on the log:
2013-03-08 10:28:53,389 | INFO | Stopping async queue tasks |
org.apache.activemq.store.kahadb.KahaDBStore | qtp230367322-54
2013-03-08 10:28:53,389 | INFO | Stopping async topic tasks |
org.apache.activemq.store.kahadb.KahaDBStore | qtp230367322-54
2013-03-08 10:28:53,390 | INFO | Stopped KahaDB |
org.apache.activemq.store.kahadb.KahaDBStore | qtp230367322-54
If then I try to submit messages to "queue2.test" it fails, directory is
never created back, and I see the following on the log:
2013-03-08 10:29:17,903 | WARN | Async error occurred:
java.lang.IllegalStateException: PageFile is not loaded |
org.apache.activemq.broker.TransportConnection.Service | ActiveMQ
Transport: tcp:///0:0:0:0:0:0:0:1%0:65222@61613
java.lang.IllegalStateException: PageFile is not loaded
at
org.apache.activemq.store.kahadb.disk.page.PageFile.assertLoaded(PageFile.java:809)
at
org.apache.activemq.store.kahadb.disk.page.PageFile.tx(PageFile.java:303)
at
org.apache.activemq.store.kahadb.KahaDBStore$KahaDBMessageStore.getMessageCount(KahaDBStore.java:478)
at
org.apache.activemq.store.ProxyMessageStore.getMessageCount(ProxyMessageStore.java:101)
at
org.apache.activemq.store.ProxyMessageStore.getMessageCount(ProxyMessageStore.java:101)
at org.apache.activemq.broker.region.Queue.initialize(Queue.java:376)
at
org.apache.activemq.broker.region.DestinationFactoryImpl.createDestination(DestinationFactoryImpl.java:87)
at
org.apache.activemq.broker.region.AbstractRegion.createDestination(AbstractRegion.java:526)
at
org.apache.activemq.broker.jmx.ManagedQueueRegion.createDestination(ManagedQueueRegion.java:56)
at
org.apache.activemq.broker.region.AbstractRegion.addDestination(AbstractRegion.java:136)
at
org.apache.activemq.broker.region.RegionBroker.addDestination(RegionBroker.java:277)
at
org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:145)
at
org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:145)
at
org.apache.activemq.broker.MutableBrokerFilter.addDestination(MutableBrokerFilter.java:151)
at
org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:387)
at
org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:282)
at
org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:96)
at
org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:317)
at
org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:135)
at
org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:499)
at
org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:749)
at
org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:329)
at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:184)
at
org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:45)
at
org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:288)
at
org.apache.activemq.transport.stomp.StompTransportFilter.sendToActiveMQ(StompTransportFilter.java:84)
at
org.apache.activemq.transport.stomp.ProtocolConverter.sendToActiveMQ(ProtocolConverter.java:195)
at
org.apache.activemq.transport.stomp.ProtocolConverter.onStompSend(ProtocolConverter.java:321)
at
org.apache.activemq.transport.stomp.ProtocolConverter.onStompCommand(ProtocolConverter.java:233)
at
org.apache.activemq.transport.stomp.StompTransportFilter.onCommand(StompTransportFilter.java:73)
at
org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
at
org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:214)
at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:196)
at java.lang.Thread.run(Thread.java:680)
2013-03-08 10:29:17,905 | WARN | Exception occurred processing:
null: java.lang.IllegalStateException: PageFile is not loaded |
org.apache.activemq.transport.stomp.ProtocolConverter | ActiveMQ Connection
Dispatcher: tcp://0:0:0:0:0:0:0:1%0:65222
Is this a bug, or am I missing anything?
I've tested it under OSX 10.8.2 (Mountain Lion) and also under CentOS 5.8
with the exact same behaviour.
This is my activemq.xml:
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/schema/core
http://activemq.apache.org/schema/core/activemq-core.xsd">
<!-- Allows us to use system properties as variables in this
configuration file -->
<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<value>file:${activemq.base}/conf/credentials.properties</value>
</property>
</bean>
<broker xmlns="http://activemq.apache.org/schema/core"
brokerName="localhost" dataDirectory="${activemq.base}/data"
advisorySupport="false">
<destinationPolicy>
<policyMap>
<policyEntries>
<!-- producerFlowControl off -->
<policyEntry queue=">" producerFlowControl="false"
optimizedDispatch="true" memoryLimit="100mb" >
<deadLetterStrategy>
<!-- Use the prefix 'DLQ.' for the destination name,
and make the DLQ a queue rather than a topic -->
<individualDeadLetterStrategy queuePrefix="DLQ."
useQueueForQueueMessages="true" />
</deadLetterStrategy>
</policyEntry>
</policyEntries>
</policyMap>
</destinationPolicy>
<managementContext>
<managementContext connectorPort="2011"/>
</managementContext>
<persistenceAdapter>
<mKahaDB directory="${activemq.base}/data/kahadb">
<filteredPersistenceAdapters>
<filteredKahaDB queue="queue1.>">
<persistenceAdapter>
<kahaDB />
</persistenceAdapter>
</filteredKahaDB>
<filteredKahaDB queue="queue2.>">
<persistenceAdapter>
<kahaDB />
</persistenceAdapter>
</filteredKahaDB>
<filteredKahaDB>
<persistenceAdapter>
<kahaDB />
</persistenceAdapter>
</filteredKahaDB>
</filteredPersistenceAdapters>
</mKahaDB>
</persistenceAdapter>
<systemUsage>
<systemUsage>
<!-- maximum memory to be used by the broker -->
<memoryUsage>
<memoryUsage limit="512 mb"/>
</memoryUsage>
<!-- maximum disk store to be used for persistent messages -->
<storeUsage>
<storeUsage limit="50 gb"/>
</storeUsage>
<!-- non persistent messages -->
<tempUsage>
<tempUsage limit="5 gb"/>
</tempUsage>
</systemUsage>
</systemUsage>
<transportConnectors>
<transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
<transportConnector name="stomp" uri="stomp://0.0.0.0:61613"/>
</transportConnectors>
</broker>
<import resource="jetty.xml"/>
</beans>
Thanks in advance.
Juan