Re: mod_jk CLOSE_WAIT state and 1 byte recv buffer
hello, i have a similar (the same?) problem, where i currently do not know what's really the root cause of it. i was monitoring my webapp (apache 2.0.52, tomcat 5.0.28, mod_jk2, later tomcat 5.5.7 with mod_jk 1.2.8) on port 80 (apache/mod_jk) by requesting a given url with curl. sometimes the url was not reachable, the output of curl then was curl: (6) name lookup timed out. the netstat-output was sometimes ok (cons in state ESTABLISHED), but sometimes it looked like the following: tcp1 0 127.0.0.1:50195 127.0.0.1:8009 CLOSE_WAIT 12109/httpd tcp1 0 127.0.0.1:50203 127.0.0.1:8009 CLOSE_WAIT 12113/httpd tcp1 0 127.0.0.1:50228 127.0.0.1:8009 CLOSE_WAIT 12108/httpd tcp1 0 127.0.0.1:50215 127.0.0.1:8009 CLOSE_WAIT 12111/httpd tcp0 0 127.0.0.1:50258 127.0.0.1:8009 ESTABLISHED 12112/httpd tcp0 0 127.0.0.1:50262 127.0.0.1:8009 ESTABLISHED 3268/httpd tcp0 0 127.0.0.1:50240 127.0.0.1:8009 ESTABLISHED 12110/httpd tcp0 0 127.0.0.1:50244 127.0.0.1:8009 ESTABLISHED 13759/httpd tcp0 0 127.0.0.1:50249 127.0.0.1:8009 ESTABLISHED 12114/httpd tcp0 0 127.0.0.1:50254 127.0.0.1:8009 ESTABLISHED 12115/httpd tcp0 0 :::127.0.0.1:50238 :::127.0.0.1:3306 ESTABLISHED 12562/java tcp0 0 :::127.0.0.1:50237 :::127.0.0.1:3306 ESTABLISHED 12562/java tcp0 0 :::127.0.0.1:8009 :::127.0.0.1:50262 ESTABLISHED 12562/java tcp0 0 :::127.0.0.1:8009 :::127.0.0.1:50258 ESTABLISHED 12562/java tcp0 0 :::127.0.0.1:8009 :::127.0.0.1:50254 ESTABLISHED 12562/java tcp0 0 :::127.0.0.1:8009 :::127.0.0.1:50249 ESTABLISHED 12562/java tcp0 0 :::127.0.0.1:8009 :::127.0.0.1:50244 ESTABLISHED 12562/java tcp0 0 :::127.0.0.1:8009 :::127.0.0.1:50240 ESTABLISHED 12562/java then i added the hostname of the requested url to /etc/hosts, and since then everything was ok. adding the hostname to /etc/hosts was my last action, after that i was not further debugging. my environment: 2.6.10-1.760_FC3 tomcat5-5.5.7-2jpp httpd-2.0.52-3.1 mod_jk-ap20-1.2.8-1jpp cheers, martin On Fri, 2005-02-18 at 15:49 +0100, Michael Stiller wrote: Hi, i have the following problem with mod_jk from tomcat-connectors (1.2.5 - 1.2.8) including 1.2.9 (from cvs). Environment: apache is 2.0.52, forking model, server os is linux 2.6.10-1.760_FC3smp (fedora core 3), mod_jk 1.2.9 (others tested as well) After a while i get sockets stuck in CLOSE_WAIT state and netstat shows 1 byte in the receive queue for this socket. tcpdump shows, that the backend (jetty) half-closes the connection with FIN. That FIN is acked from the mod_jk machine but the connection is not closed (no FIN is send). sample netstat output: ... tcp1 0 192.168.100.1:51003 192.168.170.8:32511 CLOSE_WAIT tcp1 0 192.168.100.1:53875 192.168.170.8:12522 CLOSE_WAIT tcp1 0 192.168.100.1:53619 192.168.170.8:12521 CLOSE_WAIT ... Are there any known issues? Where do is start debugging this? What information is missing? TIA, Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Martin Grotzke Hohenesch 38, 22765 Hamburg Tel. +49 (0) 40.39905668 Mobil +49 (0) 170.9365656 E-Mail[EMAIL PROTECTED] Onlinehttp://www.javakaffee.de signature.asc Description: This is a digitally signed message part
Re: Adding ServletContextListener causes web app to not deploy
hi, you should make the class public. cheers, martin On Fri, 2005-02-11 at 12:27 -0500, Fenderbosch, Eric wrote: I've got a small web app that's working just fine. As soon as I add a listener, it fails to deploy. Here's the relevant part of web.xml: ?xml version=1.0 encoding=UTF-8? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 context-param param-namejavax.servlet.jsp.jstl.fmt.localizationContext/param-name param-valuenet.fender.bazaar.struts.BazaarMessageResources/param-value /context-param listener listener-classnet.fender.bazaar.servlet.BazaarServletContextListener/listener-class /listener And the VERY simple listener: package net.fender.bazaar.servlet; import javax.servlet.ServletContext; import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextListener; class BazaarServletContextListener implements ServletContextListener { private ServletContext context; public void contextDestroyed(ServletContextEvent event) { context = null; } public void contextInitialized(ServletContextEvent event) { context = event.getServletContext(); } } And the server log: INFO: Removing web application at context path /bazaar Feb 11, 2005 11:16:37 AM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\java\jakarta-tomcat-5.0.28\conf\Catalina\localhost\bazaar.xml Feb 11, 2005 11:17:30 AM org.apache.catalina.core.StandardContext listenerStart SEVERE: Skipped installing application listeners due to previous error(s) Feb 11, 2005 11:17:30 AM org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart Feb 11, 2005 11:17:30 AM org.apache.catalina.core.StandardContext start SEVERE: Context startup failed due to previous errors I'm using Tomcat 5.0.28 and Sun JDK 1.4.2_06-b03. Any ideas? TIA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Martin Grotzke Hohenesch 38, 22765 Hamburg Tel. +49 (0) 40.39905668 Mobil +49 (0) 170.9365656 E-Mail[EMAIL PROTECTED] Onlinehttp://www.javakaffee.de signature.asc Description: This is a digitally signed message part
Re: Restart-On-Failure for Tomcat?
hello, i also have the problem that my tomcat stops does not respond, and this more than once a day. i'm currently looking for the cause of the problem, so i wrote a monitoring script that collects the top-output, does a thread-dump on the tomcat-process and performs a `netstat -p -n`, and finally sends this information via email. configuration is hold by a configuration file, whereas these days i put more and more configuration into the script itself, so separation of concerns is broken :) you can place the script in /etc/init.d/ and register it via chkconfig, configurations are placed in the conf-file and in the top of the monitoring-script, you should adapt all to your needs. as i don't know if attachments are handled properly by this list, i put the script on my website, so you can find it here too: http://www.javakaffee.de/jspwiki/Wiki.jsp?page=ServerSideDevelopment i hope it's helpful, cheers, martin On Thu, 2005-02-10 at 12:12 -0800, Robert McIntosh wrote: Hi Paul, I hope you don't mind the direct e-mail. Would you mind sharing your wget script? Thanks, Robert On Sat, 05 Feb 2005 23:02:50 -0600, Paul [EMAIL PROTECTED] wrote: I would suggest either a process monitor or using cron to run script every minute or so that would use wget to get a test page and if it fails, restart tomcat. I've been using the latter of the two with good success for a while. Of course, I'm assuming your using Linux or the like, but if you're on Win then you can set the recovery options under services. I'm not aware of anything inherent in Tomcat. Regards, -Paul Robert McIntosh wrote: Hi, I'm supporting a web application running on Apache (2.0x) /Tomcat(5.0.x) w/ mod-jk. The web application seems to cause Tomcat (5.0.28) to fail on average once a week. Restarting tomcat tends to do the trick, however this is in a production enviornment. I've been looking for a restart-on-failure script or inherent feature in Tomcat that can perform this. Please forward me information on how to monitor Tomcat for error conditions and restart the application. Thanks! Robert [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Martin Grotzke Hohenesch 38, 22765 Hamburg Tel. +49 (0) 40.39905668 Mobil +49 (0) 170.9365656 E-Mail[EMAIL PROTECTED] Onlinehttp://www.javakaffee.de watchtomcat Description: application/shellscript # # The configuration file for watchtomcat # # $Id: watchtomcat.conf.baseserver.com 94 2004-03-18 21:15:38Z grotzke $ # # for curl checking #CHECK_URL=http://www.javakaffee.de/jspwiki/Wiki.jsp?page=Main; CHECK_URL=http://tomcat.baseserver.net; SEARCH_WORD=wordtosearchfor # for which word shall be searched in the CHECK_URL-document? EXPECTED_WC_L=3# how many lines are expected to be found with the given SEARCH_WORD? [EMAIL PROTECTED]# where to send notifications signature.asc Description: This is a digitally signed message part
Re: Restart-On-Failure for Tomcat?
On Thu, 2005-02-10 at 23:30 +0100, Martin Grotzke wrote: hello, i also have the problem that my tomcat stops does not respond, and this more than once a day. i'm currently looking for the cause of the problem, so i wrote a monitoring script that collects the top-output, does a thread-dump on the tomcat-process and performs a `netstat -p -n`, and finally sends this information via email. ha, i forgot to mention that it restarts tomcat, too ;) cheers, martin configuration is hold by a configuration file, whereas these days i put more and more configuration into the script itself, so separation of concerns is broken :) you can place the script in /etc/init.d/ and register it via chkconfig, configurations are placed in the conf-file and in the top of the monitoring-script, you should adapt all to your needs. as i don't know if attachments are handled properly by this list, i put the script on my website, so you can find it here too: http://www.javakaffee.de/jspwiki/Wiki.jsp?page=ServerSideDevelopment i hope it's helpful, cheers, martin On Thu, 2005-02-10 at 12:12 -0800, Robert McIntosh wrote: Hi Paul, I hope you don't mind the direct e-mail. Would you mind sharing your wget script? Thanks, Robert On Sat, 05 Feb 2005 23:02:50 -0600, Paul [EMAIL PROTECTED] wrote: I would suggest either a process monitor or using cron to run script every minute or so that would use wget to get a test page and if it fails, restart tomcat. I've been using the latter of the two with good success for a while. Of course, I'm assuming your using Linux or the like, but if you're on Win then you can set the recovery options under services. I'm not aware of anything inherent in Tomcat. Regards, -Paul Robert McIntosh wrote: Hi, I'm supporting a web application running on Apache (2.0x) /Tomcat(5.0.x) w/ mod-jk. The web application seems to cause Tomcat (5.0.28) to fail on average once a week. Restarting tomcat tends to do the trick, however this is in a production enviornment. I've been looking for a restart-on-failure script or inherent feature in Tomcat that can perform this. Please forward me information on how to monitor Tomcat for error conditions and restart the application. Thanks! Robert [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Martin Grotzke Hohenesch 38, 22765 Hamburg Tel. +49 (0) 40.39905668 Mobil +49 (0) 170.9365656 E-Mail[EMAIL PROTECTED] Onlinehttp://www.javakaffee.de signature.asc Description: This is a digitally signed message part
RE: Tomcat 5.5 and ClassNotFoundException:org.apache.catalina.logger.FileLogger
On Fri, 2004-10-22 at 15:17, Shapira, Yoav wrote: Hi, Did you use a Tomcat 5.0 server.xml or context XML file? The Logger elemnt is history, doesn't exist in Tomcat 5.5. D'oh, my fault. I copied my old (tc-5.0.27) server.xml to tomcat 5.5 conf directory, and did not realize to test the original one... now it works really great! seems to be faster than tc-5.0.27 (running with jdk 1.5, too)... thanx a lot, martin Yoav Shapira http://www.yoavshapira.com -Original Message- From: Martin Grotzke [mailto:[EMAIL PROTECTED] Sent: Thursday, October 21, 2004 6:49 PM To: Tomcat Users List Subject: Tomcat 5.5 and ClassNotFoundException:org.apache.catalina.logger.FileLogger hi all, i just wanted to test tomcat 5.5. beta, so i downloaded the binary (jakarta-tomcat-5.5.3.tar.gz), set classpath to the jdk 1.5 and ran `./catalina.sh run`. the output i got does not look really good: Using CATALINA_BASE: /opt/jakarta-tomcat-5.5.3 Using CATALINA_HOME: /opt/jakarta-tomcat-5.5.3 Using CATALINA_TMPDIR: /opt/jakarta-tomcat-5.5.3/temp Using JAVA_HOME: /usr/lib/jvm/java-1.5.0 Oct 22, 2004 12:35:35 AM org.apache.tomcat.util.digester.Digester startElement SEVERE: Begin event threw exception java.lang.ClassNotFoundException: org.apache.catalina.logger.FileLogger at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) i took a look into jars in $CATALINA_HOME/server/lib, but none of these contained the FileLogger... the tomcat 5.0.27 installation has a catalina.jar in server/lib that contains this class, the catalina.jar of tomcat 5.5 does not. am i doing anything wrong? any help appreciated, thanx very much, martin This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] signature.asc Description: This is a digitally signed message part
Tomcat 5.5 and ClassNotFoundException: org.apache.catalina.logger.FileLogger
hi all, i just wanted to test tomcat 5.5. beta, so i downloaded the binary (jakarta-tomcat-5.5.3.tar.gz), set classpath to the jdk 1.5 and ran `./catalina.sh run`. the output i got does not look really good: Using CATALINA_BASE: /opt/jakarta-tomcat-5.5.3 Using CATALINA_HOME: /opt/jakarta-tomcat-5.5.3 Using CATALINA_TMPDIR: /opt/jakarta-tomcat-5.5.3/temp Using JAVA_HOME: /usr/lib/jvm/java-1.5.0 Oct 22, 2004 12:35:35 AM org.apache.tomcat.util.digester.Digester startElement SEVERE: Begin event threw exception java.lang.ClassNotFoundException: org.apache.catalina.logger.FileLogger at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) i took a look into jars in $CATALINA_HOME/server/lib, but none of these contained the FileLogger... the tomcat 5.0.27 installation has a catalina.jar in server/lib that contains this class, the catalina.jar of tomcat 5.5 does not. am i doing anything wrong? any help appreciated, thanx very much, martin signature.asc Description: This is a digitally signed message part
Re: Redhat9 / apxs / mod_jk2 build problem.
On Mon, 2004-01-12 at 13:11, James Snelling wrote: Any help finding a way forward is appreciated, a cannot help you for your specific problem, but i built mod_jk2 two days ago on fedora, and succeeded. perhaps this solves your problem too... you can find the description in the archives, http://www.mail-archive.com/[EMAIL PROTECTED]/msg114982.html cheers, martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5 SSL Configuration
On Mon, 2004-01-12 at 21:39, Brian Boyle wrote: Hi! Can someone please tell me how to configure SSL for tomcat 5. There seems to be difference in the server.xml file from previous versions of tomcat so I am unsure of what to edit or add to it. i have this in my server.xml: Connector port=8443 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 debug=0 scheme=https secure=true clientAuth=false sslProtocol=TLS keystoreFile=/etc/tomcat5/tomcat.keystore keystorePass=secret / hope this does help, cheers, martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
built mod_jk2 on fedora with tomcat 5.0.16 (working)
hi all, after very long nights, i finally got mod_jk2 built so that it now works on a fedora system with with apache2 and tomcat5. i don't know if everything i did when building and configuring is really required, but with the given steps it worked for me. as i read a lot on this list i want to give this back to you, perhaps it's useful for someone and saves some time. if you find things which are unnecessary or unimportant, please post it. --- Prerequisites, System * Fedora Core 1, 2.4.22-1.2140.nptl (fc1 binary rpm) * httpd-2.0.48-1.2, httpd-devel-2.0.48-1.2 (fc1 binary rpm) * apr-util-0.9.4-2, apr-devel-0.9.4-2, apr-0.9.4-2, apr-util-devel-0.9.4-2 (fc1 binary rpm) * java-1.4.2-sun-1.4.2.01-4jpp, java-1.4.2-sun-devel-1.4.2.01-4jpp (jpackage.org) * tomcat5-5.0.16-2jpp (jpackage.org) --- Building Configure jakarta-tomcat-connectors-jk2-src # unzip jakarta-tomcat-connectors-jk2-src-current.zip -d . # cd jakarta-tomcat-connectors-jk2-2.0.2-src/jk/native2/ # export CPPFLAGS=-I/usr/include/apr-0 # sh ./buildconf. # chmod 755 configure # ./configure --with-apxs2=/usr/sbin/apxs --with-apr-lib=/usr/lib --with-apr-include=/usr/include/apr-0 --with-tomcat-41=/usr/share/tomcat5 --with-jni --with-java-home=/usr/lib/jvm/java Modify server/apache2/Makefile: # vi server/apache2/Makefile * Change LIBTOOL to LIBTOOL=/usr/bin/libtool * Change JK_LDFLAGS to JK_LDFLAGS=-L${APACHE2_LIBDIR} -lcrypt -lapr-0 -lpcre -lpcreposix -laprutil-0 Build # make # libtool --finish /usr/lib/httpd/modules --- Verify Build and Install change to build dir # cd jakarta-tomcat-connectors-jk2-2.0.2-src/jk/build/jk2/apache2/ # ldd jkjni.so gives [EMAIL PROTECTED] apache2]# ldd jkjni.so libcrypt.so.1 = /lib/libcrypt.so.1 (0x008e3000) libapr-0.so.0 = /usr/lib/libapr-0.so.0 (0x00179000) libpcre.so.0 = /lib/libpcre.so.0 (0x00bb5000) libpcreposix.so.0 = /usr/lib/libpcreposix.so.0 (0x00713000) libaprutil-0.so.0 = /usr/lib/libaprutil-0.so.0 (0x00342000) libc.so.6 = /lib/tls/libc.so.6 (0x00e65000) librt.so.1 = /lib/tls/librt.so.1 (0x00686000) libm.so.6 = /lib/tls/libm.so.6 (0x005a3000) libnsl.so.1 = /lib/libnsl.so.1 (0x00839000) libdl.so.2 = /lib/libdl.so.2 (0x00615000) libldap.so.2 = /usr/lib/libldap.so.2 (0x002f6000) liblber.so.2 = /usr/lib/liblber.so.2 (0x00111000) libgdbm.so.2 = /usr/lib/libgdbm.so.2 (0x00361000) libdb-4.1.so = /usr/lib/tls/libdb-4.1.so (0x00199000) libexpat.so.0 = /usr/lib/libexpat.so.0 (0x00571000) /lib/ld-linux.so.2 = /lib/ld-linux.so.2 (0x00b29000) libpthread.so.0 = /lib/tls/libpthread.so.0 (0x0011d000) libresolv.so.2 = /lib/libresolv.so.2 (0x0012d000) libsasl2.so.2 = /usr/lib/libsasl2.so.2 (0x00d99000) libssl.so.4 = /lib/libssl.so.4 (0x0013f000) libcrypto.so.4 = /lib/libcrypto.so.4 (0x003fb000) libgssapi_krb5.so.2 = /usr/lib/libgssapi_krb5.so.2 (0x0055d000) libkrb5.so.3 = /usr/lib/libkrb5.so.3 (0x00723000) libcom_err.so.2 = /lib/libcom_err.so.2 (0x00174000) libk5crypto.so.3 = /usr/lib/libk5crypto.so.3 (0x0025a000) libz.so.1 = /usr/lib/libz.so.1 (0x0027c000) # ldd mod_jk2.so gives [EMAIL PROTECTED] apache2]$ ldd mod_jk2.so libc.so.6 = /lib/tls/libc.so.6 (0x0056f000) /lib/ld-linux.so.2 = /lib/ld-linux.so.2 (0x00d3b000) # cp *.so /usr/lib/httpd/modules/ --- [Additional] Configuration Add to /etc/tomcat5/tomcat5.conf: serverRoot=/etc/httpd export serverRoot User/Groups of apache and tomcat4: [EMAIL PROTECTED] conf]# id apache uid=48(apache) gid=48(apache) groups=48(apache),91(tomcat4) [EMAIL PROTECTED] conf]# id tomcat4 uid=91(tomcat4) gid=91(tomcat4) groups=91(tomcat4),48(apache) Configuration files (and this description, too) can be found at http://www.javakaffee.de/wiki/jsp/Wiki?BuildModJk (at the bottom of the page): workers2.properties, jk2.properties, example for vhost that's all, i hope it's helpful, cheers, martin signature.asc Description: This is a digitally signed message part