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?
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 ...
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