You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by sean8 <se...@gmail.com> on 2012/04/03 19:26:47 UTC

AMQ 5.5: KahaDB failed to store to Journal, java.io.IOException: The process cannot access the file because another process has locked a portion of the file

Hi,

We use ActiveMQ 5.5.1 in our web-based product that is deployed into Tomcat.
A couple of our clients get the following AMQ exceptions on Windows servers
from time to time:

2012-03-28 00:08:25,508 INFO Stopping the broker due to IO exception
[org.apache.activemq.store.kahadb.KahaDBStore] - Stopped KahaDB

2012-03-28 00:08:25,565 INFO Stopping the broker due to IO exception
[org.apache.activemq.broker.BrokerService] - ActiveMQ JMS Message Broker
(amqserver, ID:OHCINCEAS08-56068-1332761690135-0:1) stopped

2012-03-28 00:08:25,582 ERROR Stopping the broker due to IO exception 
[org.apache.activemq.store.kahadb.MessageDatabase] - KahaDB failed to store
to Journal

java.io.IOException: The process cannot access the file because another
process has locked a portion of the file
  at java.io.RandomAccessFile.writeBytes(Native Method)
  at java.io.RandomAccessFile.write(Unknown Source)
  at
org.apache.kahadb.journal.DataFileAppender.processQueue(DataFileAppender.java:374)
  at
org.apache.kahadb.journal.DataFileAppender$2.run(DataFileAppender.java:203)

Does anyone know what could cause this to happen? We did some research and
somebody mentioned Virus scan or backup process could be the potential
causes. But I am not sure why those processes could lock the KahaDB files.

Thanks.

Sean





--
View this message in context: http://activemq.2283324.n4.nabble.com/AMQ-5-5-KahaDB-failed-to-store-to-Journal-java-io-IOException-The-process-cannot-access-the-file-bece-tp4529591p4529591.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: AMQ 5.5: KahaDB failed to store to Journal, java.io.IOException: The process cannot access the file because another process has locked a portion of the file

Posted by sean8 <se...@gmail.com>.
Thanks Greg for the explanation. We will ask our clients to configure AV
software to ignore the KahaDB location and see how it goes.

Sean


--
View this message in context: http://activemq.2283324.n4.nabble.com/AMQ-5-5-KahaDB-failed-to-store-to-Journal-java-io-IOException-The-process-cannot-access-the-file-bece-tp4529699p4529810.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: AMQ 5.5: KahaDB failed to store to Journal, java.io.IOException: The process cannot access the file because another process has locked a portion of the file

Posted by Greg Thomas <gr...@gmail.com>.
On 3 April 2012 18:26, sean8 <se...@gmail.com> wrote:
> Does anyone know what could cause this to happen? We did some research and
> somebody mentioned Virus scan or backup process could be the potential
> causes. But I am not sure why those processes could lock the KahaDB files.

A virus scanner will read the contents of files to determine if they
contain a virus. During this process, the file is locked to prevent
something else reading it and spreading any potential virus. You
should ensure that your AV software ignores the location written to by
the KahaDB files.

Greg

Re: AMQ 5.5: KahaDB failed to store to Journal, java.io.IOException: The process cannot access the file because another process has locked a portion of the file

Posted by James Green <ja...@gmail.com>.
Someone should really add that the message store be isolated from host
machine's filesystem activities within the installation documentation.
Anti-virus software is the most obvious example.

I cannot see it mentioned here:
http://activemq.apache.org/getting-started.html

On 3 April 2012 18:26, sean8 <se...@gmail.com> wrote:

>
> Does anyone know what could cause this to happen? We did some research and
> somebody mentioned Virus scan or backup process could be the potential
> causes. But I am not sure why those processes could lock the KahaDB files.
>
> Thanks.
>
> Sean
>
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/AMQ-5-5-KahaDB-failed-to-store-to-Journal-java-io-IOException-The-process-cannot-access-the-file-bece-tp4529591p4529591.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>