https://bz.apache.org/bugzilla/show_bug.cgi?id=61250

            Bug ID: 61250
           Summary: Disabling shutdown port exit tomcat with
                    System.exit(1) causes issue
           Product: Tomcat 8
           Version: 8.5.8
          Hardware: PC
                OS: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: veeru.mallavar...@yahoo.com
  Target Milestone: ----

Created attachment 35096
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35096&action=edit
Error While stopping service from windows service due to the system.exit(1)

Hi All,

I am running tomcat as windows service and disabled the shutdown port in
server.xml. 

So when I am stopping the service, tomcat service is killed and the process
also killed . However since tomcat is exited with System.exit(1) in
catalina.java --> stopServer(String[] arguments) when shutdown port is
disabled. I am seeing an alert message in windows services window stating "
Service could not able to stop and Error 1 : function error ". I have attached
the screen shot  here.

To fix this error , I have replaced system.exit(1) with system.exit(0) and now
I am not seeing that alert.

Can you please tell me , is there any  specific reason we are invoke
system.exit(1) rather system.exit(1). As we are forcibly killing JVM , I think
we can call system.exit(0) so that it will be successful operation for the
windows service. Otherwise it is treating it as exception and leading to issue.

-- 
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