https://issues.apache.org/bugzilla/show_bug.cgi?id=49195

           Summary: Using -1 as shutdown port with Windows service works,
                    but prints error message
           Product: Tomcat 6
           Version: 6.0.26
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: knst.koli...@gmail.com


1. Install Tomcat as a service on Windows
2. Specify <Server port="-1" in server.xml
3. Start the service, and then stop the service.
4. The following is printed in the catalina.2010-04-27.log:

27.04.2010 17:49:13 org.apache.catalina.startup.Catalina stopServer
SEVERE: No shutdown port configured. Shut down server through OS signal. Server
not shut down.

It is just a message. Tomcat stops regardless of it:
After printing the message Catalina#stopServer() performs System.exit(1) which
results in Tomcat shutdown.

I think that when service launcher stops Tomcat, Catalina#server is not null.
That can be used to differentiate the two use cases.

There could be improvements on how to stop Tomcat. E.g., to call
Catalina.stop(). If that is the case, it would be better to use wait(10000)
instead of sleep(10000) in StandardServer.await(), so that it could be woken by
a notifyAll() call, or use interrupt() call to wake it up (if we know the
thread). System.exit(0) would work regardless of all that.

I suppose that jsvc may show the same behaviour, but I have not tried.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to