dcsimg
Tomcat 4.0.X request processors get hung when request is too long
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Aaron_Evans
Posted On:   Wednesday, March 31, 2004 07:05 AM

I am hosting a Tomcat 4.0.x instance out of my basement with no web server in front of it. Here is the problem. I believe someone is DOS-ing my tomcat instance by continually making requests that are too long. In turn, each handling processor throws an Exception and becomes unavailable. Once it hits the max number of request processors, then tomcat is essentially hung. I don't see who is doing it because it is not getting logged to the access log. Here is what it looks like in the catalina log. There will be 74 of these: 2004-03-27 22:02:37 HttpProcessor[80][74] process.parse java.io.IOException: Line too long at org.apache.catalina.connector.http.SocketInputStream.readRequestLine(SocketInputStream.java:271   More>>

I am hosting a Tomcat 4.0.x instance out of my basement with no web server in front of it.

Here is the problem. I believe someone is DOS-ing my tomcat instance by continually making requests that are too long. In turn, each handling processor throws an Exception and becomes unavailable. Once it hits the max number of request processors, then tomcat is essentially hung. I don't see who is doing it because it is not getting logged to the access log.

Here is what it looks like in the catalina log. There will be 74 of these:

2004-03-27 22:02:37 HttpProcessor[80][74] process.parse
java.io.IOException: Line too long
at org.apache.catalina.connector.http.SocketInputStream.readRequestLine(SocketInputStream.java:271)
at org.apache.catalina.connector.http.HttpProcessor.parseRequest(HttpProcessor.java:695)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:959)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
at java.lang.Thread.run(Thread.java:536)

Once all 74 are toast, then every request results in:

2004-03-27 22:03:07 HttpConnector[80] No processor available, rejecting this connection

And I have to restart Tomcat. Is there anything I can do about this? Seems to me that all that has to be done is to handle the exception and have the request processor exit gracefully so that it is not hung...

I am running on W2K and had trouble getting Apache 1.3 hooked up to it, so just left it as is. I will be upgrading to 4.1 when I get a chance, but I have to rework some of my API framework as there are some XML issues.

thx

   <<Less

Re: Tomcat 4.0.X request processors get hung when request is too long

Posted By:   Ken_Hollingsworth  
Posted On:   Tuesday, April 20, 2004 10:45 PM

I'm having the same problem you are. My log entries match yours almost exactly (except for the final line). I found you through a Google search, which also revealed one other person reporting very similar symptoms. Your posting is dated March 31, the other one is dated April 5, and my trouble started somewhere during that time.


I think this is possibly a new virus or hack, and I propose that you, me and the other person join forces to share info and try to beat the thing.


The third guy is on a different message board, and this could make rapid exchange of information cumbersome. I suggest that if we want to join forces, we exchange e-mail and phone numbers for more efficient contact. I'll start by giving you my email address: sfkenh@pacbell.net

Re: Tomcat 4.0.X request processors get hung when request is too long

Posted By:   Anjan_Bacchu  
Posted On:   Wednesday, March 31, 2004 08:01 AM

Hi there,



It would be highly recommended to put tomcat behind Apache server if you're hosting it on a public IP.


Instead of 1.X series of Apache, get Apache 2.0.49 which is the latest and get mod-jk2 with Tomcat 5.0.19. This should increase the stability as well as security.


BR,

~A
About | Sitemap | Contact