Service-specific error code 4 when starting Confluence service in Windows
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
After following the instructions on Start Confluence Automatically on Windows as a Service page, Confluence can't be started with "service-specific error code 4".
The following appears in the Windows Event Log:
The "Confluence" service terminated with service-specific error
The system cannot open the file.
Environment
- Confluence Server
- Windows OS
Diagnosis
- Ensure that Confluence is running on supported platforms
- Check the article Problems installing Confluence as a service on Windows 64bit to see if there's an issue with an incompatible Tomcat applet type
Cause
When executing the command " service.bat install Confluence"
, the Command Prompt console is not run as an Administrator account. This causes the Confluence service to be installed without sufficient privileges for accessing the required files.
This can also be caused by the service logon account not having enough permissions to start the service, especially if it's set to a network service account.
Resolution
- Remove the service with the command "
service.bat remove Confluence
" - Open the Command Prompt console as an Administrator
- Follow the instructions to install Confluence as Windows service
- If the issue persists: Open the service properties, go to the log on tab and change the option to Local System Account.