Bitbucket Server installer does not upgrade Stash service if service name is not AtlassianStash
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
Problem
When installed on Windows operating systems, Stash can be configured to run as a Windows service. During the upgrade from Stash to Bitbucket, the installer is expected to upgrade an existing Stash service to a Bitbucket service.
This step is skipped if the Stash service name is changed from its default, AtlassianStash.
Diagnosis
Environment
Any Windows operating system
Stash is installed and is configured to run as a Windows service, but its name is not Atlassian Stash AtlassianStash
Diagnostic Steps
After upgrading to Bitbucket Server you find there's no Bitbucket service configured and the service for Stash still exists in the list of services
Cause
The Bitbucket installer only detects the Stash service if it is configured with its default name. This is the expected behaviour, however there is an existing Suggestion that requests a change in behaviour, BSERV-7264 - Installer upgrade should prompt to install service
Resolution
There are two ways to resolve this problem, depending on whether you have already run the Bitbucket installer or not:
If you have not yet run the Bitbucket installer
Use the following steps to change the Stash service so its name is AtlassianStash:
Determine the current name of the service by clicking Start > Run and entering
services.msc
, followed by a click on OKFind the service whose name begins with Atlassian Stash in the list, then right-click on it and select Properties. The resulting window will look like this:
You can find the name of the service in the Display name section, and it is the last part of the name displayed there (STASH in the example screenshot). Take note of that name.
Stop the service
Open a command prompt window and navigate to
<StashInstallationDirectory\bin>
Run
service.bat remove <servicename>
where<servicename>
is the name of the service you have determined in step 2 aboveRun
service.bat install
to reinstall the service but with its default nameRefresh the list of services to confirm the original service is gone and that a new service named Atlassian Stash AtlassianStash now exists.
Once you have completed these steps you can start the Bitbucket installer, which should detect the Stash service and upgrade it to a Bitbucket service.
If you have already run the Bitbucket installer
To manually create the windows service for Bitbucket, use the instructions in 2022-07-21_05-44-18_Running Bitbucket Server as a Windows service.
Was this helpful?