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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

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

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

0 votes
Answer accepted

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

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

Suggest an answer

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

Calling any interview participants for Bitbucket Data Center

Hi everyone,  We are looking to learn more about development teams’ workflows and pain points, especially around DevOps, integrations, administration, scale, security, and the related challeng...

474 views 5 4
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