【发布时间】:2013-12-23 05:37:33
【问题描述】:
我一直在努力在 NFSv3 共享上启动具有持久存储的 AMQ 代理节点。 我不断收到以下错误,抱怨锁不可用。 在启动 AMQ 主代理之前,我已确保所有 java 进程都被杀死并删除共享文件夹上的锁定文件。
当我启动 AMQ 时,它似乎在共享文件夹上创建了一个锁文件,然后它抱怨不可用的锁。
Loading message broker from: xbean:activemq.xml
INFO | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@73cf56e9: startup date [Mon Dec 23 05:28:23 UTC 2013]; root of context hierarchy
INFO | PListStore:[/home/pnarayan/apache-activemq-5.9.0/activemq-data/notificationsBroker/tmp_storage] started
INFO | Using Persistence Adapter: KahaDBPersistenceAdapter[/home/y/share/nfs/amqnfs]
INFO | JMX consoles can connect to service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
INFO | Database /home/y/share/nfs/amqnfs/lock is locked... waiting 10 seconds for the database to be unlocked. Reason: java.io.IOException: No locks available
下面是我使用的activemq xml配置文件:
<beans
xmlns="http://www.springframework.org/schema/beans"
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.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
<broker
xmlns="http://activemq.apache.org/schema/core"
xmlns:spring="http://www.springframework.org/schema/beans"
brokerName="notificationsBroker"
useJmx="true"
start="true"
persistent="true"
useShutdownHook="false"
deleteAllMessagesOnStartup="false">
<persistenceAdapter>
<kahaDB directory="/home/y/share/nfs/amqnfs" />
</persistenceAdapter>
<transportConnectors>
<transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
<transportConnector name="stomp" uri="stomp://0.0.0.0:61613?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
</transportConnectors>
</broker>
</beans>
这是因为我使用的是 NFSv3,而不是 AMQ 推荐的 NFSv4 吗?
我认为 NFSv3 的问题在于,如果代理进程突然终止,它就无法清除锁。但是,在启动代理时应该没有任何问题。如果我的理解是正确的,为什么我会观察到上述错误?
【问题讨论】:
标签: activemq