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

why is my tomcat console dying just after starting up?

it sometime happens that when you start the CLM server (running on tomcat) you see a command line console appearing and then dies before you have time to read what the problem is, How can I trouble shoot this?

3

0 votes

Comments

Hi,

 
As you said I also tried to run my server.startup.bat file from cmd but after this also window disappears immediately.
I also checked  "%EXECUTABLE%" start %CMD_LINE_ARGS% call in my server.startup.bat file but this call is not present in this file. And in my server.startup.bat this "%CATALINA_HOME%" call is already run.

So I ran server.startup.bat  -debug command in my cmd, it displayed the same message as above.

But how to solve this issue.

 Why do you keep posting answers on really old questions? Discuss on your question.

"So I ran server.startup.bat  -debug command in my cmd, it displayed the same message as above."

Does not provide any information at all. 

Try to find the call "%CATALINA_HOME%"\bin\startup.bat file (Tomcat/bin) and try to play with replacing 

call "%EXECUTABLE%" start %CMD_LINE_ARGS%


Accepted answer

Permanent link
the script used to start the CLM server, server.startup.bat will call a tomcat script startup.bat that will itself call catalina.bat.
you can start catalina.bat with different option, the default is set to start in startup.bat which will open the console in a new window.

the details of the options are given in catalina.bat:
echo   debug             Start Catalina in a debugger
echo   debug -security   Debug Catalina with a security manager
echo   jpda start        Start Catalina under JPDA debugger
echo   run               Start Catalina in the current window
echo   run -security     Start in the current window with security manager
echo   start             Start Catalina in a separate window
echo   start -security   Start in a separate window with security manager
echo   stop              Stop Catalina
echo   configtest        Run a basic syntax check on server.xml
echo   version           What version of tomcat are you running?


so edit startup.bat to use the "run" option and next time you start server.startup.bat in the server directory, tomcat will start in the same window.

change:
call "%EXECUTABLE%" start %CMD_LINE_ARGS%
to
call "%EXECUTABLE%" run %CMD_LINE_ARGS%


you would then be able to see error such as:
JVMJ9VM015W Initialization error for library j9gc24(5): Failed to allocate default memory space
Could not create theJava virtual machine
Ralph Schoon selected this answer as the correct answer

12 votes

Comments

In all the cases that I've seen with this symptom the problem is memory like the error message reports. To resolve the issue make sure the system meets the memory requirements.  But as a workaround to get the server running until memory is acquired, lower the -xmx value in server.startup.bat. The default value is 4000 M. 

While speaking of JVM, only a 64-bit JRE will allow that size for JVM parameters.  I think 32bit max is 2048.

Nifty trick. I usually just run server.startup from the command-line to see the error.

Actually, I take that back. I just ran into this problem and I see that even running server.startup on the command-line can end up in a window appearing and immediately disappearing. Thanks for the tip!


One other answer

Permanent link
The recommended action for startup problems is to run server.startup.bat in debug mode.
C:\IBM\JazzTeamServer\server>server.startup.bat -debug

This still does not show anything because the debug section of server.startup.bat is wrong.

Change the debug section of server.startup.bat from
if ""%1"" == ""-debug"" (
    call "%CATALINA_HOME%"\bin\catalina.bat jpda start
to
if ""%1"" == ""-debug"" (
    call "%CATALINA_HOME%"\bin\catalina.bat jpda run

Now you will see why your server does not start.
My server says:

C:\IBM\JazzTeamServer\server>server.startup.bat  -debug
Using CATALINA_BASE:   "C:\IBM\JazzTeamServer\server\tomcat"
Using CATALINA_HOME:   "C:\IBM\JazzTeamServer\server\tomcat"
Using CATALINA_TMPDIR: "C:\IBM\JazzTeamServer\server\tomcat\temp"
Using JRE_HOME:        "C:\IBM\JazzTeamServer\server\jre"
Using CLASSPATH:       "C:\IBM\JazzTeamServer\server\tomcat\bin\bootstrap.jar;C:
\IBM\JazzTeamServer\server\tomcat\bin\tomcat-juli.jar"
JVMJ9VM015W Initialization error for library j9gc24(5): Failed to allocate default memory space
Could not create the Java virtual machine.

1 vote

Comments

debug mode is not intended for debugging Tomcat. It's intended for debugging the application.

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
× 7,494

Question asked: Apr 11 '13, 7:09 a.m.

Question was seen: 58,452 times

Last updated: Dec 19 '23, 1:46 a.m.

Confirmation Cancel Confirm