DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27127>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27127 Shutdown doesn't work with custom server port + non-default config file; Summary: Shutdown doesn't work with custom server port + non- default config file; Product: Tomcat 5 Version: 5.0.18 Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Normal Priority: Other Component: Unknown AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] If I change the server port in a custom config file, stopping the server using the shutdown batch file does not work. Steps: 1. Create a file (say C:\myserver.xml) with the following contents: ------------ <Server port="8081" shutdown="SHUTDOWN" debug="4"> <Service name="Catalina"> <Connector debug="4" port="8080"/> <Engine name="Catalina" defaultHost="localhost" debug="0"> <Host name="localhost" debug="4" appBase="webapps" unpackWARs="true" autoDeploy="true"> </Host> </Engine> </Service> </Server> ------------ 2. execute <tomcathome>\bin\startup -config C:\myserver.xml 3. execute <tomcathome>\bin\shutdown -config C:\myserver.xml 4. This causes java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158) at java.net.Socket.connect(Socket.java:452) at java.net.Socket.connect(Socket.java:402) at java.net.Socket.<init>(Socket.java:309) at java.net.Socket.<init>(Socket.java:124) at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:453) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:322) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:400) 5. In the config file myserver.xml, change 8081 to the default value 8005. Now steps 2 and 3 work as expected. The problem appears to be that Bootstrap.main() ignores the -config argument if the command is "stop". Thus the server is listening on port 8081, but shutdown is using port 8005 as specified by the default server.xml. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]