activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shelley, Ryan" <>
Subject RE: ActiveMQ and NFS mounts
Date Wed, 19 Jan 2011 17:30:07 GMT
I know for a fact that the issue is our NFS mount.  We have experienced it with other tools,
and those tools provided options for locking via other mechanisms.  I've attempted to set
"?broker.persistent=false" in all of my connections (I'm not explicitly starting any brokers
in my application as I have external ActiveMQ brokers running), so I'm not sure what VM instance
could be trying to create a persistent journal.  In the one VM connection we had, I changed
it to be TCP and it still was attempting to start a VM broker and failed with the same error.
 I'm pretty much at a loss at the moment.


-----Original Message-----
From: Stan Lewis [] 
Sent: Tuesday, January 18, 2011 5:15 PM
Subject: Re: ActiveMQ and NFS mounts

It looks like you're running out of file locks at the operating system
level.  You'll have to do a bit of research to see what the default
resource limit is for the max number of file locks allowed on your
operating system and see how to change it.  This can happen whether or
not you're running with the store on an NFS mount, it tends to be more
prevalent with NFS though because NFS doesn't always support file
locks, or typically the server process that manages distributed locks
isn't running.  In this case though you're hitting a kernel resource
limit for file locks.

Or worst case you could probably switch to an in-memory store for your
CI builds and avoid the issue altogether.

On Tue, Jan 18, 2011 at 6:14 PM, Shelley, Ryan <> wrote:
> Here's the actual stacktrace:
> 2011-01-18 04:36:25,488 [main] ERROR - Failed
to start ActiveMQ JMS Message Broker. Reason: No locks available
> No locks available
>        at Method)
>        at
>        at java.nio.channels.FileChannel.tryLock(
>        at
>        at
>        at
>        at
>        at
>        at
>        at
>        at org.apache.activemq.transport.vm.VMTransportFactory.doCompositeConnect(
>        at org.apache.activemq.transport.vm.VMTransportFactory.doConnect(
>        at org.apache.activemq.transport.TransportFactory.doConnect(
>        at org.apache.activemq.transport.TransportFactory.connect(
>        at org.apache.activemq.ActiveMQConnectionFactory.createTransport(
>        at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(
>        at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(
>        at org.apache.activemq.ActiveMQConnectionFactory.createConnection(
>        at
>        at org.springframework.jms.listener.AbstractJmsListeningContainer.createSharedConnection(
>        at org.springframework.jms.listener.AbstractJmsListeningContainer.establishSharedConnection(
>        at org.springframework.jms.listener.AbstractJmsListeningContainer.doStart(
>        at org.springframework.jms.listener.AbstractJmsListeningContainer.initialize(
>        at org.springframework.jms.listener.AbstractJmsListeningContainer.afterPropertiesSet(
>        at
>        at
>        at
>        at$
>        at Method)
>        at
>        at$1.getObject(
>        at
>        at
>        at
>        at
>        at
>        at
>        at
>        at
>        at org.springframework.test.context.TestContext.buildApplicationContext(
>        at org.springframework.test.context.TestContext.getApplicationContext(
>        at
>        at
>        at org.springframework.test.context.TestContextManager.prepareTestInstance(
>        at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(
>        at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMethod(
>        at org.junit.internal.runners.JUnit4ClassRunner.runMethods(
>        at org.junit.internal.runners.JUnit4ClassRunner$
>        at org.junit.internal.runners.ClassRoadie.runUnprotected(
>        at org.junit.internal.runners.ClassRoadie.runProtected(
>        at
>        at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(
>        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(
>        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(
>        at
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at sun.reflect.NativeMethodAccessorImpl.invoke(
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>        at java.lang.reflect.Method.invoke(
>        at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
>        at org.apache.maven.surefire.booter.SurefireBooter.main(
> -----Original Message-----
> From: Shelley, Ryan []
> Sent: Tuesday, January 18, 2011 3:11 PM
> To: ''
> Subject: ActiveMQ and NFS mounts
> I have a Continuous Integration system that runs on an NFS mount.  I'm getting errors
about ActiveMQ not being able to obtain a lock, which I've seen before in my code coverage
tools, due to our NFS mount.
> The only broker we have running during a CI test case is a VM broker, so I tried appending
"?dataDirectory=/tmp" to the VM URI to move the journal to an actual disk but I get the same
failure (we aren't using a XML config for a VM broker, so I'm trying to configure it through
the URI).  Is there something I'm missing or something I can try to avoid the locks?  I
don't care that it can't get a lock because it's just a CI test case, but it's causing our
entire build to fail.  Any ideas?
> Thanks!
> -Ryan

Stan Lewis
Twitter: gashcrumb
View raw message