Finally Success With Multiple Tomcat Services

Getting multiple Tomcat servers (standalone) running as services in Windows

Earth Date 2010.11.08

Posted by Rich Wheadon | Permalink




Getting three tomcat services running independently on our Windows 2003 has been problematic for quite some time. I’ve gone through the process several times and always ended up doing something wrong that forced me to start over.



I recently found this post that made it look entirely too simple. (and It was) Even though I tried “MB”‘s method and failed all hope was not lost.



The builddeploy article actually focused my attention on the pieces that played a part in my service and I just had to figure out the problems my specific environment introduced. As a warning I will let you know that hours of scripting work was wasted because I wasn’t running the windows command console as administrator. I got no errors, no logs, and no progress until I started the console as system administrator. The bad part was that things just looked like they ran correctly in the console and I only began getting meaningful errors when I went into godmode. Remember I am running on Windows Server 2003 in Native Mode, so YMMV.



Gotchas that kept me from moving quickly:





Below is my revised list of steps:





tomcat6 //IS//Tomcat6two
--DisplayName="Apache Tomcat 6 #2"
--Install="C:\java\servers\Tomcat6-2\bin\tomcat6two.exe"
--Jvm=auto
--StartMode=jvm
--StopMode=jvm
--StartClass=org.apache.catalina.startup.Bootstrap
--StartParams=start
--StopClass=org.apache.catalina.startup.Bootstrap
--StopParams=stop

Finishing up:





If you hosed the service you installed and need to delete it, use the //DS// switch. You will have to restart the Windows server for the remove to be complete. (Another FAIL for MS Windows)



If you are struggling with the same thing I was then I hope this helps.



seeya, rich