[Fwd: Strange logging error for 4.1.18]
I sent this to tomcat-dev, but maybe the user list is a better place to ask: Original Message Subject: Strange logging error for 4.1.18 Date: Fri, 14 Mar 2003 17:50:18 -0800 From: William Lee [EMAIL PROTECTED] Reply-To: Tomcat Developers List [EMAIL PROTECTED] To: tomcat-dev [EMAIL PROTECTED] I'm running Tomcat 4.1.18 on Solaris 8 and Sun's JRE 1.3.x. I tried searching for the list but I couldn't seem to find anything that'll describe this problem. Usually, I can start tomcat fine. However, it seems like once in a while I got this error from stdout: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Log4JCategoryLog does not implement Log at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:567) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:291) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:415) at org.apache.tomcat.util.log.CommonLogHandler.log(CommonLogHandler.java:97) at org.apache.tomcat.util.log.Log.log(Log.java:198) at org.apache.tomcat.util.log.Log.log(Log.java:192) at org.apache.tomcat.util.log.Log.log(Log.java:174) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533) at java.lang.Thread.run(Thread.java:484) Then Tomcat stops accepting connection and just hung there. Looking at the ThreadPool.java code I see around line 522: /* Check if should execute a runnable. */ try { if(noThData) { if(p.debug0) p.log( Getting new thread data); thData=toRun.getInitData(); noThData = false; } if(shouldRun) { toRun.runIt(thData); } } catch(Throwable t) { loghelper.log(Caught exception executing + toRun.toString() + , terminating thread, t); loghelper.flush(); /* * The runnable throw an exception (can be even a ThreadDeath), * signalling that the thread die. * * The meaning is that we should release the thread from * the pool. */ It seems to throw another exception on the loghelper.log() call inside the catch(Throwable t) block. From here I suspect class loading issues, but I couldn't figure out what is wrong. Note that I'm compiling Tomcat from source using common-logging 1.0.2 and log4j 1.2.6. I didn't include log4j in the tomcat distribution (not in server/lib) but I do have a servlet that uses log4j1.2.6 and have the jar in the WEB-INF/lib directory. Does somebody experience anything like this before? -- William Lee (Will)| Sendmail Inc. Email: [EMAIL PROTECTED] | http://www.sendmail.com Tel:(510) 594-5505| - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Apache mod_jk's session not sticky
I'm using Apache 2.0.43, mod_ssl, mod_jk 1.2, and Tomcat 4.1.14 (the test release). I've set up Tomcat so it runs behind the apache. My test of having 1 worker behind a load balancer works perfectly without any problem. However, once I added another machine, it seems like my user's session is jumping back and forth between the two machines. This, of course creates a big problem. My servlet involves a form-based login page, in which the login code would remove the old session and attach a new one once the user has authenticated against the authority. Would this create a problem? I'm wondering how mod_jk handles the stick sessions. It does seem to be pretty random when it jumps back and forth between the two machines I have here. I've turned on the debug log in mod_jk but it doesn't tell me all that much. Is there any other mechanism available for me to debug this? -- William Lee (Will)| Sendmail Inc. Email: [EMAIL PROTECTED] | http://www.sendmail.com Tel:(510) 594-5505| -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Re: Tomcat 4.1.12 hanging under stress?
Ben Ricker wrote: On Mon, 2002-10-28 at 20:24, William Lee wrote: Hmm, it may have something to do with the kernel, I'll try later to see whether this is the case. I don't think the log gives me much though. Anyhow, I've made a weird discovery that I found interesting. After the other info you gave me, I am less concerned with the kernel now. I would still upgrade it, though. There is a nasty networking bug in the 2,4,9 kernel, I believe, that effects scalability. It seems like there's a barrier when the JVM consume around 90MB of RAM. Once the JVM got over that barrier, then things will keep working. Well, it turned out this problem may not have anything to do with the JVM at all. After trying various different JREs, -X flags, and garbage collection info, etc, I updated my tomcat to 4.1.14 (test) and now I got the following exception in stdout when I got into the situation where the connection hung: Class org.apache.commons.logging.impl.Log4JCategoryLog does not implement Log at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:555) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:289) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:409) at org.apache.tomcat.util.log.CommonLogHandler.log(CommonLogHandler.java:97) at org.apache.tomcat.util.log.Log.log(Log.java:198) at org.apache.tomcat.util.log.Log.log(Log.java:192) at org.apache.tomcat.util.log.Log.log(Log.java:165) at org.apache.tomcat.util.threads.ThreadPool.logFull(ThreadPool.java:260) at org.apache.tomcat.util.threads.ThreadPool.runIt(ThreadPool.java:226) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:509) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533) at java.lang.Thread.run(Thread.java:512) Looking into the 4.1.14 source code it turned out that the thread (maybe the connection thread?) just died when calling the function logFull(), and somehow log4j failed to do so (?). Does this have anything to do with class loader and using different versions of log4j? Does anyone know how tomcat logged its messages? -- William Lee (Will)| Sendmail Inc. Email: [EMAIL PROTECTED] | http://www.sendmail.com Tel:(510) 594-5505| -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Tomcat 4.1.12 hanging under stress?
I'm running a Tomcat 4.1.12 (with the coyote connectors running SSL) on RH Linux with a 2.4.9 kernel and IBM JRE 1.3.1 build cxia32131-20020622. I initiated around 50 concurrent https connections from JMeter to the test server I have (which is a moderately powerful dual PIII 500 with 512 MB RAM and Ultra-SCSI drives) and I realized some random hangings after running for a while. When the hanging happened, I could still connect to the port that I opened. However, I couldn't do anything once I connected to the port. The JVM seemed to be running still, but tomcat wouldn't response. BTW, I tried connecting to the port using openssl s_client ... and I was able to connect to the port when it hung, but I can't issue any HTTP commands. I can, however, shutdown the server from the control port with no problem. Can somebody tell me how to address / debug this problem? -- William Lee (Will)| Sendmail Inc. Email: [EMAIL PROTECTED] | http://www.sendmail.com Tel:(510) 594-5505| -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Re: Tomcat 4.1.12 hanging under stress?
Ben Ricker wrote: On Mon, 2002-10-28 at 14:38, William Lee wrote: I'm running a Tomcat 4.1.12 (with the coyote connectors running SSL) on RH Linux with a 2.4.9 kernel and IBM JRE 1.3.1 build cxia32131-20020622. I am wondering about the kernel version here; you have rather old kernel, a version which is considered unstable. I would suggest upgrading the kernel, especially since you have SMP. This is just a small suggestion.anything in the logs? Ben Ricker Wellin.com Hmm, it may have something to do with the kernel, I'll try later to see whether this is the case. I don't think the log gives me much though. Anyhow, I've made a weird discovery that I found interesting. It seems like there's a barrier when the JVM consume around 90MB of RAM. Once the JVM got over that barrier, then things will keep working. The strange thing is, under not-so-heavy load ( 30 concurrent users), somehow it failed to break that barrier and the socket hung when it reaches that point. If I drive the load up ( 50, 100, or even 200 concurrent connections), somehow it breaks that barrier and things will work without any problem. Does anyone know why this is the case? -- William Lee (Will)| Sendmail Inc. Email: [EMAIL PROTECTED] | http://www.sendmail.com Tel:(510) 594-5505| -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
Bug in catalina.sh? Problem using jpda
I have been using jswat for debugging Tomcat for a while. However, since I use the catalina's jpda start it doesn't work anymore. It seems like in the java command arguments that catalina.sh script constructed are missing a -Xnoagent flag. It's causing the jswat to skip all the breakpoint that I've set I think. Also, it seems like the setclasspath.sh script is explicitly checking jdb and javac in your JAVA_HOME/bin directory before allowing you to pass. That means you can't really use that script with any JRE for the binaries are not included... I know jsp would not work with the JRE but I can use the JRE with just plan servlet with no problem and having that check there is somewhat redundent. BTW, I'm currently using IBM JDK 1.3 and Tomcat 4.1.12 on Linux. -- William Lee (Will)| Sendmail Inc. Email: [EMAIL PROTECTED] | http://www.sendmail.com Tel:(510) 594-5505| -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Tomcat 4.1.12: SSL warnings in catalina.out
I've set up a standalone 4.1.12 Tomcat instance using SSL connection. When I looked into the catalina.out in the log directory, I realized that there are some warning lines in there that are pretty annoying. The lines are like: [WARN] Http11Processor - -Exception getting SSL attributes javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated I assume it's trying to do client authentication and failed (??). However, I have set the clientAuth=false in the the server.xml file. Why do I sill get a warning? It happens each time the browser hits the page too, so I think this is going to be a problem (where the catalina.out will get big with all the lines of messages). Is there a way to get rid of them? -- William Lee (Will)| Sendmail Inc. Email: [EMAIL PROTECTED] | http://www.sendmail.com Tel:(510) 594-5505| -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: tomcat 4.1.12
Tim Funk wrote: There was a security flaw in 4.1.11 and earlier that so that /servlet/* could be used for bad things. The flaw was fixed in the invoker servlet for the obvious issues but it still leaves the door open for people to do other bad things if people aren't careful. In $CATALINA_HOME/conf/web.xml - look for the invoker servlet and uncomment it to turn that functionality back on. My guess is it is now commented out by default (which is a good practice to have). Personally - I hate the concept of /servlet/* being able to invoke a class. It may make development easier - but then you run into subtle security goofs. -Tim Please excuse my ignorance, what's the preferred way to invoke a servlet class file then? I have a servlet named smimc that I defined a web.xml inside the smimc/WEB-INF/ directory: ... servlet servlet-name smimc /servlet-name servlet-class org.apache.turbine.Turbine /servlet-class ... I used to be able to invoke it with the path /smimc/servlet/smimc However, this doesn't seem to work anymore with the invoker turned off. I can turn the lines in tomcat's web.xml back on but that risks security (?). So what's the proper way for this to work then? Will -- William Lee (Will)| Sendmail Inc. Email: [EMAIL PROTECTED] | http://www.sendmail.com Tel:(510) 594-5505| -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Documentation on the ROOT servlet
I would like to find out more about how the ROOT servlet work. In particular, I would like to redirect the request from the ROOT to a certain servlet that I have installed in tomcat. I've tried to map the / context to a custom servlet that I have written but that doesn't seem to work. The ROOT context apparently also serves resources such as images and stylesheets. Is there any good way to accomplish this? -- William Lee (Will)| Sendmail Inc. Email: [EMAIL PROTECTED] | http://www.sendmail.com Tel:(510) 594-5505| -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: multiple java processes
David Bazell wrote: When I start tomcat and do a ps I see 18 java processes have started. Is this normal? Why are they all there? Thanks, Dave You're probably running on a Linux system, I suppose? Linux displays threads as process in ps. -- William Lee (Will)| Sendmail Inc. Email: [EMAIL PROTECTED] | http://www.sendmail.com Tel:(510) 594-5505| -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Tomcat is very slow when used with Netscape browser
I have also had this problem. Yes, it's Netscape 4.7x slow rendering speed that causes that slowness that you've seen. You can try Netscape 6.x and you should see MUCH faster rendering speed. Anyway, try reducing the complexity of the page. Reducing the use of css stylesheet classes and nested tables will greatly improve the speed on 4.7x. Will -Original Message- From: Kiran Kumar [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 27, 2001 5:53 AM To: Tomcat Users List Subject: Tomcat is very slow when used with Netscape browser Hi, Iam using Tomcat 3.2.3 for my application.In my application iam reading the contents of a files present in directory outside the tomcat web server directory(i.e. my content is in c:\temp).The application is very fast if I browse the application using Internet Explorer.The same application takes too much of time to load if I use Netscape browser. Anybody have any idea why this is happening?Any ideas to fix this problem? Thanks, Kiran -- William Lee (Will)| Sendmail Inc. Email: [EMAIL PROTECTED] | http://www.sendmail.com Tel:(510) 594-5505| -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: SSL on AIX fails
Make sure you follow Tomcat instructions exactly as it states. The critical step is to put an extra line in the java.security (?) file and put your jsse jars in the lib/ext directory. I used to have this problem but I solved it by doing such. Good Luck. Will But when I do: https://fixus:8443/index.html tomcat writes: 2001-09-21 09:49:49 - Ctx( ): 400 R( /) null 2001-09-21 09:49:49 - Ctx( ): IOException in: R( /) Socket closed I have no idea what goes wrong and I do not understand the error message. My IE55 gets an DNS-Error (??). An installation on my windows-localhost works fine ... Best regards, Peter -- Dipl.-Inf. Peter Kruse Projektbereich Netzmanagement T-Systems debis Systemhaus GEI GmbH Geschäftsstelle Ulm, Standort Hamburg Hausanschrift: Lademannbogen 21-23, 22339 Hamburg Postanschrift: Postfach 630265, 22312 Hamburg Telefon: (040) 53 95 - 11 88 Telefax: (040) 53 95 - 16 07 Mobiltelefon: (01 70) - 83 64 15 9 E-Mail: mailto:[EMAIL PROTECTED] Internet: http://www.t-systems.de -- Dipl.-Inf. Peter Kruse Projektbereich Netzmanagement T-Systems debis Systemhaus GEI GmbH Geschäftsstelle Ulm, Standort Hamburg Hausanschrift: Lademannbogen 21-23, 22339 Hamburg Postanschrift: Postfach 630265, 22312 Hamburg Telefon: (040) 53 95 - 11 88 Telefax: (040) 53 95 - 16 07 Mobiltelefon: (01 70) - 83 64 15 9 E-Mail: mailto:[EMAIL PROTECTED] Internet: http://www.t-systems.de -- William Lee (Will)| Sendmail Inc. Email: [EMAIL PROTECTED] | http://www.sendmail.com Tel:(510) 594-5505|
Standalone Tomcat SSL Handshake problem
I've searched in the mail archive but found no solution to the Tomcat standalone SSL handshake problem that many people seem to experience. I got the jsse and the certs installed according to the instruction. I used the keytool util to import a openssl-generated, self-signed, certificate. I can start the server fine with the following lines in server.xml: Connector className=org.apache.tomcat.service.PoolTcpConnector Parameter name=handler value=org.apache.tomcat.service.http.HttpConnectionHandler/ Parameter name=port value=8443/ Parameter name=socketFactory value=org.apache.tomcat.net.SSLSocketFactory / Parameter name=keystore value=/tmp/keystore / Parameter name=keypass value=changeit / Parameter name=clientAuth value=false / /Connector The keystore file is /tmp/keystore. When I start the server, I got: 2001-08-24 17:57:33 - ContextManager: Adding context Ctx( /admin ) Starting tomcat. Check logs/tomcat.log for error messages 2001-08-24 17:57:33 - ContextManager: Adding context Ctx( ) 2001-08-24 17:57:33 - ContextManager: Adding context Ctx( /test ) 2001-08-24 17:57:34 - PoolTcpConnector: Starting HttpConnectionHandler on 8080 2001-08-24 17:57:45 - PoolTcpConnector: Starting HttpConnectionHandler on 8443 2001-08-24 17:57:45 - PoolTcpConnector: Starting Ajp12ConnectionHandler on 8007 When I try connect to port 8443 using https from a browser: 2001-08-24 17:57:48 - Ctx( ): 400 R( /) null 2001-08-24 17:57:48 - Ctx( ): IOException in: R( /) Socket closed I tried using openssl to connect to the server: openssl s_client -host sun8.dev-lab -port 8443 CONNECTED(0003) 19354:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure:s23_clnt.c:453: Can somebody tell me how I can get it going? I read from the archive that this is common problem but I found no way to resolve this. People must have gotten it to work, right?...:) BTW, I'm using JDK 1.3.1 on Solaris 5.8, Jsse 1.0.2, and Tomcat 3.2.3. -- William Lee (Will)| Sendmail Inc. Email: [EMAIL PROTECTED] | http://www.sendmail.com Tel:(510) 594-5505|