现在的位置: 首页 > 综合 > 正文

ActiveMQ 启动异常

2012年01月06日 ⁄ 综合 ⁄ 共 1899字 ⁄ 字号 评论关闭

   在按照 《ActiveMQ in Action》的操作步骤进行操作的时候,ActiveMQ异常终止后,总是不能启动,总是在报错误。

2012-03-14 14:45:13,552 | ERROR | Failed to start ActiveMQ JMS Message Broker. Reason: java.io.EOFException: Chunk stream does not exist at page: 0 | org.apache.activemq.broker.BrokerService | main
java.io.EOFException: Chunk stream does not exist at page: 0
    at org.apache.kahadb.page.Transaction$2.readPage(Transaction.java:454)
    at org.apache.kahadb.page.Transaction$2.<init>(Transaction.java:431)
    at org.apache.kahadb.page.Transaction.openInputStream(Transaction.java:428)
    at org.apache.kahadb.page.Transaction.load(Transaction.java:404)
    at org.apache.kahadb.page.Transaction.load(Transaction.java:361)
    at org.apache.activemq.broker.scheduler.JobSchedulerStore$3.execute(JobSchedulerStore.java:250)
    at org.apache.kahadb.page.Transaction.execute(Transaction.java:728)
    at org.apache.activemq.broker.scheduler.JobSchedulerStore.doStart(JobSchedulerStore.java:239)
    at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:53)
    at org.apache.activemq.broker.scheduler.SchedulerBroker.getStore(SchedulerBroker.java:198)
    at org.apache.activemq.broker.scheduler.SchedulerBroker.getInternalScheduler(SchedulerBroker.java:185)
    at org.apache.activemq.broker.scheduler.SchedulerBroker.start(SchedulerBroker.java:85)


经过搜索了之后,悲催的发现这个是ActiveMQ5.4.1的一个bug。在5.5里面给解决了。

its a known bug and fixed in current trunk (5.5-SNAPSHOT).

https://issues.apache.org/jira/browse/AMQ-2935

    但是为了避免在学习的过程中,因为版本不匹配等原因产生问题,于是继续搜索,终于找到了解决办法。主要是由于 5.4.1 这个版本引入延迟发送的功能引起的, 解决办法是在<broker>中添加 schedulerSupport="false" 属性,禁掉scheduler功能。

参照文章http://blog.csdn.net/technofantasy/article/details/6037295

 

代码

 

<broker xmlns="http://activemq.apache.org/schema/core " brokerName="SIBBusModule-TestDeCharge-td0sib01s" useJmx="true" persistent="false" useShutdownHook="false" schedulerSupport="false" >

 

还有就是删除activemq目录下的data/xxxx/scheduler 下的所有内容,不过这种我没有尝试

抱歉!评论已关闭.