It's all about the answers!

Ask a question

Tomcat as a service - revisited


Anthony Kesterton (7.5k9180136) | asked Feb 22 '11, 2:12 p.m.
JAZZ DEVELOPER
Hi

I have been installing RTC 3.0 GA on a Windows 2003 R23 server today - and ran into some problems with setting up Tomcat running as a service. If anyone has this running successfully, it would be very useful if you could comment on the following:

Running RTC as a service on Tomcat requires you to alter various settings files in RTC and the service information for the service. Windows makes this particularly "fun" given the use of spaces in directory paths, and the different ways to refer to files in a Windows directory structure.

There are detailed insturctions in the help here:

http://publib.boulder.ibm.com/infocenter/clmhelp/v3r0/topic/com.ibm.jazz.install.doc/topics/t_running_jazz_in_tomcat_as_win_service.html

However, there are some questions about that Help entry that require clarification:

The files that require altering are as follows (from the online help):

C:\jazz\server\conf\jazz\teamserver.properties (note this file does not exist in a new installation of RTC using the /jts and /ccm contexts)

The entry to be altered is the JDBC location

db.jdbc.location to an absolute path such as the example in the Help: C:/jazz/server/repositoryDB (the use of "/" is noted as intentional)

Q: What is the correct form of this entry?

It is not clear what this setting needs to be if your path includes spaces- is it: "c:/program files/ibm/JazzTeamServer/server/jts/repositoryDB" with quotes to cope with the spaces.

If you do use quotes - will this be interpreted correctly - as this is an invalid Windows directory - should be "\")

Q: could we use file:///c:/<path> instead?
Q: How does this cope with windows path names with spaces? Do we need quotes again??

Q: Do we need to make the changes in the teamserver.properties files in /ccm and /jts, or just /jts? This needs to be explicitly stated.
Q: What changes are required if we are using a /jazz context (an upgrade from 2.0)?

The next change is in the "conf\jts\log4j.properties" file. We need to make the value for the log4j.appender.file.File property an absolute path, such as log4j.appender.file.File=C:/jazz/server/logs/jts.log. Note the forward slash (/) in the path.

Q: How do we enter directory paths with spaces - should we use quotes?
Q: If we use quotes should we reverse the slash from "/" to "\"?
Q: Do we also need to update the /ccm log4j.properties file too?

Next step is more a Windows Service properties query. You alter the Windows services using the tomcat5w.exe. The question hear revolves around the entries in the Java Options field:

-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%
-Djazz.connector.sslProtocol=SSL_TLS
-Djazz.connector.algorithm=IbmX509
-Dlog4j.configuration=file:///c:/jazz/server/conf/startup_log4j.properties

Q: Do we need quotes for the -DJAZZ_HOME=file:///c:/jazz/server/conf entry if the path includes spaces?

many thanks

anthony

4 answers



permanent link
Jared Russell (1.3k12019) | answered Feb 24 '11, 6:53 a.m.

Q: What is the correct form of this entry?

It is not clear what this setting needs to be if your path includes spaces- is it: "c:/program files/ibm/JazzTeamServer/server/jts/repositoryDB" with quotes to cope with the spaces.


As its a standard Java properties file, you shouldn't need to quote any values that have spaces in them.


Q: could we use file:///c:/<path> instead?


My guess is no - if the code is expecting a path and you pass in a URI I would imagine it will fail.


Q: How does this cope with windows path names with spaces? Do we need quotes again??


Because this is a URI you need to escape any spaces with the %20 escape sequence (e.g. file:///c:/program%20files/ )


The next change is in the "conf\jts\log4j.properties" file. We need to make the value for the log4j.appender.file.File property an absolute path, such as log4j.appender.file.File=C:/jazz/server/logs/jts.log. Note the forward slash (/) in the path.

Q: How do we enter directory paths with spaces - should we use quotes?
Q: If we use quotes should we reverse the slash from "/" to "\"?
Q: Do we also need to update the /ccm log4j.properties file too?


As with the teamserver.properties file, this is a plain Java properties file so spaces don't need to escaped. You'll need to update both the JTS and CCM log4j.properties files if you want to have the logs output in the same directory.


Next step is more a Windows Service properties query. You alter the Windows services using the tomcat5w.exe. The question hear revolves around the entries in the Java Options field:

-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%
-Djazz.connector.sslProtocol=SSL_TLS
-Djazz.connector.algorithm=IbmX509
-Dlog4j.configuration=file:///c:/jazz/server/conf/startup_log4j.properties

Q: Do we need quotes for the -DJAZZ_HOME=file:///c:/jazz/server/conf entry if the path includes spaces?


As mentioned above, as this is a URI any spaces need to be escaped with the %20 escape sequence.

permanent link
Anthony Kesterton (7.5k9180136) | answered Feb 24 '11, 6:37 p.m.
JAZZ DEVELOPER


Thanks Jared - useful info.

I think we have it sorted, I am going try and capture the settings we used and add them to this note (need to grab the files again now it is working)

anthony

permanent link
Thomas Yu (1011199) | answered Feb 25 '11, 2:52 a.m.
On a fresh install of RTC3.0 (derby), I successfully setup Tomcat as a service
But I cannot figure out how to setup Tomcat as Windows service on a RTC3.0(derby) upgraded from V2.

I am also curious about the answer to this question.


Q: Do we need to make the changes in the teamserver.properties files in /ccm and /jts, or just /jts? This needs to be explicitly stated.
Q: What changes are required if we are using a /jazz context (an upgrade from 2.0)?

permanent link
Marco Luescher (4621) | answered Mar 30 '11, 9:41 a.m.
Hi Anthony

With the ollowing settings the Tomcat as a service with Derby runs ok:

1. Configuring Tomcat Service with
"C:\jazz\server\tomcat\bin\tomcat5w.exe" as documented on the InfoCenter
pages
-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%
-Djazz.connector.sslProtocol=SSL_TLS
-Djazz.connector.algorithm=IbmX509
-Dlog4j.configuration=file:///c:/jazz/server/conf/startup_log4j.properties

2. you can add Language options like:
-Duser.language=en
-Duser.region=US

3. more important is adding the absolute path to the entries within the
property files of jts and ccm:

...\jts\teamserver.properties

#Diese Konfigurationsaktualisierung wurde von "rtcadmin" angefordert.
Der alte Inhalt der Datei wurde nach
"C:\IBM\JAZZTE~1\server\conf\jts\teamserver-1301473959855bakup.properties"
kopiert.
#Wed Mar 30 10:32:39 CEST 2011
com.ibm.team.repository.ws.allow.identity.assertion=false
com.ibm.team.jfs.jena.tdb.history.dir=C:/IBM/JazzTeamServer/server/conf/jts/indices/jfs-rdfhistory
com.ibm.team.repository.changeEvent.expirationDefault=1209600
com.ibm.team.jfs.lucene.directory=indices/jfs-textindex
com.ibm.team.repository.db.jdbc.location=C:/IBM/JazzTeamServer/server/conf/jts/derby/repositoryDB
com.ibm.team.fulltext.indexLocation=C:/IBM/JazzTeamServer/server/conf/jts/indices/workitemindex
com.ibm.team.repository.web.suppressedPages={"com.ibm.team.repository.web.admin"\:
}
com.ibm.team.jfs.jena.tdb.storage.dir=C:/IBM/JazzTeamServer/server/conf/jts/indices/jfs-rdfindex
com.ibm.team.repository.db.repoLockId=_XuWfYFqnEeCDGu0p6kpFYw
com.ibm.team.repository.web.helpuri=/clmhelp/index.jsp
com.ibm.team.jfs.lucene.history.directory=indices/jfs-texthistory
com.ibm.team.repository.db.vendor=DERBY
com.ibm.team.repository.user.registry.type=DETECT
com.ibm.team.repository.ws.allow.admin.access=false
com.ibm.team.repository.changeEvent.expirationByCategory=SystemLog\:259200
com.ibm.team.repository.web.pageorder={"com.ibm.team.repository.web.admin"\:
,
"com.ibm.team.process.web.projectArea"\: ,"com.ibm.team.process.web.projectAreaList"\:
}
com.ibm.team.repository.server.webapp.url=https\://jazz-server.xxx.net\:9443/jts

...\ccm\teamserver.properties

#Diese Konfigurationsaktualisierung wurde von "ADMIN" angefordert. Der
alte Inhalt der Datei wurde nach
"C:\IBM\JAZZTE~1\server\conf\ccm\teamserver-1301474133718bakup.properties"
kopiert.
#Wed Mar 30 10:35:33 CEST 2011
com.ibm.team.repository.server.jts.url=https\://jazz-server.xxx.net\:9443/jts
com.ibm.team.repository.db.jdbc.location=C:/IBM/JazzTeamServer/server/conf/ccm/derby/repositoryDB
com.ibm.team.jfs.lucene.history.directory=C:/IBM/JazzTeamServer/server/conf/ccm/indices/jfs-texthistory
com.ibm.team.repository.changeEvent.expirationDefault=1209600
com.ibm.team.repository.server.webapp.url=https\://jazz-server.xxx.net\:9443/ccm
com.ibm.team.repository.db.repoLockId=_qmaKgFqnEeCJdPQM5Z5YIA
com.ibm.team.repository.ws.allow.admin.access=false
com.ibm.team.jfs.jena.tdb.history.dir=C:/IBM/JazzTeamServer/server/conf/ccm/indices/jfs-rdfhistory
com.ibm.team.repository.web.suppressedPages={"com.ibm.team.repository.web.admin"\:
}
com.ibm.team.repository.db.vendor=DERBY
com.ibm.team.jfs.jena.tdb.storage.dir=C:/IBM/JazzTeamServer/server/conf/ccm/indices/jfs-rdfindex
com.ibm.team.repository.changeEvent.expirationByType=com.ibm.team.workitem.WorkItem\:5184000
com.ibm.team.build.BuildResult\:172800
com.ibm.team.repository.web.helpuri=/clmhelp/index.jsp
com.ibm.team.jfs.lucene.directory=C:/IBM/JazzTeamServer/server/conf/ccm/indices/jfs-textindex
com.ibm.team.fulltext.indexLocation=C:/IBM/JazzTeamServer/server/conf/ccm/indices/workitemindex
com.ibm.team.repository.web.pageorder={"com.ibm.team.repository.web.admin"\:
,
"com.ibm.team.process.web.projectArea"\: ,"com.ibm.team.process.web.projectAreaList"\:
}
com.ibm.team.repository.ws.allow.identity.assertion=false
com.ibm.team.repository.changeEvent.expirationByCategory=SystemLog\:259200

4. restart the service


hope this helps
Marco


On 22.02.2011 20:23, kesterto wrote:
Hi

I have been installing RTC 3.0 GA on a Windows 2003 R23 server today -
and ran into some problems with setting up Tomcat running as a
service. If anyone has this running successfully, it would be very
useful if you could comment on the following:

Running RTC as a service on Tomcat requires you to alter various
settings files in RTC and the service information for the service.
Windows makes this particularly "fun" given the use of
spaces in directory paths, and the different ways to refer to files
in a Windows directory structure.

There are detailed insturctions in the help here:

http://publib.boulder.ibm.com/infocenter/clmhelp/v3r0/topic/com.ibm.jazz.install.doc/topics/t_running_jazz_in_tomcat_as_win_service.html

However, there are some questions about that Help entry that require
clarification:

The files that require altering are as follows (from the online
help):

C:\jazz\server\conf\jazz\teamserver.properties (note this file does
not exist in a new installation of RTC using the /jts and /ccm
contexts)

The entry to be altered is the JDBC location

db.jdbc.location to an absolute path such as the example in the Help:
C:/jazz/server/repositoryDB (the use of "/" is noted as
intentional)

Q: What is the correct form of this entry?

It is not clear what this setting needs to be if your path includes
spaces- is it: "c:/program
files/ibm/JazzTeamServer/server/jts/repositoryDB" with quotes to
cope with the spaces.

If you do use quotes - will this be interpreted correctly - as this is
an invalid Windows directory - should be "\")

Q: could we use file:///c:/<path> instead?
Q: How does this cope with windows path names with spaces? Do we need
quotes again??

Q: Do we need to make the changes in the teamserver.properties files
in /ccm and /jts, or just /jts? This needs to be explicitly stated.
Q: What changes are required if we are using a /jazz context (an
upgrade from 2.0)?

The next change is in the "conf\jts\log4j.properties" file.
We need to make the value for the log4j.appender.file.File property an
absolute path, such as
log4j.appender.file.File=C:/jazz/server/logs/jts.log. Note the
forward slash (/) in the path.

Q: How do we enter directory paths with spaces - should we use
quotes?
Q: If we use quotes should we reverse the slash from "/" to
"\"?
Q: Do we also need to update the /ccm log4j.properties file too?

Next step is more a Windows Service properties query. You alter the
Windows services using the tomcat5w.exe. The question hear revolves
around the entries in the Java Options field:

-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%
-Djazz.connector.sslProtocol=SSL_TLS
-Djazz.connector.algorithm=IbmX509
-Dlog4j.configuration=file:///c:/jazz/server/conf/startup_log4j.properties

Q: Do we need quotes for the -DJAZZ_HOME=file:///c:/jazz/server/conf
entry if the path includes spaces?

many thanks

anthony

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.