Problems installing Confluence as a service on Windows 64bit
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
Problem
The Windows Service fails to install. The following error messages appear when running the service installation from the command line:
[2007-11-02 15:21:37] [402 prunsrv.c] [error] The operation completed successfully. [2007-11-02 15:21:37] [1246 prunsrv.c] [error] Load configuration failed
Alternatively, the Windows Service installs successfully, but this error message appears even with the
msvcr71.dll
present in the<confluence-install>/bin
directory or theC:\WINDOWS\system32
directory:Windows could not start the Apache Tomcat Confluence on Local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code 0. In Event Viewer there was the error The Apache Tomcat Confluence service terminated with service-specific error 0 (0x0).
Cause
While Tomcat will run on a 64-bit edition of Windows by running it directly through a 64-bit build of Java, the native Windows Service support which is bundled with Tomcat 5.5.x before 5.5.28 and Tomcat 6.x before 6.0.21 is 32-bit only. This can also occur if Confluence is using a 32-bit Tomcat 7 or 8, despite having deployed 64-bit Java in your environment
Workaround
Replace your existing Tomcat executable with a replacement version downloaded from Tomcat's subversion repository:
- Determine the version of Tomcat that is bundled with your Confluence distribution. From the
cmd
prompt,cd
to the 'bin' subdirectory of your Confluence installation. Run:
catalina.bat version
- Go to http://tomcat.apache.org/
- In the left hand navigation under 'Download', look for the version of tomcat that is bundled with your Confluence
- Under 'Binary Distributions', look for "Core". Download the package '64-bit Windows zip'
- Open the zip file and navigate to the 'bin' subdirectory and locate the two files' tomcat6.exe' and 'tomcat6w.exe' (tomcat7.exe and tomcat7w.exe if you are using Tomcat 7, tomcat8.exe and tomcat8w.exe if you are using Tomcat 8)
- Copy these two files to the 'bin' subdirectory of your Confluence installation to overwrite the two existing files (you probably want to take a backup of the existing files first)
- For each of the two files, go to properties and select 'Run this program as an administrator'
- Update the
PATH
environment variable. If you have downloaded the JDK, ensure you have both the <jdk_home>/bin and <jdk_home>/jre/bin directories in your systemPATH
environment variable. See Setting the JAVA_HOME Variable in Windows for instructions on how to set these.
Note that the JAVA_HOME variable and the PATH are different entities but are configured in the same place. The link above will give you directions on where to set these. Remove any old Confluence service startup. In a new command prompt window (this will have all the new environment variable changes you made in the previous steps):
service.bat remove confluence
Install the fresh Confluence service (running CMD as Administrator). If Any error is noted during this step, do ensure that JDK path is correctly added to the system PATH:
service.bat install confluence
You will have to clear your plugin cache before starting Confluence. This is because your current cache been compiled for a 32 bit os and need to be recompiled for 64 bit.