tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: Procrun problems with Tomcat 6 on Windows 64-bit
Date Fri, 13 Aug 2010 19:01:46 GMT

We've been using tomcatw largely because it has big friendly buttons (that no one can mistake)
for the start and stop.  It's worth a try to use the service bat instead, though I would think
the results should be about the same.  I'll test and post back next week.


-----Original Message-----
From: Andrew Bruno [] 
Sent: Wednesday, August 11, 2010 6:04 PM
To: Tomcat Users List
Subject: Re: Procrun problems with Tomcat 6 on Windows 64-bit

Hi Kevin,

Personally I do not use the "w.exe" gui.  I manage all tomcats via
Services, and update the service.bat file if any registry/config
settings etc need to be changed, so that we can manage changes/roll
backs via SVN.  This also makes it simpler since we have many TCs on
same OS.

So, I recommend you download the .ZIP version, and install the service
using services.bat

I also rename the tomcat6 to whatever service name I need, so that I
can install multiple tomcats on the same server OS.

Via the services.bat you can also change the logging path, jvm, set
threads size, memory, etc.

e.g. of our services.bat if this helps you out.

@echo off

if "%OS%" == "Windows_NT" setlocal
rem ---------------------------------------------------------------------------
rem $Id: service.bat 908749 2010-02-10 23:26:42Z markt $
rem ---------------------------------------------------------------------------

rem Guess CATALINA_HOME if not defined
set "CURRENT_DIR=%cd%"
if not "%CATALINA_HOME%" == "" goto gotHome
set "CATALINA_HOME=%cd%"
if exist "%CATALINA_HOME%\bin\Secure02Web64.exe" goto okHome
rem CD to the upper dir
cd ..
set "CATALINA_HOME=%cd%"
if exist "%CATALINA_HOME%\bin\Secure02Web64.exe" goto okHome
echo The tomcat.exe was not found...
echo The CATALINA_HOME environment variable is not defined correctly.
echo This environment variable is needed to run this program
goto end
rem Make sure prerequisite environment variables are set, we added
specific JAVA_HOME64 path
rem typically, JAVA_HOME64=C:\Program Files\Java\jdk1.6.0_17  - NOTE
WE USE the JDK so we use server mode
if not "%JAVA_HOME64%" == "" goto okHome
echo The JAVA_HOME64 environment variable is not defined
echo This environment variable is needed to run this program
goto end
if not "%CATALINA_BASE%" == "" goto gotBase

set "EXECUTABLE=%CATALINA_HOME%\bin\Secure02Web64.exe"

rem Set default Service name
set SERVICE_NAME=Secure02Web64
set PR_DISPLAYNAME=Secure02Web64

if "%1" == "" goto displayUsage
if "%2" == "" goto setServiceName
set PR_DISPLAYNAME=Secure02Web64 %2
if %1 == install goto doInstall
if %1 == remove goto doRemove
if %1 == uninstall goto doRemove
echo Unknown parameter "%1"
echo Usage: service.bat install/remove [service_name]
goto end

rem Remove the service
echo The service '%SERVICE_NAME%' has been removed
goto end

rem Install the service
echo Installing the service '%SERVICE_NAME%' ...
echo Using JAVA_HOME64:        "%JAVA_HOME64%"

rem Use the environment variables as an example
rem Each command line option is prefixed with PR_

set PR_DESCRIPTION=Secure Web 02 TC 6.0.28
set "PR_CLASSPATH=%CATALINA_BASE%\bin\tomcat-juli.jar;%CATALINA_HOME%\bin\bootstrap.jar"
rem Set the server jvm from JAVA_HOME64
set "PR_JVM=%JAVA_HOME64%\jre\bin\server\jvm.dll"
if exist "%PR_JVM%" goto foundJvm
rem Set the client jvm from JAVA_HOME64
set "PR_JVM=%JAVA_HOME64%\jre\bin\client\jvm.dll"
if exist "%PR_JVM%" goto foundJvm
set PR_JVM=auto
echo Using JVM:              "%PR_JVM%"
org.apache.catalina.startup.Bootstrap --StopClass
org.apache.catalina.startup.Bootstrap --StartParams start --StopParams
if not errorlevel 1 goto installed
echo Failed installing '%SERVICE_NAME%' service
goto end
rem Clear the environment variables. They are not needed any more.
set PR_JVM=
rem Set extra parameters
--StartMode jvm --StopMode jvm
rem More extra parameters
set PR_STDERROR=auto
--JvmMs 512 --JvmMx 3072 --JvmSs 192
echo The service '%SERVICE_NAME%' has been installed.



On Tue, Aug 10, 2010 at 3:21 AM, Stewart, Kevin L.
<> wrote:
> Hi, I've been looking on the web and the Tomcat wiki and haven't found any solution to
this problem.
> I have a 64-bit Windows 2008 server with Java 1.6_20 (64-bit) and 64-bit tomcat 6.0.26
(6.0.29 also) installed as a service.  I also have a Liferay portal that I need to install.
 But I am having problems with the startup.  (BTW, I use the tomcat6w.exe gui mostly.)  If
I use startmode=jvm, the Spring framework in Liferay loops until I get a StackOverflowException,
no matter the stack size.  However, if I start with startmode=java the Spring framework initializes
correctly, however some logs appear in the java directory instead of the Tomcat one even though
the user.dir is set to Tomcat.  Further, when startmode=java the stop service on tomcat6w.exe
returns successful after a long wait, but the Tomcat server is still actually running.  I
have to manually kill the Java process that Tomcat is running in.  My choices seem to be
having a non-functional Tomcat or an unstable one.
> I wrote a cheap JSP that dumps out all the session, request and system properties.  I've
ruled all the differences out that I could (server lib path, classpath, etc).  The only one
I couldn't was:
> Property: ""  value = "SUN_STANDARD"
> My first question is why does the startmode make such a difference in the behavior of
Tomcat?  Secondly, how can I either stabilize startmode=java or better yet get startmode=jvm
> Kevin L. Stewart
> Sr. Software Lead, GOES V3
> Constellation Software Engineering
> NASA GSFC, Code 417

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message