Re: Someone successfully Installed Tomcat as Windows Service with StartMode=java or StartMode=exe?

2006-02-25 Thread Sebastian Himberger

Hi,

my goal was to run Tomcat under an account without the LogonAsService 
privilege. Anyway im running it under another local system account too 
for now. I just wanted to know if the behaviour i experienced is related 
to my environment or to a bug.


but thanks very much for your response :)

have a nice weekend!

best regards
Sebastian

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Someone successfully Installed Tomcat as Windows Service with StartMode=java or StartMode=exe?

2006-02-24 Thread Sebastian Himberger

Hi Mladen,

thanks very much for the response! I had the last week much work to do 
but todady i took some time to test out the solution on my local Windows 
XP SP1 box. I'm sorry to say that i didn't got it working. Here are the 
specs:


Windows XP SP1
JDK 1.5
Tomcat 5.5.15

I switched the mode to Java using the Tomcat-GUI.
I've used the following arguments in the Startup-Arguments Tab:

-classpath C:\Programme\Tomcat5.5\bin\bootstrap.jar
-Dcatalina.home=C:\Programme\Tomcat5.5
-Dcatalina.base=C:\Programme\Tomcat5.5
-Djava.endorsed.dirs=C:\Programme\Tomcat5.5\common\endorsed
-Djava.io.tmpdir=C:\Programme\Tomcat5.5\temp
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=C:\Programme\Tomcat5.5\conf\logging.properties

After starting the service i get the following windows exception from 
Service Runner:


szAppName : tomcat5.exe szAppVer : 2.0.0.0 szModName : 
ntdll.dll
szModVer : 5.1.2600.1106 offset : 234c

I also tried setting -LogLevel=debug but this also reveals no more 
informations. The service log says:


[2006-02-24 20:08:10] [info] Debuging Service...
[2006-02-24 20:08:10] [info] Starting service...
[2006-02-24 20:08:20] [info] Running Service...
[2006-02-24 20:08:20] [info] Run service finished.
[2006-02-24 20:08:20] [info] Procrun finished.

Do you have any more ideas how i can track down the problem? Shall i 
write to the Commons-Daemon Mailing list?

I've additionally tried setting the JavaHome in the arguments field.
I took a short look at the commons-daemon sourcecode but since i'm no 
C-expert (escpecially on windows) it would take me much time to get into 
this topic.


If there's a way i can provide more information to solve this issue 
please let me know.


But anyway, thanks very much for your answer.

best regards
Sebastian

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Someone successfully Installed Tomcat as Windows Service with StartMode=java or StartMode=exe?

2006-02-24 Thread Caldarale, Charles R
 From: Sebastian Himberger [mailto:[EMAIL PROTECTED] 
 Subject: Re: Someone successfully Installed Tomcat as Windows 
 Service with StartMode=java or StartMode=exe?
 
 I switched the mode to Java using the Tomcat-GUI.

I can only get the service to run if the startup and shutdown modes are
both jvm, not Java.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Someone successfully Installed Tomcat as Windows Service with StartMode=java or StartMode=exe?

2006-02-24 Thread Sebastian Himberger

Hi,


I can only get the service to run if the startup and shutdown modes are
both jvm, not Java.

 - Chuck

that's working for me too, but according to the docs running the service under 
a different user required the use of java. At least: 
http://jakarta.apache.org/commons/daemon/procrun.html says it so.


best regards
Sebastian



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Someone successfully Installed Tomcat as Windows Service with StartMode=java or StartMode=exe?

2006-02-13 Thread David Kerber
I run tomcat 5.5.12 as a service on Win2K (not 2k3), but don't know what 
mode it is in.  How do I find that?




Sebastian Himberger wrote:


Hi,

a week ago i posted a question regarding my problem installing Tomcat 
as a windows service. Before i'll try again to get it work it would be 
nice if anybody could just give me a sign if he or she has installed 
Tomcat  (5.5) successfully using StartMode=java or StartMode=exe on as 
a Windows service?


Thanks very much in advance

best regards
Sebastian

Sebastian Himberger schrieb:


Hi list,

i'm trying to install Tomcat 5.5.12 as a Windows Service on Windows 
Server 2003 Web Edition and run it under another user as described 
here: 
http://tomcat.apache.org/tomcat-5.5-doc/windows-service-howto.html 
and http://jakarta.apache.org/commons/daemon/procrun.html . I tried 
setting StartMode to exe and to java but none of those seem to 
work. Installing as a service / using StartMode jvm works fine. The 
Service run's under the local system account


I already searched google and the mailing list archives but found no 
solution. I would be very glad if anyone can help me finding a 
solution that works or point me in the right direction.


Thanks very very much in advance

Sebastian Himberger

CATALINA_HOME: X:\...\Tomcat
CATALINA_BASE: X:\...\Tomcat
JAVA_HOME: X:\...\Java\JDK-1.5.0-1

Here's my install script:
--- 


@echo off

echo CATALINA_HOME: %CATALINA_HOME%
echo CATALINA_BASE: %CATALINA_BASE%
echo JAVA_HOME: %JAVA_HOME%
pause
set BASEDIR=%CATALINA_HOME%
call %CATALINA_HOME%\bin\setclasspath.bat

set args=%args% --Description=TomcatTest
set args=%args% --DisplayName=TomcatTest

set args=%args% --Startup=auto

set args=%args% --LogPath=%CATALINA_BASE%\logs
set args=%args% --LogLevel=DEBUG
set args=%args% --StdError=auto
set args=%args% --StdOutput=auto

set args=%args% 
--Classpath=%CLASSPATH%;%CATALINA_HOME%\bin\bootstrap.jar


set args=%args% --JavaHome=%JAVA_HOME%
set args=%args% --Jvm=D:\...\Java\JDK-1.5.0-1\jre\bin\server\jvm.dll
set args=%args% 
--JvmOptions=-Dcatalina.base=%CATALINA_BASE%;-Dcatalina.home=%CATALINA_HOME%;-Djava.endorsed.dirs=%CATALINA_HOME%\common\endorsed 



set args=%args% --StartMode=jvm
set args=%args% --StartClass=org.apache.catalina.startup.Bootstrap
set args=%args% --StartParams=start
rem set args=%args% --StartImage=%CATALINA_HOME%\bin\tomcat5.exe
rem set args=%args% --StartPath=%CATALINA_HOME%\bin

set args=%args% --StopMode=jvm
set args=%args% --StopClass=org.apache.catalina.startup.Bootstrap
set args=%args% --StopParams=stop
rem set args=%args% --StopImage=%CATALINA_HOME%\bin\tomcat5.exe
rem set args=%args% --StopPath=%CATALINA_HOME%\bin

tomcat5.exe //IS//TomcatTest %args%
set args=
set BASEDIR=
--- 



I get the following errors:

-- StartMode = exe 

If it set no executable:
---
[2006-02-06 17:20:13] [1253 prunsrv.c] [debug] Procrun log initialized
[2006-02-06 17:20:13] [info] Debuging Service...
[2006-02-06 17:20:13] [1075 prunsrv.c] [debug] Inside ServiceMain...
[2006-02-06 17:20:13] [info] Starting service...
[2006-02-06 17:20:13] [960  prunsrv.c] [error] Failed setting process 
executable

[2006-02-06 17:20:13] [1179 prunsrv.c] [error] ServiceStart returned 2
[2006-02-06 17:20:13] [info] Debug service finished.
[2006-02-06 17:20:13] [info] Procrun finished.
---

If i set an executable with:

---
set args=%args% --StartImage=%CATALINA_HOME%\bin\tomcat5.exe
set args=%args% --StartPath=%CATALINA_HOME%\bin
set args=%args% --StopImage=%CATALINA_HOME%\bin\tomcat5.exe
set args=%args% --StopPath=%CATALINA_HOME%\bin
---

It returns:

stderr:
---
[2006-02-06 17:22:37] [402  prunsrv.c] [error]
Das System kann die angegebene Datei nicht finden. (Cannot find file)
[2006-02-06 17:22:37] [1246 prunsrv.c] [error]
Load configuration failed
---

service.log:
---
[2006-02-06 17:22:34] [1253 prunsrv.c] [debug] Procrun log initialized
[2006-02-06 17:22:34] [513  prunsrv.c] [debug] Installing service...
[2006-02-06 17:22:34] [info] Service TomcatTest name TomcatTest
[2006-02-06 17:22:34] [555  prunsrv.c] [debug] Setting service 
description TomcatTest

[2006-02-06 17:22:34] [info] Service TomcatTest installed
[2006-02-06 17:22:34] [info] Procrun finished.
[2006-02-06 17:22:37] [1253 prunsrv.c] [debug] Procrun log initialized
[2006-02-06 17:22:37] [info] Debuging Service...
[2006-02-06 17:22:37] [1075 prunsrv.c] [debug] Inside ServiceMain...
[2006-02-06 17:22:37] [info] Starting service...
[2006-02-06 17:22:37] [info] Service started in 10 ms.
[2006-02-06 17:22:37] [1169 prunsrv.c] [debug] Waitning worker to 
finish...

[2006-02-06 17:22:37] [1174 prunsrv.c] 

Re: Someone successfully Installed Tomcat as Windows Service with StartMode=java or StartMode=exe?

2006-02-13 Thread Mladen Turk

Sebastian Himberger wrote:

Hi,

a week ago i posted a question regarding my problem installing Tomcat as 
a windows service. Before i'll try again to get it work it would be nice 
if anybody could just give me a sign if he or she has installed Tomcat  
(5.5) successfully using StartMode=java or StartMode=exe on as a Windows 
service?




Since I wrote that peace of software I suppose I should know :)

Anyhow there is only 'java' mode, not exe.
For java mode you will need to edit the 'Argumets'
(in the Startup tab) and add everything from
JavaOptions, together with -classpath, so:

-classpath C:\...\tomcat\bin\bootstrap.jar
-Dcatalina.base=C:\...\tomcat
-Dcatalina.home=C:\...\tomcat
-Djava.endorsed.dirs=C:\...\tomcat\common\endorsed
-Djava.io.tmpdir=C:\..\tomcat\temp
start

I'll probably fix the procrun, so that it uses
JavaOptions and Classpath as Arguments for 'Java' mode.

Hope it helps.

Regards,
Mladen.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]