Thursday, November 26, 2009

Atlassian's Confluence. Tomcat. 64-bit Windows. Making it work as a service.

So I was installing an evaluation copy of Atlassian's "Confluence" wiki, and since we're mostly a Windows shop here, I was doing so on a Windows Server 2008 box.

All went well until I got to step 9 of the installation guide: "Start Confluence automatically on Windows as a Service." I ran into the following problem when I got to the final "net start Confluence" step.

[2009-11-27 14:51:08] [info] Procrun ( started
[2009-11-27 14:51:08] [info] Running Service...
[2009-11-27 14:51:08] [info] Starting service...
[2009-11-27 14:51:08] [197 javajni.c] [error] %1 is not a valid Win32 application.
[2009-11-27 14:51:08] [994 prunsrv.c] [error] Failed creating java c:\Progra~1\java\jdk1.6.0_17\jre\bin\server\jvm.dll
[2009-11-27 14:51:09] [1269 prunsrv.c] [error] ServiceStart returned 1
[2009-11-27 14:51:09] [info] Run service finished.
[2009-11-27 14:51:09] [info] Procrun finished.

As hinted in the "Start Confluence automatically on Windows as a Service" document, there are issues getting Apache Tomcat to run as a service on 64-bit Windows using a 64-bit JDK. The recommended workaround is to use a 32-bit JDK, but since that's a bit lame, I decided to follow the advice of the issue "Installing Confluence as a service on XP-64 fails due to 32-bit binaries of Tomcat" and try replacing the Tomcat binaries with 64-bit versions.

And here's the bit that got me scratching my head for a while. Various things I googled up directed me to the Tomcat SVN repository to get the 64-bit version, but I'll be damned if I could find a version for x86-64 or x64. Just the old IA-64 Itanium stuff, and "AMD64", which I assumed was some obscure AMD implementation.

More fool me. A trip to Wikipedia's x86-64 article clarified things: AMD64 was the marketing name AMD used for their x64-64 implementation, and those were the binaries I was looking for, for my Xeon server.

If you need them, head on over to Tomcat's SVN repository at and grab tomcat.exe from there - it worked for me!