TN0010: Running Jazz Team Server in Tomcat as a Windows Service
Build basis: Rational Team Concert 1.0, 2.0, 3.0Last Updated: March 16, 2010
Author: Richard Backhouse, Matt Lavin, Amirsam Khataei
Summary
Apache Tomcat has the ability to run as a Windows Service. This can be useful if you wish to run the Jazz Team Server on a Windows-based machine without having to be logged on.
More Information
Notes: This Tech Tip assumes that:
– you never previously installed a Windows Service to run a Jazz Team Server. If the service is already installed, remove it first.
– Jazz Team Server deployment is rooted at C:jazz
; adjust your paths accordingly based on your actual root directory.
- Execute
C:jazzservertomcatbinservice.bat
to install the Tomcat service. - If you are using Derby as the backing database for your Jazz Repository, edit
teamserver.properties
to make the DB location an absolute path. E.g., change the value ofdb.jdbc.location
toC:/jazz/server/repositoryDB
. - Make sure that the WorkItem text index is specified with a fully qualified location. Edit
teamserver.properties
to change the value ofcom.ibm.team.fulltext.indexLocation
to a fully qualified location. - Execute
C:jazzservertomcatbintomcat5w.exe
to configure the service. - On the ‘Java’ tab, uncheck ‘Use default’:
- Change the ‘Java Virtual Machine’ path.
- If you are using RTC 1.0, RQM 1.0 or RRC 1.0 add:
C:jazzserverwin32ibm-java2-i386-50jrebinj9vmjvm.dll
- If you are using RTC 2.0, RQM 2.0 or RRC 2.0 add:
C:jazzserverjrebinj9vmjvm.dll
- If you are using RTC 1.0, RQM 1.0 or RRC 1.0 add:
- Add these line at the bottom of the ‘Java Options’ text field with this content (Also check the server.startup.bat file for additional environement settings that are not included here)
- If you are using RTC 1.0, RQM 1.0 or RRC 1.0 add:
-Dcom.ibm.team.server.configURL=file:///c:/jazz/server/teamserver.properties
-Dcom.ibm.team.repository.provision.profile=file:///c:/jazz/server/provision_profiles
-Dlog4j.configuration=file:///c:/jazz/server/log4j.properties
- If you are using RTC 2.0, RQM 2.0 or RRC 2.0 add:
-DJAZZ_HOME=file:///c:/jazz/server/conf
-Djava.awt.headless=true
-Dorg.eclipse.emf.ecore.plugin.EcorePlugin.doNotLoadResourcesPlugin=true
-Dcom.ibm.team.repository.tempDir=%TEMP%
- If you are using an Oracle Database
-DORACLE_JDBC=[path to directory containing Oracle JDBC driver jar]
- If you are using a SQL Server Database
-DSQLSERVER_JDBC=[path to directory containing SQL Server JDBC driver jar]
- If you are using RTC 1.0, RQM 1.0 or RRC 1.0 add:
- Change the “Maximum memory pool” size to be
1536
.
- Change the ‘Java Virtual Machine’ path.
- On the ‘Startup’ and ‘Shutdown’ tabs, make sure the ‘Mode’ setting is ‘jvm’.
- On the ‘General’ tab you can change the ‘Startup type’ to be ‘Automatic’ if you want the sevice to start on it’s own.
- If you are running a 1.0 product then you will need to modify all the provision profiles (usually profile.ini and license-profile.ini) in
C:jazzserverprovision_profiles
and change the ‘url’ property in each one to an absolute path. For example changeurl=file:./update-site to url=file:///C:\jazz\server\update-site
. Do not make backups of the profile files in this directory as all files found will be treated as potential profiles to be used for provisioning. Also make sure that the editor you use to modify the files does not create hidden backup files. - Start the service to test out the server.
- Please note that, as there is no 64-bit Tomcat packaging, Rational Team Concert 2.0 Server gets shipped with the 32-bit version of tomcat5.exe and tomcat5w.exe. Therefore, Tomcat service would not start properly. The following error is encountered at service startup:
[2010-07-26 13:23:10] [174 javajni.c] [error] %1 is not a valid Win32 application.
[2010-07-26 13:23:10] [947 prunsrv.c] [error] Failed creating java C:IBMJazzTeamServerserverjrebinj9vmjvm.dll
[2010-07-26 13:23:10] [1202 prunsrv.c] [error] ServiceStart returned 1
To resolve this issue:
- Go to
/server/tomcat/bin directory and uninstall the 32-bit service by running: service remove Tomcat5
Note: The old service may be cached somewhere – when in doubt, reboot - Rename the 32-bit service wrapper:
copy/server/tomcat/bin/tomcat5.exe to tomcat5.exe.32bit (or any name you want to call it) - Copy the 64-bit-bit service wrapper:
copy/server/tomcat/bin/procrun/amd64/tomcat5.exe to the /server/tomcat/bin directory
- Go to