Problems installing Confluence as a service on Windows 64bit
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.dllpresent in the
<confluence-install>/bindirectory or the
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).
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
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
cdto the 'bin' subdirectory of your Confluence installation.
- 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
PATHenvironment variable. If you have downloaded the JDK, ensure you have both the <jdk_home>/bin and <jdk_home>/jre/bin directories in your system
PATHenvironment 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.
Related: (Archived) Problem with installing Confluence standalone(zip file) as windows service with 64 bit JDK/JRE