We have upgraded Bitbucket 6.8.0 to 6.10.0 as per the recommendation regarding the remote code execution CVE. After a successful upgrade 6.10.0 will not start with the following error message:
ERROR [spring-startup] c.a.s.internal.home.HomeLockAcquirer Lock file E:\Atlassian\ApplicationData\Bitbucket\.lock cannot be obtained in home directory E:\Atlassian\ApplicationData\Bitbucket. Does lloch have write permission on that directory? Is file locking enabled for the filesystem?
java.io.FileNotFoundException: Failed to create lock file E:\Atlassian\ApplicationData\Bitbucket\.lock
at com.atlassian.stash.internal.home.HomeLock.lock(HomeLock.java:101)
at com.atlassian.stash.internal.home.HomeLockAcquirer.lock(HomeLockAcquirer.java:58)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:154)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:705)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:531)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at java.lang.Thread.run(Thread.java:748)
... 29 frames trimmed
The Windows services for Bitbucket run under the 'atlbitbucket' user context. According to the NTFS file system security the user account atlbitbucket has full control of the <BITBUCKET_HOME> directory, and all child directories.
When we stop the two Windows services related to Bitbucket, we can delete both the <BITBUCKET_HOME>\.lock and <BITBUCKET_HOME>\shared\.lock files. We then start Bitbucket with the 'start-bitbucket.bat /no-search' command to not run Elastic Search, and process creates the two .lock files.
We don't know why the application server claims that it cannot obtain the lock file when the app-server creates the lock files.
Strange. I posted that rebooting the Windows computer corrected the error shortly after I created this topic and requested the topic to be closed.
Regarding your comment about the path, yes the path exists. The Java docs explain that the FileNotFoundException does not always mean that the path doesn't exist. https://docs.oracle.com/javase/7/docs/api/java/io/FileNotFoundException.html In this case the path exists, but for whatever reason the file could not be locked as stated in the error description.
Hi David,
I'm a bit puzzled by the error message, because it appears to be a FileNotFoundException that occurs, which would suggest that E:\Atlassian\ApplicationData\Bitbucket doesn't exist - is that path correct?
Cheers,
Christian
Premier Support Engineer
Atlassian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.