Event Log errors 'failed to obtain lock on _activity.blk'

Discussion forum for Enterprise Edition.
Post Reply
METom
Posts: 30
Joined: Wed Nov 28, 2012 6:13 pm

Event Log errors 'failed to obtain lock on _activity.blk'

Post by METom »

Hi,

I am running ME Enterpreise premium (eval) on Win2008 SP2 32bit.

I am getting losts of error like the following in evnt log for different users/postoffices.
Is there a know root cause for this? How to mitigate?

Errror text in MS-Application-event log:
General: (MailEnable IMAP Service error: 3) ME-EXXXX: [Thread:3452] Error (Class S): BlockFileLock Activity notification handler (WaitForAccessToFile) failed to obtain a lock on the blockfile (D:\Mail Enable\POSTOFFICES\UngerMKM\FILEROOT\bernhard.unger\_activity.blk).

MailEnable
Site Admin
Posts: 4441
Joined: Tue Jun 25, 2002 3:03 am
Location: Melbourne, Victoria Australia

Re: Event Log errors 'failed to obtain lock on _activity.blk

Post by MailEnable »

Those errors are very serious and will need to be addressed.
The most likely cause is that the message store was moved from another computer and the correct permissions were not applied.
Specifically it means that IME_SYSTEM or LocalSystem (or whatever account the MailEnable services are running as) does not have access to the path mentioned.
The solution is to use the CACLS command to ensure the correct permissions are set.

from windows command prompt:
CACLS "C:\Program Files\Mail Enable\Postoffices" /t /e /g IME_ADMIN:F
CACLS "C:\Program Files\Mail Enable\Postoffices" /t /e /g IME_STORE_GROUP:F

Note: these commands will take a long time to complete (depening on the size of the message store).

See also: http://www.mailenable.com/kb/Content/Ar ... D=me020073

If you still have problems, I suggest running processmon and specifying a filter for the path: _activity.blk
Regards, Andrew

METom
Posts: 30
Joined: Wed Nov 28, 2012 6:13 pm

Re: Event Log errors 'failed to obtain lock on _activity.blk

Post by METom »

Hi,
I did a check and both accounts IME_ADMIN and IME_STORAGE_GROUP had Full access to the mentioned directories (and on the dir that was logged as to have difficulties to get the lock on the file).

So there seems to be no need to run CACLS again.

This store/Installation was NOT migrated.
It was a clean new testinstall (but with having the Postoffice store configured to be on drive D: - not below the ME dir on C:)

I am now going to follwo you advice and see what's going on with processmonitor.

Are there any other suggestions in the meanwhile on how to solve/mitigate?

METom
Posts: 30
Joined: Wed Nov 28, 2012 6:13 pm

Re: Event Log errors 'failed to obtain lock on _activity.blk

Post by METom »

Many thanks for pointing out to watch the path with processmon.

The rights shown in security tab of explorer were set OK.

But when going to the dir with explorer, pocessmon showed that explorer wants to list the file (while not present in dir).
So I made a checkdisk on the drive which reported some corrections (especially to the sercurity descriptors).
Now this error messages in event log (and processmon) disappeared and it seems I am back to 'normal operation' now.
Again many thanks for your feedback and shared knowledge

METom
Posts: 30
Joined: Wed Nov 28, 2012 6:13 pm

Re: Event Log errors 'failed to obtain lock on _activity.blk

Post by METom »

Just for completeness and FYI:

after having run checkdisk and updated ACLs by running the adviced CACLS commands i still got some (but less) errors in event log like the following:

"General: (MailEnable IMAP Service error: 3) ME-EXXXX: [Thread:3700] Error (Class S): BlockFileLock Activity notification handler (WaitForAccessToFile) failed to obtain a lock on the blockfile (D:\Mail Enable\POSTOFFICES\MOTI\FILEROOT\thomas.hirsch\_activity.blk)"

This was NOT related to access rights any more, but because of a MISSING directory 'FILEROOT' below the postoffice, despite the fact, that FILESTORE was enabled for the PO.
(Don't know how this happened to be, as the other POs created by me - hopefully the same way - all had this subdir created).
I then added the dir manually, checked for correct ACLs and afterwards no related new error messages in event log any more, as the faulting process was now able to create the ...\FILEROOT\<mailboxname> subdir and the needed file in there.
Hoooray! :-)

METom
Posts: 30
Joined: Wed Nov 28, 2012 6:13 pm

Re: Event Log errors 'failed to obtain lock on _activity.blk

Post by METom »

Hi all,

after having checked, that rights were set correctly, Chkdsk does not report any errors, (re)creating missing dirs, I still gett occasional events logged in system event log like the following.

General: (MailEnable HTTPMail Service error: 32) Call to DeleteFile failed for D:\Mail Enable\POSTOFFICES\MOTI\MAILROOT\Thomas.Hirsch\_folder.dty (GetLastError() returned 32)

In more Detail:
-------------
Log Name: Application
Source: MailEnable
Date: 04.01.2013 14:55:41
Event ID: 1
Task Category: None
Level: Information
Keywords: Classic
User: N/A
Computer: MAIL
Description:
General: (MailEnable HTTPMail Service error: 32) Call to DeleteFile failed for D:\Mail Enable\POSTOFFICES\MOTI\MAILROOT\Thomas.Hirsch\_folder.dty (GetLastError() returned 32)
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="MailEnable" />
<EventID Qualifiers="16384">1</EventID>
<Level>4</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2013-01-04T13:55:41.000Z" />
<EventRecordID>3843</EventRecordID>
<Channel>Application</Channel>
<Computer>MAIL</Computer>
<Security />
</System>
<EventData>
<Data>MailEnable HTTPMail Service error: 32</Data>
<Data>Call to DeleteFile failed for D:\Mail Enable\POSTOFFICES\MOTI\MAILROOT\Thomas.Hirsch\_folder.dty (GetLastError() returned 32)</Data>
</EventData>
</Event>
--------------

I would like to know it this is kind of 'normal'.
Watching for patch _folder.dty with processmon showed me, that there are lots of checks on this file per mailbox/subirs per client going on (most of the time, if clients are connected). And I am getting this event logged only occasional.

So I think, if there are _serveral_ clients connected to the mailbox, there might be a chance that one of them deleted this file, while another client still thinks he has to delete it.?

So: do i have to worry about?
If so? What other reasons and/or strategies to mitigate are known?

METom
Posts: 30
Joined: Wed Nov 28, 2012 6:13 pm

Re: Event Log errors 'failed to obtain lock on _activity.blk

Post by METom »

I finally solved errors by this (as I got more experienced with ME).

I usually boils down that ME didn't created a FILEROOT\username subdir in the users postoffice.
So it's obvious that ME (or the client) can't get a lock for a file in that non existent directory.

Solution: just create the directory on the server and things go back to normal.

Post Reply