Problems installing Confluence as a service on Windows 64bit

Still need help?

The Atlassian Community is here for you.

Ask the community

Problem

  1. 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
    
  2. Alternatively, the Windows Service installs successfully, but this error message appears even with the msvcr71.dll present in the <confluence-install>/bin directory or the C:\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:

  1. 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.
  2. Run:

    	catalina.bat version
    
  3. Go to http://tomcat.apache.org/
  4. In the left hand navigation under 'Download', look for the version of tomcat that is bundled with your Confluence
  5. Under 'Binary Distributions', look for "Core". Download the package '64-bit Windows zip'
  6. 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)
  7. 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)
  8. For each of the two files, go to properties and select 'Run this program as an administrator'
  9. 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 system PATH environment variable. See Setting the JAVA_HOME Variable in Windows for instructions on how to set these.
    (info) 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. 
  10. 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
  11. Install the fresh Confluence service (running CMD as Administrator):

    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: Problem with installing Confluence standalone(zip file) as windows service with 64 bit JDK/JRE

Last modified on Feb 26, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.