Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2006

Tip: Looking for answers? Try searching our database.

Apache Tomcat startup issue in Windows

Thread view: 
Darren.Kukulka@connaught.plc.uk - 26 Apr 2006 15:07 GMT
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
Roland de Ruiter - 26 Apr 2006 17:29 GMT
> Hi All,
>
[quoted text clipped - 4 lines]
> 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.
Signature

Regards,

Roland

Darren.Kukulka@connaught.plc.uk - 27 Apr 2006 09:44 GMT
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 -XX:PermSize=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.ClassLoaderLogManager
-Djava.util.logging.config.file=F:\tomcat5\conf\logging.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.
Darren.Kukulka@connaught.plc.uk - 27 Apr 2006 10:41 GMT
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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.