Bitbucket Data Center node is not coming up with the "Temporary file directory does not exist or is not accessible" error after an upgrade
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
The Bitbucket Data Center node is not coming up after an upgrade with the "Temporary file directory [var/atlassian/application-data/bitbucket/tmp/search] does not exist or is not accessible" error.
ERROR: Temporary file directory [var/atlassian/application-data/bitbucket/tmp/search] does not exist or is not accessible
Environment
Tested on Bitbucket Data Center 8.19.3
Applies to Bitbucket Data Center 8.x
Diagnosis
Need to validate the following points:
- Whether the directory for which the issue is occurring exists (represented in the error message) on the problematic Bitbucket node.
- If directory present, does it have owner and permissions correctly configured?
- Is there any syntax error in the directory path mentioned in the error message?
Cause
From the error message, the process is not able to find the directory "var/atlassian/application-data/bitbucket/tmp/search" which indicates that "/" is missing in the beginning of the directory path var. In the error, the first part indicates the <Bitbucket-Home> directory path and its associated with the /tmp/search directory.
Generally <Bitbucket-Home> gets defined inside the set-bitbucket-home.sh
script present under <Bitbucket_Install>/bin
directory. Hence <Bitbucket-Home> directory path needs to be corrected in the set-bitbucket-home.sh script.
Solution
Correcting the BITBUCKET_HOME
parameter in the set-bitbucket-home.sh
script present under <Bitbucket_Install>/bin directory, should resolve this issue.