Bitbucket Server fails to start - UnsupportedDirectoryOverrideException
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs 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
Symptoms
The following (or similar) appears in atlassian-bitbucket.log:
1
2
Caused by: com.atlassian.bitbucket.internal.home.UnsupportedDirectoryOverrideException: Overriding log directory location using bitbucket.home.log system property is no longer supported
...

Cause
Before Bitbucket Server 3.2 it was possible to use undocumented features to override the location of the following subfolders in bitbucket home:
export
bin
caches
config
data
lib
lib/native
log
plugins
tmp
To achieve this users had two options:
Introduce an environment variable in the form
BITBUCKET_HOME_[OVERRIDE]
, e.g. for overriding log -BITBUCKET_HOME_LOG
Or introduce a system property in the form
bitbucket.home.[override]
, e.g. for overriding log -bitbucket.home.log
In Bitbucket Server 3.2 and above the option to override the location of the subfolders in bitbucket home is greatly reduced and will only work on the following folder:
tmp
For all other folders Bitbucket Server will refuse to start with the symptoms described in the previous section.
Resolution
To resolve the issue bitbucket admins need to move the changed folders back under bitbucket home. For instance if the location of bin
folder was overridden using the environment variable BITBUCKET_HOME_BIN
then:
Firstly,
bin
must be put back underBITBUCKET_HOME/bin
andSecondly, the corresponding environment variable (
BITBUCKET_HOME_BIN)
must be undefined
The same applies if system properties have been used instead of environment variables.
Was this helpful?