Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Why does System hold onto the .lock files in BitBucketHome when the service is restarted?

This BitBucket Server installation is on Windows Server 2016 and is running version 7.4.1 (previously 6.6.1 with the same issue). The problem is that the System process is holding onto the .lock files in BitBucketHome and BitBucketHome\shared and the lock is not released when the BitBucket service is restarted from the Services window. This causes BitBucket Server to encounter a fatal error upon starting since it cannot create those .lock files and obtain an exclusive lock on those directories. This causes BitBucket Server to think that another instance of BitBucket is running and maintaining that lock.

The worst part is that nothing I do will release the lock on these files and allow me to delete them so that BitBucket Server could start successfully. The only solution is to reboot which is not ideal since this is running on a server with multiple other applications on it.

To delete these files I've tried using LockHunter to unlock and delete to no avail. However it does allow me to queue the files for deletion on the next reboot which may be a necessary step.

I've used Process Explorer to try and delete the file handle that System is holding onto but each file says invalid handle when attempting to delete. I get the same error using the CLI commands with handle.exe from MS Sysinternals.

Has anyone encountered this issue and been able to resolve it? Is there a graceful way to stop the BitBucket server that will successfully remove the .lock files and prevent this from happening? 

1 answer

Same problem here, v 7.5.0

Also had this issue on the version we were on before 6.6.1 but I can't recall which version that was.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

1,880 views 0 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you