It's all about the answers!

Ask a question

Setup Tomcat as Windows Service


1
1
Renato Mori (10012230) | asked Jul 18 '14, 9:53 a.m.
JAZZ DEVELOPER
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.

2 answers



permanent link
Robert Wen (690412) | answered Jul 18 '14, 4:56 p.m.
 Everything looks right.  Have you thought about increasing the Maximum memory pool to 2048 Mb?


Comments
Renato Mori commented Jul 18 '14, 6:09 p.m.
JAZZ DEVELOPER

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


Renato Mori commented Jul 23 '14, 12:06 a.m.
JAZZ DEVELOPER

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)"


Donald Nong commented Jul 23 '14, 12:33 a.m.

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?


Renato Mori commented Jul 23 '14, 10:39 a.m.
JAZZ DEVELOPER

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?


Robert Wen commented Jul 23 '14, 11:24 a.m.

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


2
Donald Nong commented Jul 23 '14, 9:54 p.m.

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.


Renato Mori commented Jul 24 '14, 11:50 a.m.
JAZZ DEVELOPER

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.



Donald Nong commented Jul 24 '14, 10:11 p.m.

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
Rohit Balduwa (945411) | answered Jul 25 '14, 5:23 a.m.
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.


Comments
Renato Mori commented Jul 25 '14, 10:14 a.m. | edited Jul 25 '14, 10:14 a.m.
JAZZ DEVELOPER

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 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.