You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dennis Cartier <de...@canadianblackbook.com> on 2003/03/11 16:20:38 UTC
Bad Cookie Handling in Tomcat & mod_Jk
Hi Guys,
I have run across a situation a couple of times now that results in the
operation of my cluster being severely impacted. When a bad cookie comes
into 1 of the nodes, it crashes the coyote connector like so:
java.lang.IllegalArgumentException: Cookie name 7~?at1 is a reserved token
at javax.servlet.http.Cookie.<init>(Cookie.java:185)
at
org.apache.coyote.tomcat4.CoyoteAdapter.parseCookies(CoyoteAdapter.java:402)
at
org.apache.coyote.tomcat4.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:
306)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:221)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:632)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:590)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:707)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:530)
at java.lang.Thread.run(Thread.java:536)
Then the request is moved to another node and crashes it, and so, and so on.
The request just keeps circling killing all the coyote's it encounters.
The only way I have found to deal with this is to restart all the nodes of
the cluster when this occurs. I am not sure how this can be prevented. The
requests seem to circle for ever, and never seems to die.
Background:
cluster running
- JBoss 3.0.6
- Tomcat 4.1.18
- mod_jk 1.2.2
I asked the this same question a month ago, but got zero replies. Does
anyone here have an idea?
My thinking is that mod_jk could head this potential problem off by
screening the cookie names *BEFORE* it passes them to tomcat. Anyone know
how I can get in contact with the mod_jk developers?
Thanks,
Dennis
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
RE: Bad Cookie Handling in Tomcat & mod_Jk
Posted by Dennis Cartier <de...@canadianblackbook.com>.
Thanks Bill. This is great. This has been bugging me for awhile.
Dennis
-----Original Message-----
From: news [mailto:news@main.gmane.org]On Behalf Of Bill Barker
Sent: Wednesday, March 12, 2003 3:46 AM
To: tomcat-user@jakarta.apache.org
Subject: Re: Bad Cookie Handling in Tomcat & mod_Jk
"Dennis Cartier" <de...@canadianblackbook.com> wrote in message
news:CHEEIELCCCDJPFIFPLPFCELJDAAA.dennis@canadianblackbook.com...
> Hi Guys,
>
> I have run across a situation a couple of times now that results in the
> operation of my cluster being severely impacted. When a bad cookie comes
> into 1 of the nodes, it crashes the coyote connector like so:
>
> java.lang.IllegalArgumentException: Cookie name 7~?at1 is a reserved token
> at javax.servlet.http.Cookie.<init>(Cookie.java:185)
> at
>
org.apache.coyote.tomcat4.CoyoteAdapter.parseCookies(CoyoteAdapter.java:402)
> at
>
org.apache.coyote.tomcat4.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:
> 306)
> at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:221)
> at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261)
> at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)
> at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:632)
> at
>
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:590)
> at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:707)
> at
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
> a:530)
> at java.lang.Thread.run(Thread.java:536)
>
> Then the request is moved to another node and crashes it, and so, and so
on.
> The request just keeps circling killing all the coyote's it encounters.
>
> The only way I have found to deal with this is to restart all the nodes of
> the cluster when this occurs. I am not sure how this can be prevented. The
> requests seem to circle for ever, and never seems to die.
>
> Background:
>
> cluster running
> - JBoss 3.0.6
> - Tomcat 4.1.18
> - mod_jk 1.2.2
>
> I asked the this same question a month ago, but got zero replies. Does
> anyone here have an idea?
>
I just committed a patch to the jakarta-tomcat-4.0 HEAD that should fix
this.
> My thinking is that mod_jk could head this potential problem off by
> screening the cookie names *BEFORE* it passes them to tomcat. Anyone know
> how I can get in contact with the mod_jk developers?
If this list doesn't satisfy you (most of the mod_jk developers at least
lurk on this list), you can try subscribing to tomcat-dev and asking there.
As a word of warning, if you're not willing to provide patches, then
user-type questions generally get ignored (or get a reply to send to
tomcat-user :).
>
> Thanks,
>
> Dennis
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Bad Cookie Handling in Tomcat & mod_Jk
Posted by Bill Barker <wb...@wilshire.com>.
"Dennis Cartier" <de...@canadianblackbook.com> wrote in message
news:CHEEIELCCCDJPFIFPLPFCELJDAAA.dennis@canadianblackbook.com...
> Hi Guys,
>
> I have run across a situation a couple of times now that results in the
> operation of my cluster being severely impacted. When a bad cookie comes
> into 1 of the nodes, it crashes the coyote connector like so:
>
> java.lang.IllegalArgumentException: Cookie name 7~?at1 is a reserved token
> at javax.servlet.http.Cookie.<init>(Cookie.java:185)
> at
>
org.apache.coyote.tomcat4.CoyoteAdapter.parseCookies(CoyoteAdapter.java:402)
> at
>
org.apache.coyote.tomcat4.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:
> 306)
> at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:221)
> at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261)
> at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)
> at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:632)
> at
>
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:590)
> at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:707)
> at
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
> a:530)
> at java.lang.Thread.run(Thread.java:536)
>
> Then the request is moved to another node and crashes it, and so, and so
on.
> The request just keeps circling killing all the coyote's it encounters.
>
> The only way I have found to deal with this is to restart all the nodes of
> the cluster when this occurs. I am not sure how this can be prevented. The
> requests seem to circle for ever, and never seems to die.
>
> Background:
>
> cluster running
> - JBoss 3.0.6
> - Tomcat 4.1.18
> - mod_jk 1.2.2
>
> I asked the this same question a month ago, but got zero replies. Does
> anyone here have an idea?
>
I just committed a patch to the jakarta-tomcat-4.0 HEAD that should fix
this.
> My thinking is that mod_jk could head this potential problem off by
> screening the cookie names *BEFORE* it passes them to tomcat. Anyone know
> how I can get in contact with the mod_jk developers?
If this list doesn't satisfy you (most of the mod_jk developers at least
lurk on this list), you can try subscribing to tomcat-dev and asking there.
As a word of warning, if you're not willing to provide patches, then
user-type questions generally get ignored (or get a reply to send to
tomcat-user :).
>
> Thanks,
>
> Dennis
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org