Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Apache Tomcat startup issue in Windows

Reply
Thread Tools

Apache Tomcat startup issue in Windows

 
 
Darren.Kukulka@connaught.plc.uk
Guest
Posts: n/a
 
      04-26-2006
Hi All,

Running Apache-Tomcat 5.5.15 on a Win2K3 server using the startup.bat
and shutdown.bat scripts supplied with the ZIP distribution of Tomcat.

We are using this because it seems many of the JAVA_OPTS parameters
that can be set in the Java tab of the service control mechanism for
Tomcat are ignored.

We know that the parameters are definitely used if passed via a command
line call to startup Tomcat. This is all well and good except that
logging off the session that started the batch script also kills the
Tomcat server!

Can anybody suggest a clever way of having this script run in
background or staying alive another way. We have looked at the option
of adding the script to Windows as a service, however even Microsoft
suggest this is risky as it involves registry edits and could corrupt
the O/S!

Cheers,
Darren

 
Reply With Quote
 
 
 
 
Roland de Ruiter
Guest
Posts: n/a
 
      04-26-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> Hi All,
>
> Running Apache-Tomcat 5.5.15 on a Win2K3 server using the startup.bat
> and shutdown.bat scripts supplied with the ZIP distribution of Tomcat.
>
> We are using this because it seems many of the JAVA_OPTS parameters
> that can be set in the Java tab of the service control mechanism for
> Tomcat are ignored.
>

[...]
> Cheers,
> Darren
>

Are you sure that the Java parameters are correctly entered in the Java
options field? Every parameter should appear on a new line. I.e. instead
of:
-Xmx128m -ea -Dcatalina.home=C:\Data\bin\Apache\Tomcat\5.5.12 ...
it should be like:
-Xmx128m
-ea
-Dcatalina.home=C:\Data\bin\Apache\Tomcat\5.5.12
...

Don't know about the ZIP distro's, but the exe-installer has installed
Tomcat as a Windows service, and included a service manager tray icon
which allows you to enter the Java options.
--
Regards,

Roland
 
Reply With Quote
 
 
 
 
Darren.Kukulka@connaught.plc.uk
Guest
Posts: n/a
 
      04-27-2006
Thanks for the reply Roland.

We have tried entering the specific parameters into the service manager
Java Opts section for Tomcat but it refuses to start if we do so. The
equivalent command line startup is as follows;

"C:\Program Files\Java\jre1.5.0_06\bin\java"
-server -Xms1332m -Xmx1332m -XX:NewSize=400m
-XX:MaxNewSize=400m -XXermSize=128m
-XX:MaxPermSize=128m -verbose:gc
-XX:+PrintGCTimeStamps -XX:+PrintGCDetails
-Djava.endorsed.dirs="f:\tomcat5\common\endorsed"
-classpath "F:\tomcat5\bin\bootstrap.jar"
-Dcatalina.base="f:\tomcat5"
-Dcatalina.home="F:\tomcat5"
-Djava.io.tmpdir="F:\tomcat5\temp"
-Djava.util.logging.manager=org.apache.juli.ClassLo aderLogManager
-Djava.util.logging.config.file=F:\tomcat5\conf\log ging.properties
-Duser.language=en
-Duser.country=GB -Dcom.sun.management.jmxremote
org.apache.catalina.startup.Bootstrap start

All of the -D options the service will accept. It will not accept any
of the others (the -server option can be implemented by changing the
JVM setting to C:\Program Files\Java\jre1.5.0_06\bin\server\jvm.dll

As far as I can see the only way to pass all these parameters is to use
the startup.bat. So now we have the problem of keeping Tomcat running
when it is started this way. As I mentioned before, if we can avoid
turning it into a service then we will.

Cheers,
Darren.

 
Reply With Quote
 
Darren.Kukulka@connaught.plc.uk
Guest
Posts: n/a
 
      04-27-2006
Roland,

Further to my last port...more testing has revealed interesting
behaviour!

If I use the JAVA_OPTS tab in the service manager for Tomcat and enter
each line one by one the service starts!

If I add the list of options from notepad all at one, even though they
appear as seperate lines once pasted in, Tomcat won't start! Very
strange!

Another interesting observation...if I pass in the ms and mx parameters
using the JAVA-OPTS entry decribed above in the service manager, the
Tomcat process appears to use the default 64MB instead of what I direct
it to use....hmmmm....any thoughts?

Cheers,
Darren.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Jakatra tomcat- Ant - Apache tomcat - Difference ? Oom Computer Support 1 10-08-2007 05:13 PM
Jakatra tomcat- Ant - Apache tomcat - Difference ? Oom Computer Support 0 10-08-2007 02:38 PM
tomcat-maven-plugin problem - mvn is looking for org.apache.maven.plugins:maven-tomcat-plugin Marcin Cenkier Java 1 04-12-2006 08:00 PM
Difference between Apache Tomcat and Jakrata Tomcat twins Java 1 11-25-2005 05:57 PM
Apache Tomcat 4.1.24: problem with Tomcat Administration link Christos Gravvanis Java 0 07-07-2004 05:21 PM



Advertisments