The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bitbucket 6.10.0 on Windows Server will not start because the lock file cannot be obtained

David Renton
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 16, 2020

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. 

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
David Renton
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 20, 2020

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.

1 vote
Christian Glockner
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 17, 2020

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

TAGS
AUG Leaders

Atlassian Community Events