Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Setup Tomcat as Windows Service

I setup the tomcat application as a windows service for the clm 4.0.6.
I followed the guidance of infocenter, and it's working.. but the server has a very poor performance.
I think it's that the it's the memory allocated for the jvm.
This is the configuration of the java options i used for the tomcat7 properties:
-Dcatalina.base=D:\IBM\Rational\JazzTeamServer\server\tomcat
-Dcatalina.home=D:\IBM\Rational\JazzTeamServer\server\tomcat
-Djava.endorsed.dirs=D:\IBM\Rational\JazzTeamServer\server\tomcat\endorsed
-Djava.io.tmpdir=D:\IBM\Rational\JazzTeamServer\server\tomcat\temp
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-DJAZZ_HOME=file:///D:/IBM/Rational/JazzTeamServer/server/conf
-Djava.awt.headless=true
-Dorg.eclipse.emf.ecore.plugin.EcorePlugin.doNotLoadResourcesPlugin=true
-Dcom.ibm.team.repository.tempDir=D:\IBM\Rational\JazzTeamServer\server\tomcat\temp
-Djazz.connector.sslProtocol=SSL_TLS
-Djazz.connector.algorithm=IbmX509
-Dlog4j.configuration=file:///D:/IBM/Rational/JazzTeamServer/server/conf/startup_log4j.properties
-Xgcpolicy:gencon
-Djava.util.logging.config.file=D:\IBM\Rational\JazzTeamServer\server\tomcat\conf\logging.properties

And setup as Maximum memory pool 1024MB.

I tried setting more memory but when i do this, the service doesn't starts.
My server is a windows 2008 R2-64bits, and has 8GB RAM and i think I'm not using them at all.

Any advice will be very helpful,
Thanks.

1

1 vote



2 answers

Permanent link
 Everything looks right.  Have you thought about increasing the Maximum memory pool to 2048 Mb?

1 vote

Comments

Hi Robert,
I tried, but when i change it the service doesn't starts.

Hi Robert, i increased the max memory pool to 2048Mb, and the tomcat service didn't start. I saw the logs and see this message:
2014-07-22 22:18:58 Commons Daemon procrun stderr initialized
JVMJ9VM015W Error de inicialización para la biblioteca j9gc24(2): No se ha podido crear una instancia del almacenamiento dinámico; 2G solicitado

- In english the resume is: "Initialization error for library j9gc24(2)"

Google Translate:

JVMJ9VM015W Initialization error for j9gc24 (2) library: Failed to instantiate heap; 2G requested
It seems that you don't have enough free memory to support 2GB JVM heap size. How much free memory do you have before starting up Tomcat?

Hi Donald,
The server has 8GB Ram, and in task manager i can see that aprox 2GB are used before starting the tomcat service.. so i think should have 6GB aprox free..
but if you have another way i can validate it, please share it and will post the results.
Also, that the server is virtualized can affect it?

I'm really wondering if you're using a 64-bit version of Windows 2008.  Could you double-check? 

Hi Robert,
I think you nail this one. Windows 2008 should be 64 bit since it can display 8GB memory. But the Tomcat installed could be 32bit, and its bundled 32bit JRE can only accept maximum ~1.5GB heap size.

2 votes

mmm, good point Donald, that can be the reason.. so, the question now is if there's a way i can change the tomcat to the 64bit one?
@Robert, yes it's a 64bit one.
Here's a screenshot of the memory usage of the server, maybe can helps.


You need to install a 64bit Tomcat. If you install CLM using the Installation Manager, you have the choice of 32 bit and 64 bit during the installation.
http://stackoverflow.com/questions/6949763/how-to-find-out-if-tomcat-is-32-bit-or-64-bit-on-window-server

showing 5 of 8 show 3 more comments

Permanent link
Hi Renato

Is the tomcat server starting normally using command line!

From the problem comments, I see not all parameters(garbage collector parameters missing) are defined in the Java options text field.

Since you have 8GB RAM and no other service running, you can work with 4G for the heap size.

Add the following lines at the end of the Java Options text field( change the values as per your Tomcat setup):
 
-DJAZZ_HOME=file:///C:/PROGRA~1/IBM/JazzTeamServer/server/conf
-Djava.awt.headless=true
-Dorg.eclipse.emf.ecore.plugin.EcorePlugin.doNotLoadResourcesPlugin=true
-Dcom.ibm.team.repository.tempDir=C:\Program Files\IBM\JazzTeamServer\server\tomcat\temp
-Djazz.connector.sslProtocol=SSL_TLS
-Djazz.connector.algorithm=IbmX509
-Dlog4j.configuration=file:///C:/PROGRA~1/IBM/JazzTeamServer/server/conf/startup_log4j.properties
-Xgcpolicy:gencon
-Xgc:preferredHeapBase=0x100000000
-XX:MaxDirectMemorySize=1G
-Xmx4G
-Xms4G
-Xmn512M

Infocenter URL:
http://pic.dhe.ibm.com/infocenter/clmhelp/v4r0m6/index.jsp?topic=%2Fcom.ibm.jazz.install.doc%2Ftopics%2Ft_run_rqm64_win_service.html

Once configured, try restarting the service as an Administrator.

If this answers your question please mark it as accepted.

0 votes

Comments

Hi Rohit,
Tried adding the lines that you posted but the services didn't started.
from the tomcat log files I got this:

2014-07-25 08:37:10 Commons Daemon procrun stderr initialized
JVMJ9VM081W Valor de opción mal formado; la opción "-XX:MaxDirectMemorySize=1G" contiene caracteres " " al final que se han omitido
JVMJ9GC028E Opción con un valor demasiado grande: '-Xmx4096m'
JVMJ9VM015W Error de inicialización para la biblioteca j9gc24(2): No se ha podido inicializar; imposible analizar la línea de mandatos

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 6,116

Question asked: Jul 18 '14, 9:53 a.m.

Question was seen: 9,134 times

Last updated: Jul 25 '14, 10:14 a.m.

Confirmation Cancel Confirm