You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2017/07/05 06:09:45 UTC

[Bug 61250] Disabling shutdown port exit tomcat with System.exit(1) causes issue

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

--- Comment #1 from Veeru <ve...@yahoo.com> ---
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 invoking
system.exit(1) rather system.exit(0). 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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org