It's all about the answers!

Ask a question

error when starting the apache tomcat 7.0 tomcat 7 service on local computer


anoop mc (74811200221) | asked Sep 09 '14, 5:27 a.m.
 
Hi,

We have an issue with creating and starting a new apache tomacat service for Rational Requirements Composer tool.

Steps we followed are:

1. Followed the link - http://pic.dhe.ibm.com/infocenter/clmhelp/v4r0m6/index.jsp?topic= Configuring Apache Tomcat server to run as a Windows service

2. First we verified that there is no another installed service by running command.

E:\Program Files\IBM\JazzTeamServer406\server\tomcat\bin>sc query tomcat7
[SC] EnumQueryServicesStatus:OpenService FAILED 1060:

The specified service does not exist as an installed service.

3. Installed the service
E:\Program Files\IBM\JazzTeamServer406\server\tomcat\bin>service.bat install tom
cat7
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
Service will try to guess them from the registry.
Installing the service 'tomcat7' ...
Using CATALINA_HOME:    "E:\PROGRA~2\IBM\JazzTeamServer406\server\tomcat"
Using CATALINA_BASE:    "E:\PROGRA~2\IBM\JazzTeamServer406\server\tomcat"
Using JAVA_HOME:        ""
Using JRE_HOME:         ""
Using JVM:              "auto"
The service 'tomcat7' has been installed.

4. After setting all the other settings as per the info center guide. Stopped the RRC server using Stop Script then restarted the server and in the services console the apache service appear to be in the Stopped State.

It is throwing the below error when tried to start.

rm_service_start


When verified the log files E:\Program Files\IBM\JazzTeamServer406\server\tomcat\logs

I see the below information written into it.

Sep 9, 2014 7:22:37 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: E:\Program Files\IBM\JazzTeamServer406\server\jre\bin\compressedrefs;E:\Program Files\IBM\JazzTeamServer406\server\jre\bin;C:\Windows\system32;C:\Windows;E:\Program Files (x86)\IBM\Rational\Publishing Engine\1.1.2\lib;C:\Perl64\site\bin;C:\Perl64\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;.
Sep 9, 2014 7:22:38 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-9080"]
Sep 9, 2014 7:22:38 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-9443"]
Sep 9, 2014 7:22:40 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 4526 ms
Sep 9, 2014 7:22:40 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Sep 9, 2014 7:22:40 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.32
Sep 9, 2014 7:22:41 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive E:\Program Files\IBM\JazzTeamServer406\server\tomcat\webapps\clmhelp.war
Sep 9, 2014 7:22:53 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive E:\Program Files\IBM\JazzTeamServer406\server\tomcat\webapps\converter.war
Sep 9, 2014 7:23:05 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive E:\Program Files\IBM\JazzTeamServer406\server\tomcat\webapps\rm.war
Sep 9, 2014 7:23:24 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory E:\Program Files\IBM\JazzTeamServer406\server\tomcat\webapps\ROOT
Sep 9, 2014 7:23:24 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-9080"]
Sep 9, 2014 7:23:24 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-9443"]
Sep 9, 2014 7:23:24 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 43890 ms

Finally we have login using an user account and manually Start the Service using Start Server Script and leave that session as disconnected.

Not sure what is wrong here.... Any suggestions is of great help.

5 answers



permanent link
Donald Nong (14.5k614) | answered Sep 10 '14, 1:00 a.m.
edited Sep 10 '14, 1:02 a.m.
As you can see, the installer could not pick up a Java runtime when it installed the service. Without it, Tomcat cannot run. You can remove the service, add the environment variable before running the installer again. You can also follow the steps below.
1. Run tomcat\bin\tomcat7w.exe to launch the control panel.
2. Switch to the Java tab.
3. Uncheck "Use Default".
4. Specify the correct JVM. In your case, it should be
E:\Program Files\IBM\JazzTeamServer406\server\jre\bin\j9vm\jvm.dll
5. Click OK to save changes and close the control panel.
6. Start the service.

permanent link
anoop mc (74811200221) | answered Sep 23 '14, 9:16 a.m.
 After having configured in a similar way on another machine we are getting the below error. Looks a little different from the above. Here also the server is not getting started.

apache_tomcat_err

Comments
Donald Nong commented Sep 24 '14, 12:11 a.m.

If you have verified that it's not the same issue, you should at least check the System Event Log as suggested by the error message, or check catalina.out file as you previously did.


permanent link
anoop mc (74811200221) | answered Sep 24 '14, 1:01 a.m.
edited Sep 24 '14, 1:11 a.m.
 Having checked the tomcat7-stderr.2014-09-24.log file I see the below error.

2014-09-24 00:06:51 Commons Daemon procrun stderr initialized
JVMJ9VM015W Initialization error for library j9gc24(2): Failed to instantiate heap; 4G requested

commons-daemon.2014-09-24.log file says

[2014-09-24 00:56:46] [info]  Running 'tomcat7' Service...
[2014-09-24 00:56:46] [info]  Starting service...
[2014-09-24 00:56:46] [error] CreateJavaVM Failed
[2014-09-24 00:56:46] [error] Failed to start Java
[2014-09-24 00:56:46] [error] ServiceStart returned 4
[2014-09-24 00:56:46] [info]  Run service finished.
[2014-09-24 00:56:46] [info]  Commons Daemon procrun finished

Referring to the correct documentation-  (Configure Apache Tomcat server to run as a Windows service)
https://www-01.ibm.com/support/knowledgecenter/SSYMRC_4.0.6/com.ibm.jazz.install.doc/topics/roadmap_form.html?cp=SSYMRC_4.0.6&lang=en

Option being set on Java are as below

Java Virtual Machine
E:\PROGRA~1\IBM\JazzTeamServer\server\jre\bin\j9vm\jvm.dll

Java Class Path
E:\PROGRA~1\IBM\JazzTeamServer\server\tomcat\bin\bootstrap.jar;E:\PROGRA~1\IBM\JazzTeamServer\server\tomcat\bin\tomcat-juli.jar;E:\PROGRA~1\IBM\JazzTeamServer\server\tomcat\bin\tomcat-juli.jar
Java Options
-Dcatalina.base=E:\PROGRA~1\IBM\JazzTeamServer\server\tomcat
-Dcatalina.home=E:\PROGRA~1\IBM\JazzTeamServer\server\tomcat
-Djava.endorsed.dirs=E:\PROGRA~1\IBM\JazzTeamServer\server\tomcat\endorsed
-Djava.io.tmpdir=E:\PROGRA~1\IBM\JazzTeamServer\server\tomcat\temp
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=E:\PROGRA~1\IBM\JazzTeamServer\server\tomcat\conf\logging.properties
-DJAZZ_HOME=file:///E:/PROGRA~1/IBM/JazzTeamServer/server/conf
-Djava.awt.headless=true
-Dorg.eclipse.emf.ecore.plugin.EcorePlugin.doNotLoadResourcesPlugin=true
-Dcom.ibm.team.repository.tempDir=E:/PROGRA~1/IBM/JazzTeamServer/server\tomcat\temp
-Djazz.connector.sslProtocol=SSL_TLS
-Djazz.connector.algorithm=IbmX509
-Dlog4j.configuration=file:///E:/PROGRA~1/IBM/JazzTeamServer/server/conf/startup_log4j.properties
-Xgcpolicy:gencon
-Xcompressedrefs
-Xgc:preferredHeapBase=0x100000000
-XX:MaxDirectMemorySize=1G
-Xmx4G
-Xms4G
-Xmn512M
-DSQLSERVER_JDBC_DRIVER_FILE=E:\Program Files\IBM\JazzTeamServer\server\sqlserver\sqljdbc4.jar

Not sure what  has gone wrong here.


Comments
1
Donald Nong commented Sep 24 '14, 1:42 a.m.

It seems that you don't have enough physical memory to support the requested heap size. Try to lower the heap size (-Xmx and -Xms) first to confirm.


permanent link
anoop mc (74811200221) | answered Sep 29 '14, 2:11 a.m.
 Hi,
After reducing the -Xmx and -Xms value to 2G from 4G. After restarting the server when verified the Apache Tomcat Service start running.

Thanks for the suggestion.

permanent link
Thomas Karlkvist (1113) | answered Feb 14 '16, 9:55 a.m.
edited Feb 14 '16, 9:58 a.m.
Glad you found a solution :)
I am not as lucky... :(

I am preparing for a customer setup with CLM v6.0.1 and tomcat as service, and I am running into trouble when it comes to the installation of the service.
Having ensured all settings are done as per documentation, I get an error during installation due to not having set JRE_HOME not JAVA_HOME. Using the tomcat7w.exe for configuration, I have defined the JVM explicitly as IBM JRE: 
C:\Program Files\IBM\JazzTeamServer\server\jre\bin\j9vm\jvm.dll

Problem is there is no mentioning of JAVA or JRE installation in the configuration process. But it is clearly lacking...?

PS C:\Program Files\IBM\JazzTeamServer\server\tomcat\bin> ./service.bat install tomcat7
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
Service will try to guess them from the registry.
Installing the service 'tomcat7' ...
Using CATALINA_HOME:    "C:\Program Files\IBM\JazzTeamServer\server\tomcat"
Using CATALINA_BASE:    "C:\Program Files\IBM\JazzTeamServer\server\tomcat"
Using JAVA_HOME:        ""
Using JRE_HOME:         ""
Warning: Neither 'server' nor 'client' jvm.dll was found at JRE_HOME.
Using JVM:              "auto"
Failed installing 'tomcat7' service

If I try to set JRE_HOME explicity to .../jre I get an error on JAVA_HOME which must point to a JDK (and none is installed, to be sure. Should it really be needed to have independent JAVA installed?

Comments
Donald Nong commented Feb 15 '16, 1:41 a.m.

You don't need to specify JAVA_HOME or JRE_HOME for this task, as you will specify the JVM after the service is installed. It's not related to the failure of installing the service, I believe. Make sure you run the command in an elevated command prompt. If you are using Windows Server 2012, you may even have encountered something new.

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.