You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dan Ruthers <da...@lycos.com> on 2003/08/18 07:05:10 UTC

Tomcat NT service hangs when using -config

Hi,
I am using Tomcat 4.1.27 and have encountered the following problem.
In my configuration, server.xml is located outside the common CATALINA_BASE directory.
(Test.0)If I start the server with the following command:

C:\j2re1.4.1_01\bin\java.exe" -jar -Duser.dir="C:\Program Files\Tomcat" "C:\Program Files\Tomcat\bin\bootstrap.jar" -config "C:\data\server.xml" start

everything works fine and I can access the webapplications regularly.

(Test.1)If I try to start it as a service, where the following values are in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Apache Tomcat 4.1\Parameters:

Start Class  org.apache.catalina.startup.BootstrapService
Start Method main
Start Param Count 3
Start Param Number 0        -config
Start Param Number 1        C:\data\server.xml
Start Param Number 2        start

(There are others, but they are the standard)

then when I start the service tomcat start, no errors are reported in stdout.log and stderr.log, but the webapplication is not started. When I try to connect to the server, the connection hangs (i.e. is established, but the browser hangs waiting for the server to send back some data).

(Test.2)If I don't set a custom location for server.xml:
Start Param Count 1
Start Param Number 0        start

and leave server.xml in the conf directory, everything works fine again.

(Test.3)But if I test with server.xml in conf directory, and the following parameters:
Start Param Count 2
Start Param Number 0        -debug
Start Param Number 1        start

then the server hangs exaclty like in the first case (only more info is written to stdout.log). This leads me thinking that it has to do with some parameter count thing, but I recompiled CatalinaService.java with some logging info and it appears that it always get passed the correct number of arguments. And indeed, the -debug is picked up correctly in Test.3 because the logging increases. And if, in Test.1, I specify a non-existing location for server.xml, I get an error in the logs.

Finally, I also tried to apply the suggested synchronization patch that solved a problem with the same symptoms (http://issues.apache.org/bugzilla/show_bug.cgi?id=15693), but it made no difference. And it wouldn't explain why if I use only one parameter (start) it works fine...

Note that the service, configured as I described in Test.1, was working fine with Tomcat 4.0.4

Ah, I tested all of this on my 2 PCs (XP and w2000), with the same results.

I pretty much exhausted my research... has anyone got an idea?

Thanks in advance
Dan







____________________________________________________________
Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
http://login.mail.lycos.com/r/referral?aid=27005

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org