You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by stirlingc <sc...@alarmpoint.com> on 2009/10/02 19:51:11 UTC

Unable to start ActiveMQ after blue screen of death

Hi,

Yesterday, a system running ActiveMQ (queues only, no topics or durable
subscribers) backed by the Kaha persistence store blue screened and on
restart, ActiveMQ failed with the following stacktrace:

java.io.EOFException
        at java.io.RandomAccessFile.readFully(Unknown Source)
        at java.io.RandomAccessFile.readFully(Unknown Source)
        at
org.apache.activemq.kaha.impl.data.SyncDataFileReader.readItem(SyncDataFileReader.java:71
)
        at
org.apache.activemq.kaha.impl.data.DataManagerImpl.readItem(DataManagerImpl.java:141)
        at
org.apache.activemq.kaha.impl.container.MapContainerImpl.load(MapContainerImpl.java:106)
        at
org.apache.activemq.store.kahadaptor.KahaReferenceStoreAdapter.start(KahaReferenceStoreAd
apter.java:96)
        at
org.apache.activemq.store.amq.AMQPersistenceAdapter.start(AMQPersistenceAdapter.java:203)

        at
org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerService.java:1481)
        at
org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java:1433)
        at
org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:523)
        at
org.apache.activemq.broker.BrokerService.start(BrokerService.java:432)

Deleting .activemq-data allowed the system to restart, but we lost all
persisted data.  

A couple of questions:
1) ActiveMQ/Kaha should tolerate unexpected shutdowns, so corruption of Kaha
is likely due to a bug?
2) Is there any way to recover without deleting the entire datastore.  Can a
journal or index be deleted?
3) Are there any settings in ActiveMQ that allow it to recover or
automatically flush the persistent store so that it can tolerate corrupt
data?

We have the corrupt .activemq-data folder for analysis.

Thanks for the help,
Stirling

System details:

JAR: activemq-all-5.1-SNAPSHOT.jar dated 02/20/2008
OS: Windows XP

Here's our activemq.xml:

<beans
  xmlns="http://www.springframework.org/schema/beans"
  xmlns:amq="http://activemq.org/config/1.0"
  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.org/config/1.0
http://activemq.apache.org/schema/activemq-core.xsd
  http://activemq.apache.org/camel/schema/spring
http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
  
    <!-- Allows us to use system properties as variables in this
configuration file -->
    <bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>

    <broker xmlns="http://activemq.org/config/1.0" brokerName="localhost"
dataDirectory="file:./.activemq-data" useShutdownHook="false">

        <!-- Use the following to configure how ActiveMQ is exposed in JMX
-->
        <managementContext>
            <managementContext createConnector="false"/>
        </managementContext>

        <persistenceAdapter>
            <amqPersistenceAdapter syncOnWrite="false"
directory="file:./.activemq-data" maxFileLength="20 mb"/>
        </persistenceAdapter>

        <!-- The transport connectors ActiveMQ will listen to -->
        <transportConnectors>
            <transportConnector name="vm" uri="vm://localhost"/>
        </transportConnectors>

    </broker>
</beans>

And the relevant Spring-2.0 configuration:

    <!--
     | Create the embedded ActiveMQ broker.
     +-->
    <bean id="brokerService"
class="org.apache.activemq.xbean.BrokerFactoryBean">
        <property name="config" value="file:./conf/activemq.xml" />
        <property name="start" value="false" />
    </bean>
    
    <!--
     | Factory for creating connections to embedded ActiveMQ broker.
     | The redelivery process is implemented by application code, so disable
on the connection.
     +-->
    <bean id="activeMqConnectionFactory"
class="org.apache.activemq.ActiveMQConnectionFactory" scope="singleton"
depends-on="brokerService">
        <property name="brokerURL"
value="vm://localhost?jms.redeliveryPolicy.maximumRedeliveries=-1"/>
    </bean>



-- 
View this message in context: http://www.nabble.com/Unable-to-start-ActiveMQ-after-blue-screen-of-death-tp25719757p25719757.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.