Re: Service on Windows Server 2003

2007-10-26 Thread Dan Armbrust
Finally - I understand most of what is wrong!  I finally got access to
the system again, and after pulling off the debug log from the service
launcher, things became clear.

It turns out that on this system, the command that was actually being
run to register the service was:

%TOMCAT_HOME%\bin\tomcat5.exe //IS//Tomcat5 --StartClass
org.apache.catalina.startup.Bootstrap --StopClass
org.apache.catalina.startup.Bootstrap --StartParams start --StopParams
stop --Startup=auto --StartMode jvm --StopMode jvm --JvmOptions
-Dcatalina.base=%CATALINA_BASE%;-Dcatalina.home=%CATALINA_HOME%;-Djava.rmi.server.hostname=%COMPUTERNAME%;-Djava.endorsed.dirs=%CATALINA_HOME%\common\endorsed;-Djava.io.tmpdir=%CATALINA_BASE%\temp;
-XX:+UseConcMarkSweepGC;
-XX:+UseParNewGC;-Djava.net.preferIPv4Stack=true --JvmSs 250 --JvmMs
512 --JvmMx 512


Most notably, there was a space in front of the two -XX parameters here:

-Djava.io.tmpdir=%CATALINA_BASE%\temp; -XX:+UseConcMarkSweepGC;
-XX:+UseParNewGC;

Those spaces were causing the tomcat launch to fail - but this is the
really strange part I still don't quite understand - it only fails
Windows Server 2003.

On Windows XP, the register service command appears to strip out those
extra spaces - they aren't there when I look at the result with
tomcat5w.exe.  But, on Windows Server 2003, those spaces get put in
verbatim.

Why would this work on XP, and fail on server 2003?

Thanks,

Dan

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Service on Windows Server 2003

2007-10-25 Thread Dan Armbrust
I am using this version of java:

C:\NetProvision\jre\binjava -version
java version 1.5.0_07
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
Java HotSpot(TM) Client VM (build 1.5.0_07-b03, mixed mode)

The jvm.dll version that I am using reports
File version:  5.0.70.3
Full version:  1.5.0_07-b03
Description:  Java HotSpot(TM) Server VM


The way I register the service is with the following script:

setlocal
set TOMCAT_HOME=%1\tomcat
set CATALINA_HOME=%TOMCAT_HOME%
set CATALINA_BASE=%CATALINA_HOME%
set JAVA_HOME=%1\jre
set SERVICE_NAME=Tomcat5
set PR_DISPLAYNAME=Apache Tomcat
set PR_DESCRIPTION=Apache Tomcat Server
set PR_LOGPATH=%CATALINA_HOME%\logs
set PR_CLASSPATH=%CATALINA_HOME%\bin\bootstrap.jar
set PR_JVM=%JAVA_HOME%\bin\server\jvm.dll
set PR_STDOUTPUT=auto
set PR_STDERROR=auto

cd %TOMCAT_HOME%\bin
%TOMCAT_HOME%\bin\tomcat5.exe //IS//Tomcat5 --StartClass
org.apache.catalina.startup.Bootstrap --StopClass
org.apache.catalina.startup.Bootstrap --StartParams start --StopParams
stop --Startup=auto --StartMode jvm --StopMode jvm --JvmOptions
-Dcatalina.base=%CATALINA_BASE%;-Dcatalina.home=%CATALINA_HOME%;-Djava.rmi.server.hostname=%COMPUTERNAME%;-Djava.endorsed.dirs=%CATALINA_HOME%\common\endorsed;-Djava.io.tmpdir=%CATALINA_BASE%\temp;-Djava.net.preferIPv4Stack=true
--JvmSs 250 --JvmMs 512 --JvmMx 512


The version of Tomcat is (I know, its old, can't help it right now):
C:\NetProvision\tomcat\binversion.bat
Using CATALINA_BASE:   C:\NetProvision\tomcat
Using CATALINA_HOME:   C:\NetProvision\tomcat
Using CATALINA_TMPDIR: C:\NetProvision\tomcat\temp
Using JAVA_HOME:   C:\NetProvision\jre\
Server version: Apache Tomcat/5.5.9
Server built:   Mar 26 2005 02:21:04
Server number:  5.5.9.0
OS Name:Windows 2003
OS Version: 5.2
Architecture:   x86
JVM Version:1.5.0_07-b03
JVM Vendor: Sun Microsystems Inc.


I still can't recreate the problem locally - I'm hoping to get access
to the problematic system again later today, and I'll try to capture
some more detailed error logs.

I don't think that LD_LIBRARY_PATH is set - but I'll verify that on
the problem machine.

Likewise, none of my test machines have this key:
HKLM\System\CurrentControlSet\Control\SessionManager\SafeDllSearchMode
- but I'll check that on the problem machine as well when I get a
chance.

Thanks for any advice...

Dan

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Service on Windows Server 2003

2007-10-25 Thread Dan Armbrust
jvm.cfg contains the following:

-client KNOWN
-server KNOWN
-hotspot ALIASED_TO -client
-classic WARN
-native ERROR
-green ERROR

I don't think that there is a JAVA_OPTS variable set, but I will
verify that on the problem machine.

Thanks,

Dan



On 10/26/00, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Dan-

 do you have any alternative JVMs that are supported such as this entry in
 environment var JAVA_OPTS
 -XXaltjvm=jvm_dir

 Also --
 which types are supported in %JRE_HOME%/lib/i386/jvm.cfg (and more
 importantly which order)
 server=
 client=

 Thanks
 M--

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Service on Windows Server 2003

2007-10-24 Thread Gabe Wong
if using jdk6, make sure msvcr71.dll is in the path of jvm.dll. The 
easiest thing to do is to copy msvcr71.dll to the jre directory from the 
jdk directory like so:

copy %JDK_HOME%\bin\msvcr71.dll %JDK_HOME%\jre\bin\server\
Dan Armbrust wrote:

I have a difficult but severe problem with the tomcat service launcher
on windows server 2003.

Our application installs itself, tomcat, and a jvm, and then runs a
bat file which registers the tomcat server, using our provided jvm.

I _know_ this code works fine almost everywhere - it has been in use
for years, on dozens of systems.

However, we have a new customer, a 1/2 a world away, who has installed
our application on a Windows Server 2003 box with 4 GB of ram that is
using a Spanish Locale.  The server is brand new - so its an almost
perfectly clean install on windows.

After we register the tomcat service - the service refuses to start
tomcat.  There are no useful error messages - just something along the
lines of the service failed to start.  I'm not sure exactly, because
it's in Spanish.

It looks rather similar to this bug:
http://issues.apache.org/bugzilla/show_bug.cgi?id=41538
which if you ask me, has been closed completely prematurely by someone
who didn't understand the real problem.

When I run the tomcat5w.exe command - all of the parameters are set
correctly.  I cannot find any reason why this service refuses to start
on this particular configuration, yet - it won't run.  And it also
happens on another one of their machines (which is identical).

I also cannot reproduce the problem locally on my test systems - so I
still haven't been able to pinpoint what is different about their
configuration that is triggering this.

Suggestions?

I have very limited ability to do debugging on the system that is
showing the problem.

Thanks,

Dan

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  



--
Regards

Gabe Wong
Private JVM JAVA Hosting Automation
http://www.ngasi.com


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]