Re: Problem with shutting down tomcat5.5.29
2012/4/5 Petr Hracek phrac...@gmail.com: Dear all, I now that I am using pretty old version of tomcat5, but I have a tricky problem. On the server is run apache2.2.21 and tomcat5 together. tomcat5 is used only as servlet container and not web server. Both are connected together over AJP1.3 interface. In configuration file of apache2 is mentioned: ProxyPass /appl1 ajp://localhost:8009/appl1 ProxyPassReverse /appl1 ajp://localhost:8009/appl1 During the stopping of tomcat5 I can see in log files: /var/log/tomcat5/base/catalina.out: 2012-04-05 11:56:17,492 [main] INFO org.apache.coyote.http11.Http11BaseProtocol - Pausing Coyote HTTP/1.1 on http-8080 2012-04-05 11:56:18,495 [main] INFO org.apache.catalina.core.StandardService - Stopping service Catalina 2012-04-05 11:56:18,520 [main] INFO org.apache.coyote.http11.Http11BaseProtocol - Stopping Coyote HTTP/1.1 on http-8080 2012-04-05 11:56:18,521 [main] INFO org.apache.catalina.core.AprLifecycleListener - Failed shutdown of Apache Portable Runtime Tomcat-Native shared library failed to shut down. I do not know why. Did it start? Do you use Apr versions of Tomcat connectors? (You will see that when Tomcat starts). If you no not need it you can comment away the AprLifecycleListener in server.xml. I do not remember whether there were some specific issues in 5.5.29 - you may look at the changelog. The message really does not matter much if you shut down Tomcat as a whole. /var/log/tomcat5/base/stop.log Using CATALINA_BASE: /srv/www/tomcat5/base/ Using CATALINA_HOME: /usr/share/tomcat5 Using CATALINA_TMPDIR: /srv/www/tomcat5/base//temp Using JRE_HOME: /usr/lib/jvm/java 2012-04-05 11:56:19,282 [main] ERROR org.apache.catalina.startup.Catalina - Catalina.stop: java.net.ConnectException: Connection refused Attempt to stop Tomcat that is already stopped (and thus do not listen on the shutdown port anymore). at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(Unknown Source) at java.net.PlainSocketImpl.connectToAddress(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.init(Unknown Source) at java.net.Socket.init(Unknown Source) at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:395) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:344) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:435) in server.xml file are used tags: Listener className=org.apache.catalina.core.AprLifecycleListener / Listener className=org.apache.catalina.mbeans.ServerLifecycleListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / Listener className=org.apache.catalina.storeconfig.StoreConfigLifecycleListener/ Connector port=8080 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 connectionTimeout=2 disableUploadTimeout=true / Connector port=8009 enableLookups=false redirectPort=8443 protocol=AJP/1.3 address=127.0.0.1 / Where I could have a problem? Any other problem besides those two messages that I commented? Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem with shutting down tomcat5.5.29
What I see in the start.log file is: 2012-04-05 15:28:04,557 [main] INFO org.apache.coyote.http11.Http11BaseProtocol - Initializing Coyote HTTP/1.1 on http-8080 2012-04-05 15:28:04,560 [main] INFO org.apache.catalina.startup.Catalina - Initialization processed in 1062 ms 2012-04-05 15:28:04,727 [main] INFO org.apache.catalina.core.StandardService - Starting service Catalina 2012-04-05 15:28:04,731 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet Engine: Apache Tomcat/5.5.27 2012-04-05 15:28:04,743 [main] INFO org.apache.catalina.core.StandardHost - XML validation disabled 2012-04-05 15:28:06,229 [main] INFO org.apache.catalina.loader.WebappClassLoader - validateJarFile(/opt/repgen/servlet/WEB-INF/lib/servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class 2012-04-05 15:28:06,312 [main] INFO org.apache.coyote.http11.Http11BaseProtocol - Starting Coyote HTTP/1.1 on http-8080 2012-04-05 15:28:06,423 [main] INFO org.apache.jk.common.ChannelSocket - JK: ajp13 listening on /127.0.0.1:8009 2012-04-05 15:28:06,425 [main] INFO org.apache.jk.server.JkMain - Jk running ID=0 time=0/15 config=null 2012-04-05 15:28:06,453 [main] INFO org.apache.catalina.storeconfig.StoreLoader - Find registry server-registry.xml at classpath resource 2012-04-05 15:28:06,514 [main] INFO org.apache.catalina.startup.Catalina - Server startup in 1954 ms Here is mention ajp13. It is not correct one, right? Is it possible that during the shutting down of tomcat5 stopping operation will take more then 2 minutes? When I am commented out Listener section then during the stopping tomcat5 Failed is not mentioned but in stop.log file Exception is still there. How to avoid that Exception message will not be there? best reagrds Petr Dne 5. dubna 2012 14:19 Konstantin Kolinko knst.koli...@gmail.com napsal(a): 2012/4/5 Petr Hracek phrac...@gmail.com: Dear all, I now that I am using pretty old version of tomcat5, but I have a tricky problem. On the server is run apache2.2.21 and tomcat5 together. tomcat5 is used only as servlet container and not web server. Both are connected together over AJP1.3 interface. In configuration file of apache2 is mentioned: ProxyPass /appl1 ajp://localhost:8009/appl1 ProxyPassReverse /appl1 ajp://localhost:8009/appl1 During the stopping of tomcat5 I can see in log files: /var/log/tomcat5/base/catalina.out: 2012-04-05 11:56:17,492 [main] INFO org.apache.coyote.http11.Http11BaseProtocol - Pausing Coyote HTTP/1.1 on http-8080 2012-04-05 11:56:18,495 [main] INFO org.apache.catalina.core.StandardService - Stopping service Catalina 2012-04-05 11:56:18,520 [main] INFO org.apache.coyote.http11.Http11BaseProtocol - Stopping Coyote HTTP/1.1 on http-8080 2012-04-05 11:56:18,521 [main] INFO org.apache.catalina.core.AprLifecycleListener - Failed shutdown of Apache Portable Runtime Tomcat-Native shared library failed to shut down. I do not know why. Did it start? Do you use Apr versions of Tomcat connectors? (You will see that when Tomcat starts). If you no not need it you can comment away the AprLifecycleListener in server.xml. I do not remember whether there were some specific issues in 5.5.29 - you may look at the changelog. The message really does not matter much if you shut down Tomcat as a whole. /var/log/tomcat5/base/stop.log Using CATALINA_BASE: /srv/www/tomcat5/base/ Using CATALINA_HOME: /usr/share/tomcat5 Using CATALINA_TMPDIR: /srv/www/tomcat5/base//temp Using JRE_HOME: /usr/lib/jvm/java 2012-04-05 11:56:19,282 [main] ERROR org.apache.catalina.startup.Catalina - Catalina.stop: java.net.ConnectException: Connection refused Attempt to stop Tomcat that is already stopped (and thus do not listen on the shutdown port anymore). at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(Unknown Source) at java.net.PlainSocketImpl.connectToAddress(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.init(Unknown Source) at java.net.Socket.init(Unknown Source) at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:395) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:344) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:435) in server.xml file are used tags: Listener className=org.apache.catalina.core.AprLifecycleListener / Listener
Re: Problem with shutting down tomcat5.5.29
2012/4/5 Petr Hracek phrac...@gmail.com: What I see in the start.log file is: 2012-04-05 15:28:04,557 [main] INFO org.apache.coyote.http11.Http11BaseProtocol - Initializing Coyote HTTP/1.1 on http-8080 2012-04-05 15:28:04,560 [main] INFO org.apache.catalina.startup.Catalina - Initialization processed in 1062 ms 2012-04-05 15:28:04,727 [main] INFO org.apache.catalina.core.StandardService - Starting service Catalina 2012-04-05 15:28:04,731 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet Engine: Apache Tomcat/5.5.27 2012-04-05 15:28:04,743 [main] INFO org.apache.catalina.core.StandardHost - XML validation disabled 2012-04-05 15:28:06,229 [main] INFO org.apache.catalina.loader.WebappClassLoader - validateJarFile(/opt/repgen/servlet/WEB-INF/lib/servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class The above is bad. (Though not related to your original question). You should not have servlet.jar in your application. Servlet API is provided by Tomcat only. Tomcat had to ignore your jar. 2012-04-05 15:28:06,312 [main] INFO org.apache.coyote.http11.Http11BaseProtocol - Starting Coyote HTTP/1.1 on http-8080 2012-04-05 15:28:06,423 [main] INFO org.apache.jk.common.ChannelSocket - JK: ajp13 listening on /127.0.0.1:8009 2012-04-05 15:28:06,425 [main] INFO org.apache.jk.server.JkMain - Jk running ID=0 time=0/15 config=null 2012-04-05 15:28:06,453 [main] INFO org.apache.catalina.storeconfig.StoreLoader - Find registry server-registry.xml at classpath resource 2012-04-05 15:28:06,514 [main] INFO org.apache.catalina.startup.Catalina - Server startup in 1954 ms Here is mention ajp13. It is not correct one, right? The above logs mean that you do not have Tomcat-Native library, so plain java (non-Apr) implementations of connectors are used. Thus you are better to remove/comment the following line in server.xml Listener className=org.apache.catalina.core.AprLifecycleListener / ( When Tomcat-Native is used, startup of 5.5 would look like the following: [[[ 05.04.2012 18:47:22 org.apache.catalina.core.AprLifecycleListener init INFO: Loaded APR based Apache Tomcat Native library 1.1.22. 05.04.2012 18:47:22 org.apache.catalina.core.AprLifecycleListener init INFO: APR capabilities: IPv6 [false], sendfile [true], accept filters [false], random [true]. 05.04.2012 18:47:23 org.apache.coyote.http11.Http11AprProtocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 05.04.2012 18:47:23 org.apache.coyote.ajp.AjpAprProtocol init INFO: Initializing Coyote AJP/1.3 on ajp-8009 05.04.2012 18:47:23 org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1578 ms 05.04.2012 18:47:23 org.apache.catalina.core.StandardService start INFO: Starting service Catalina 05.04.2012 18:47:23 org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.5.35 05.04.2012 18:47:23 org.apache.catalina.core.StandardHost start INFO: XML validation disabled 05.04.2012 18:47:24 org.apache.coyote.http11.Http11AprProtocol start INFO: Starting Coyote HTTP/1.1 on http-8080 05.04.2012 18:47:24 org.apache.coyote.ajp.AjpAprProtocol start INFO: Starting Coyote AJP/1.3 on ajp-8009 05.04.2012 18:47:24 org.apache.catalina.storeconfig.StoreLoader load INFO: Find registry server-registry.xml at classpath resource 05.04.2012 18:47:24 org.apache.catalina.startup.Catalina start INFO: Server startup in 1484 ms ]]] Note that protocol implementation names are Http11AprProtocol and AjpAprProtocol ) Is it possible that during the shutting down of tomcat5 stopping operation will take more then 2 minutes? It is possible, but you better take a thread dump (3 dumps separated by several seconds) to look what Tomcat is actually doing. How to do thread dumps is mentioned in the FAQ When I am commented out Listener section then during the stopping tomcat5 Failed is not mentioned but in stop.log file Exception is still there. How to avoid that Exception message will not be there? You mean java.net.ConnectException: Connection refused exception? It means that shutdown script cannot connect to Tomcat shutdown port to send it the shutdown command, regardless of the reason. If it is because Tomcat is already stopped (e.g. you tried to shut it down twice in a row) then it is normal and is OK. If it is because of any other reason then it is bad. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem with shutting down tomcat5.5.29
On 1:59 PM, Konstantin Kolinko wrote: 2012/4/5 Petr Hracekphrac...@gmail.com: What I see in the start.log file is: 2012-04-05 15:28:04,557 [main] INFO org.apache.coyote.http11.Http11BaseProtocol - Initializing Coyote HTTP/1.1 on http-8080 2012-04-05 15:28:04,560 [main] INFO org.apache.catalina.startup.Catalina - Initialization processed in 1062 ms 2012-04-05 15:28:04,727 [main] INFO org.apache.catalina.core.StandardService - Starting service Catalina 2012-04-05 15:28:04,731 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet Engine: Apache Tomcat/5.5.27 2012-04-05 15:28:04,743 [main] INFO org.apache.catalina.core.StandardHost - XML validation disabled 2012-04-05 15:28:06,229 [main] INFO org.apache.catalina.loader.WebappClassLoader - validateJarFile(/opt/repgen/servlet/WEB-INF/lib/servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class The above is bad. (Though not related to your original question). You should not have servlet.jar in your application. Servlet API is provided by Tomcat only. Tomcat had to ignore your jar. 2012-04-05 15:28:06,312 [main] INFO org.apache.coyote.http11.Http11BaseProtocol - Starting Coyote HTTP/1.1 on http-8080 2012-04-05 15:28:06,423 [main] INFO org.apache.jk.common.ChannelSocket - JK: ajp13 listening on /127.0.0.1:8009 2012-04-05 15:28:06,425 [main] INFO org.apache.jk.server.JkMain - Jk running ID=time=0/15 config=null 2012-04-05 15:28:06,453 [main] INFO org.apache.catalina.storeconfig.StoreLoader - Find registry server-registry.xml at classpath resource 2012-04-05 15:28:06,514 [main] INFO org.apache.catalina.startup.Catalina - Server startup in 1954 ms Here is mention ajp13. It is not correct one, right? The above logs mean that you do not have Tomcat-Native library, so plain java (non-Apr) implementations of connectors are used. Thus you are better to remove/comment the following line in server.xml Listener className=rg.apache.catalina.core.AprLifecycleListener / ( When Tomcat-Native is used, startup of 5.5 would look like the following: [[[ 05.04.2012 18:47:22 org.apache.catalina.core.AprLifecycleListener init INFO: Loaded APR based Apache Tomcat Native library 1.1.22. 05.04.2012 18:47:22 org.apache.catalina.core.AprLifecycleListener init INFO: APR capabilities: IPv6 [false], sendfile [true], accept filters [false], random [true]. 05.04.2012 18:47:23 org.apache.coyote.http11.Http11AprProtocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 05.04.2012 18:47:23 org.apache.coyote.ajp.AjpAprProtocol init INFO: Initializing Coyote AJP/1.3 on ajp-8009 05.04.2012 18:47:23 org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1578 ms 05.04.2012 18:47:23 org.apache.catalina.core.StandardService start INFO: Starting service Catalina 05.04.2012 18:47:23 org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.5.35 05.04.2012 18:47:23 org.apache.catalina.core.StandardHost start INFO: XML validation disabled 05.04.2012 18:47:24 org.apache.coyote.http11.Http11AprProtocol start INFO: Starting Coyote HTTP/1.1 on http-8080 05.04.2012 18:47:24 org.apache.coyote.ajp.AjpAprProtocol start INFO: Starting Coyote AJP/1.3 on ajp-8009 05.04.2012 18:47:24 org.apache.catalina.storeconfig.StoreLoader load INFO: Find registry server-registry.xml at classpath resource 05.04.2012 18:47:24 org.apache.catalina.startup.Catalina start INFO: Server startup in 1484 ms ]]] Note that protocol implementation names are Http11AprProtocol and AjpAprProtocol ) Is it possible that during the shutting down of tomcat5 stopping operation will take more then 2 minutes? It is possible, but you better take a thread dump (3 dumps separated by several seconds) to look what Tomcat is actually doing. How to do thread dumps is mentioned in the FAQ When I am commented out Listener section then during the stopping tomcat5 Failed is not mentioned but in stop.log file Exception is still there. How to avoid that Exception message will not be there? You mean java.net.ConnectException: Connection refused exception? It means that shutdown script cannot connect to Tomcat shutdown port to send it the shutdown command, regardless of the reason. If it is because Tomcat is already stopped (e.g. you tried to shut it down twice in a row) then it is normal and is OK. If it is because of any other reason then it is bad. Best regards, Konstantin Kolinko This may not be related to the shutdown problem but, if httpd is providing the connectivity to the user, is the Connector on port 8080 necessary? -Terence Bandoian - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org