Re: Tomcat looses POST parameters

2007-08-30 Thread M4N - Arjan Tijms

Hi,

M4N - Arjan Tijms wrote:

The problem I'm encountering is that for a percentage of the POST 
requests, Tomcat seems to loose all parameters. Our application uses a 
filter that logs the (first few characters of) post parameters.



To follow up on this issue, I think that I have probably found the cause 
of this issue. In the AJP/1.3 connector configuration in server.xml, the 
connectionTimeout had been set to a very low value (200). In the 
catalina.[date].log this resulted in entries like:



Aug 29, 2007 4:27:21 PM org.apache.jk.common.HandlerRequest invoke
INFO: Unknown message 31
Aug 29, 2007 4:27:23 PM org.apache.jk.common.HandlerRequest invoke
INFO: Unknown message 31
Aug 29, 2007 4:27:25 PM org.apache.jk.common.HandlerRequest invoke
INFO: Unknown message 31
Aug 29, 2007 4:27:26 PM org.apache.jk.common.HandlerRequest invoke
INFO: Unknown message 31


Except for message "31", there were also entries for Unknown message 8, 
1, 19, 20, 22, 0, 29, 11 and 15, although 31 was the most common. I 
missed these messages earlier (which is stupid of me, I know). I 
compared the time stamps of these messages with those of the "empty 
posts" in the other log file and found out they matched exactly or 
almost exactly.


Looking up the code of HandlerRequest it appears to switch on a byte, 
defined in org.apache.jk.common.AjpConstants. It actually switches on a 
subset of these. The default action is to print the Unknown message line 
and continue, which happens for the numbers I mentioned above.


Perhaps the connector is closing the connection early, but tomcat 
somehow isn't signalled about that event and switches on a random byte 
from the message the AJP connector was sending. Anyway, the result is 
that the post request continues to be processed, but with missing 
request parameters.


Setting the timeout value too low is of course our fault, but perhaps it 
would be better if Tomcat could just abort the request and throw some 
exception?


Kind regards,
Arjan Tijms





--
It's a cult. If you've coded for any length of time, you've run across someone 
from this warped brotherhood. Their creed: if you can write complicated code, 
you must be good.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat looses POST parameters

2007-08-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Arjan,

M4N - Arjan Tijms wrote:
> Christopher Schultz wrote:
> 
>> Uh, I'm not really sure what you're saying, here. TCs auth code /will/
>> run before any of your code if you are using it.
>>
> Of course, but that's exactly what I'm saying. If Tomcat's auth code
> runs first, than the possible error would be in Tomcat's code.

Yes, but you're not using Tomcat for authentication, so Tomcat's code
/never/ runs.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG1F1o9CaO5/Lv0PARAgenAKCz1f9XeVxIBmiGftOJTbtp1+ARwwCdHKnb
qfiatEk+8Ba/N3nsJDlbbYw=
=YzGD
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat looses POST parameters

2007-08-28 Thread M4N - Arjan Tijms

Christopher Schultz wrote:


Uh, I'm not really sure what you're saying, here. TCs auth code /will/
run before any of your code if you are using it.

Of course, but that's exactly what I'm saying. If Tomcat's auth code 
runs first, than the possible error would be in Tomcat's code.



Do you implement authentication and authorization as a filter? Or, do
you have something else going on? I'm asking because it's possible your
own authentication mechanism has a bug or two that is somehow killing
the request parameters.
 

The custom authentication method is filter based. I installed the filter 
that prints the request parameters to the log as the very first filter 
in the chain; this means it gets called before any other filter does. 
So, the logging is the very first piece of my code that gets called when 
processing a single request.


Like I said earlier: in the AJP connector the parameters are there and 
at the first opportunity that my own code can run they are gone. They 
get lost somewhere in between. Since none of my code runs in between, 
it's hard to say what happens. I might try building a debug Tomcat that 
does some extra logging at key points in the request handling, but for a 
high volume production server this would really be my last resort.


Kind regards,
Arjan Tijms


--
It's a cult. If you've coded for any length of time, you've run across someone 
from this warped brotherhood. Their creed: if you can write complicated code, 
you must be good.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat looses POST parameters

2007-08-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Arjan,

M4N - Arjan Tijms wrote:
> Christopher Schultz wrote:
>> No, your filter will only be executed after the login has been handled,
>> since Tomcat's authentication is done using a valve, which is processed
>> before any filters.
>
> I see. The thing is, I'm not using any container managed authentication
> at all. All authentication is handled by the application.

Oh, well, that's different, then ;)

> But even if I
> used the container's (Tomcat's) authentication, then it still would be
> Tomcat's code than ran before my code, right?


Uh, I'm not really sure what you're saying, here. TCs auth code /will/
run before any of your code if you are using it. Since you're not, your
own auth code will run whenever you have configured it to do so.

Do you implement authentication and authorization as a filter? Or, do
you have something else going on? I'm asking because it's possible your
own authentication mechanism has a bug or two that is somehow killing
the request parameters.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG1CG79CaO5/Lv0PARAnCgAJ4pAKGKhNWpnd1FMl1vut8flBZ+MACgglvW
otYD3KMYiEZ7kw4dDuMs+dI=
=tPZ6
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat looses POST parameters

2007-08-27 Thread Mark Thomas
M4N - Arjan Tijms wrote:
> Hi,
> 
> c. wrote:
> 
>> I experienced some problems with missing POST parameters.  I'm not sure
>> where the problem lay but I was using apache 2, tomcat 5.5, mod_ajp_proxy
>> and dwr.  I upgraded to tomcat 6 using mod_proxy and NIO and have not
>> seen
>> the problem since.
>>  
>>
> Chris, this sounds very interesting and is consistent with what I
> understood about possible race problems in Tomcat 5.5 being (perhaps)
> fixed in Tomcat 6. Unfortunately I can not upgrade a live production
> server overnight, certainly not with a whole major version, but I'll
> definitely will push for an early upgrade. In the mean time I will try
> if 5.5.23 or better the soon to be released 5.5.25 makes any difference.

Just a random thought. Might this (fixed in 5.5.21 onwards) be the
source of the problem? You might want to read the thread on the users
list that lead to this getting fixed as well.

http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java?r1=490093&r2=491307&diff_format=h
http://marc.theaimsgroup.com/?t=11655879003&r=1&w=2

Mark

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat looses POST parameters

2007-08-27 Thread M4N - Arjan Tijms

Hi,

Christopher Schultz wrote:


No, your filter will only be executed after the login has been handled,
since Tomcat's authentication is done using a valve, which is processed
before any filters.
 

I see. The thing is, I'm not using any container managed authentication 
at all. All authentication is handled by the application. But even if I 
used the container's (Tomcat's) authentication, then it still would be 
Tomcat's code than ran before my code, right?


Grtz,
Arjan Tijms

--
It's a cult. If you've coded for any length of time, you've run across someone 
from this warped brotherhood. Their creed: if you can write complicated code, 
you must be good.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat looses POST parameters

2007-08-27 Thread M4N - Arjan Tijms

Hi,

c. wrote:


I experienced some problems with missing POST parameters.  I'm not sure
where the problem lay but I was using apache 2, tomcat 5.5, mod_ajp_proxy
and dwr.  I upgraded to tomcat 6 using mod_proxy and NIO and have not seen
the problem since.
 

Chris, this sounds very interesting and is consistent with what I 
understood about possible race problems in Tomcat 5.5 being (perhaps) 
fixed in Tomcat 6. Unfortunately I can not upgrade a live production 
server overnight, certainly not with a whole major version, but I'll 
definitely will push for an early upgrade. In the mean time I will try 
if 5.5.23 or better the soon to be released 5.5.25 makes any difference.


Grtz,
Arjan Tijms

--
It's a cult. If you've coded for any length of time, you've run across someone 
from this warped brotherhood. Their creed: if you can write complicated code, 
you must be good.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat looses POST parameters

2007-08-27 Thread David Delbecq
Just a point worth if it's related to FORM login; The form login does 
have a maximum request size that is stored in user session and restored 
after login as original request. If request was too big (fileupload, 
article submissions, etc), it might get dropped. I think the default max 
is about 100K.


Also, check it's not the user having something like fasterfox or another 
web "accelerator" installed. Those are agressive and can sometimes mess 
up navigation.


As also suggested, if you have apache front end, check it does not have  
some special configuration that would drop parameter at some point. And 
check there is no proxy / active firewall that could badly alter request...


And check it's not simply user typing "enter" in url bar to refresh a 
POST page :)



Christopher Schultz a écrit :

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Arjan,

M4N - Arjan Tijms wrote:
  

It's a good thought, and such a thing could have happened. Only in this
case the parameters are already missing before any request processing is
being done.



No, your filter will only be executed after the login has been handled,
since Tomcat's authentication is done using a valve, which is processed
before any filters.

If you are experiencing it yourself directly, you can verify that it
happens even when a login is not involved.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG0yf79CaO5/Lv0PARAuXEAJ9+knXYy6mNmilh2dgWeSfmRoT/OACeI8ev
63G7rl+mlc5glAWDnuhxM7M=
=hb97
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat looses POST parameters

2007-08-27 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Arjan,

M4N - Arjan Tijms wrote:
> It's a good thought, and such a thing could have happened. Only in this
> case the parameters are already missing before any request processing is
> being done.

No, your filter will only be executed after the login has been handled,
since Tomcat's authentication is done using a valve, which is processed
before any filters.

If you are experiencing it yourself directly, you can verify that it
happens even when a login is not involved.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG0yf79CaO5/Lv0PARAuXEAJ9+knXYy6mNmilh2dgWeSfmRoT/OACeI8ev
63G7rl+mlc5glAWDnuhxM7M=
=hb97
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat looses POST parameters

2007-08-27 Thread c .
Not sure if this will help but I thought I'd pass it on.

I experienced some problems with missing POST parameters.  I'm not sure
where the problem lay but I was using apache 2, tomcat 5.5, mod_ajp_proxy
and dwr.  I upgraded to tomcat 6 using mod_proxy and NIO and have not seen
the problem since.

Chris.


On 8/27/07, M4N - Arjan Tijms <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Ben Souther wrote:
>
> >One thing that you've go on your side, as far as isolating the problem
> >is concerned, is that Tomcat is a busy project and has thousands of
> >users.  If it had a bug that caused it to miss or drop form parameters
> >hundreds or thousands of apps would be breaking right now and this, the
> >dev list, and bugzilla would be getting flooded with reports.
> >
> >
> I absolutely agree with you. It's the exact same line of reasoning that
> went on during our internal discussions about this problem.
>
> However, the thing is that by far not all post parameters are dropped. I
> happened to stumble about it at first when inspecting the log files
> manually for some other problems. There was a log line that showed an
> empty post was done, for a page of which I knew this was impossible. I
> did some grepping on the logs and discovered a few hundred of occasions
> where it happened. Between thousands upon thousands of requests
> something like this might go unnoticed for a long time.
>
> When post parameters are dropped, most users would either see nothing
> happening and simply click again, or some error page comes up, they use
> the back button and click again.
>
> >The fact that they're not, is a pretty good indicator telling you that
> >the problem is not with Tomcat.  If it is a problem with Tomcat, you're
> >doing something very rare to get this bug to surface.
> >
> >
> Indeed. I wonder what that could be. We're running on a quad core
> server. Maybe it's some race condition?
>
> Kind regards,
> Arjan Tijms
>
> --
> It's a cult. If you've coded for any length of time, you've run across
> someone from this warped brotherhood. Their creed: if you can write
> complicated code, you must be good.
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Tomcat looses POST parameters

2007-08-27 Thread M4N - Arjan Tijms

Hi,

Ben Souther wrote:


One thing that you've go on your side, as far as isolating the problem
is concerned, is that Tomcat is a busy project and has thousands of
users.  If it had a bug that caused it to miss or drop form parameters
hundreds or thousands of apps would be breaking right now and this, the
dev list, and bugzilla would be getting flooded with reports.
 

I absolutely agree with you. It's the exact same line of reasoning that 
went on during our internal discussions about this problem.


However, the thing is that by far not all post parameters are dropped. I 
happened to stumble about it at first when inspecting the log files 
manually for some other problems. There was a log line that showed an 
empty post was done, for a page of which I knew this was impossible. I 
did some grepping on the logs and discovered a few hundred of occasions 
where it happened. Between thousands upon thousands of requests 
something like this might go unnoticed for a long time.


When post parameters are dropped, most users would either see nothing 
happening and simply click again, or some error page comes up, they use 
the back button and click again.



The fact that they're not, is a pretty good indicator telling you that
the problem is not with Tomcat.  If it is a problem with Tomcat, you're
doing something very rare to get this bug to surface.
 

Indeed. I wonder what that could be. We're running on a quad core 
server. Maybe it's some race condition?


Kind regards,
Arjan Tijms

--
It's a cult. If you've coded for any length of time, you've run across someone 
from this warped brotherhood. Their creed: if you can write complicated code, 
you must be good.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat looses POST parameters

2007-08-27 Thread M4N - Arjan Tijms

Hi,

Christopher Schultz wrote:


The problem I'm encountering is that for a percentage of the POST
requests, Tomcat seems to loose all parameters.
   



Are you observing this in log files, or by actually doing it and having
it fail.



Both actually.

I have installed a top-level filter, and the very first thing it does 
when its doFilter method is being called is calling 
request.getParameterMap(), iterating over its values, and logging the 
name and first chars of each parameter. Logging happens to a standard 
java.Util.logging.Logger.


Before this filter is being called, none of my own code has been 
executed in the context of the current request.


After that, if the page required a specific parameter an error is being 
generated. This indeed happens. Other pages ignore the request if 
parameters are missing. I have observed this too.



I'm wondering if
something is happening to the saved request during the login.
 

It's a good thought, and such a thing could have happened. Only in this 
case the parameters are already missing before any request processing is 
being done. Also, 99.9% of the requests execute well, only in 0.1 orso 
the parameters are missing. That doesn't sound like much but 0.1% of a 
high traffic site is still a lot of requests. (I made the 0.1 number up 
and haven't calculated it exactly, but it's a small number)


Kind regards,
Arjan Tijms




Just looking for other possibilities.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG0vPr9CaO5/Lv0PARAkCpAKCjmbuGvcENYdmmeJ0I64AJuBsjlgCgri5D
9BOdjvmdWbarm3liy6EHjfk=
=GbyQ
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




--
It's a cult. If you've coded for any length of time, you've run across someone 
from this warped brotherhood. Their creed: if you can write complicated code, 
you must be good.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat looses POST parameters

2007-08-27 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Arjan,

M4N - Arjan Tijms wrote:
> The problem I'm encountering is that for a percentage of the POST
> requests, Tomcat seems to loose all parameters.

Are you observing this in log files, or by actually doing it and having
it fail. I'm asking because it might be related to saved requests being
re-processed by Tomcat after a login.

For instance, if the user isn't logged-in and requests a protected
resource, the original request is saved and the login form is presented.
Upon successful login, the original request is resumed. I'm wondering if
something is happening to the saved request during the login.

Just looking for other possibilities.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG0vPr9CaO5/Lv0PARAkCpAKCjmbuGvcENYdmmeJ0I64AJuBsjlgCgri5D
9BOdjvmdWbarm3liy6EHjfk=
=GbyQ
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat looses POST parameters

2007-08-27 Thread Ben Souther
One thing that you've go on your side, as far as isolating the problem
is concerned, is that Tomcat is a busy project and has thousands of
users.  If it had a bug that caused it to miss or drop form parameters
hundreds or thousands of apps would be breaking right now and this, the
dev list, and bugzilla would be getting flooded with reports.

The fact that they're not, is a pretty good indicator telling you that
the problem is not with Tomcat.  If it is a problem with Tomcat, you're
doing something very rare to get this bug to surface.



On Mon, 2007-08-27 at 10:48, M4N - Arjan Tijms wrote:
> Hehl, Thomas wrote:
> 
> >I've read other responses and don't know much more about what to tell you.
> >
> >It seems to be the first order of business is to figure out how to
> >consistently re-create the problem.
> >
> Indeed. We've been trying that for a couple of weeks now but no luck 
> yet. As of now the only thing we can do is indeed fire a high load on 
> the system, and trace back in the log which instances went wrong.
> 
> The seemingly randomness of the problem is making this quite hard. For 
> instance, at one moment the problem seemed to be reproducable on a 
> certain page in a certain account. However when I plugged the laptop 
> with which I could reproduce the problem to an internet connection at 
> another location, the problem could not be reproduced.
> 
> >If this doesn't re-create the issue, then the problem is probably outside of
> >tomcat's realm.
> >  
> >
> 
> I'm not sure. Even if it would be MyFaces that sometimes causes invalid 
> POST requests to happen, it's Tomcat that drops them without giving any 
> warning or error message. Don't forget, before the request hits the 
> MyFaces filter, we're still in 'plain Tomcat' (for lack of a better 
> term). At the top of the filter chain I installed a servlet filter that 
> only prints the post parameters. There is no MyFaces or anything else 
> active at that point.
> 
> Kind regards,
> Arjan Tijms
> 
> 
> 
> 
> > Something's going on in your MyFaces or some such.
> >
> >Sorry not more help.
> >
> >
> >-Original Message-
> >From: M4N - Arjan Tijms [mailto:[EMAIL PROTECTED] 
> >Sent: Friday, August 24, 2007 12:43 PM
> >To: users@tomcat.apache.org
> >Subject: Tomcat looses POST parameters
> >
> >Hi,
> >
> >We're hosting a fairly high traffic web application based on Tomcat. 
> >It's running on Debian-Etch, JDK 5.0U10 and Tomcat 5.5.20. We're using 
> >Apache as a front-end with the AJP connector.
> >
> >The problem I'm encountering is that for a percentage of the POST 
> >requests, Tomcat seems to loose all parameters. Our application uses a 
> >filter that logs the (first few characters of) post parameters. This 
> >filter is installed as the first one in the filter chain, so nothing 
> >else can interfere with it. For requests originating from pages which 
> >logically can not produce such an empty post request, the log clearly 
> >shows there are no parameters.
> >
> >The problem is often fairly random, although I have been able to 
> >consistently reproduce it on one occasion. Using a proxy server to 
> >monitor what my browser was sending, I clearly saw in the raw HTTP 
> >headers that parameters where being send, yet they weren't received in 
> >Tomcat. I also enabled TCP/IP packet logging at the server for a while. 
> >For requests that appeared with empty parameters in Tomcat, the tcp/ip 
> >log showed the parameters did arrive at the server.
> >
> >Next to that I enabled debug logging in the AJP connector, and again the 
> >POST parameters were in the HTTP request but not present when the 
> >mentioned filter logged the request in Tomcat.
> >
> >I did notice though that the overwhelming majority of the "empty post" 
> >requests concerned Faces requests (we're using MyFaces 1.1.4). We store 
> >state on client, so typical Faces HTTP post requests are at least 22KB 
> >in size. Nevertheless, thousands of requests from the same pages from 
> >all kinds of different browsers arrive with the post parameters intact.
> >
> >I'm at a loss here how to proceed. Naturally I could change JSF to keep 
> >state on server, but because of the way some custom components work 
> >that's currently not an option. It would also not really solve the 
> >underlying problem of course.
> >
> >Any help would be greatly appreciated
> >
> >
> >Kind regards,
> >Arjan Tijms
> >
> >  
> >


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat looses POST parameters

2007-08-27 Thread M4N - Arjan Tijms

Hehl, Thomas wrote:


I've read other responses and don't know much more about what to tell you.

It seems to be the first order of business is to figure out how to
consistently re-create the problem.

Indeed. We've been trying that for a couple of weeks now but no luck 
yet. As of now the only thing we can do is indeed fire a high load on 
the system, and trace back in the log which instances went wrong.


The seemingly randomness of the problem is making this quite hard. For 
instance, at one moment the problem seemed to be reproducable on a 
certain page in a certain account. However when I plugged the laptop 
with which I could reproduce the problem to an internet connection at 
another location, the problem could not be reproduced.



If this doesn't re-create the issue, then the problem is probably outside of
tomcat's realm.
 



I'm not sure. Even if it would be MyFaces that sometimes causes invalid 
POST requests to happen, it's Tomcat that drops them without giving any 
warning or error message. Don't forget, before the request hits the 
MyFaces filter, we're still in 'plain Tomcat' (for lack of a better 
term). At the top of the filter chain I installed a servlet filter that 
only prints the post parameters. There is no MyFaces or anything else 
active at that point.


Kind regards,
Arjan Tijms





Something's going on in your MyFaces or some such.

Sorry not more help.


-Original Message-
From: M4N - Arjan Tijms [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 24, 2007 12:43 PM

To: users@tomcat.apache.org
Subject: Tomcat looses POST parameters

Hi,

We're hosting a fairly high traffic web application based on Tomcat. 
It's running on Debian-Etch, JDK 5.0U10 and Tomcat 5.5.20. We're using 
Apache as a front-end with the AJP connector.


The problem I'm encountering is that for a percentage of the POST 
requests, Tomcat seems to loose all parameters. Our application uses a 
filter that logs the (first few characters of) post parameters. This 
filter is installed as the first one in the filter chain, so nothing 
else can interfere with it. For requests originating from pages which 
logically can not produce such an empty post request, the log clearly 
shows there are no parameters.


The problem is often fairly random, although I have been able to 
consistently reproduce it on one occasion. Using a proxy server to 
monitor what my browser was sending, I clearly saw in the raw HTTP 
headers that parameters where being send, yet they weren't received in 
Tomcat. I also enabled TCP/IP packet logging at the server for a while. 
For requests that appeared with empty parameters in Tomcat, the tcp/ip 
log showed the parameters did arrive at the server.


Next to that I enabled debug logging in the AJP connector, and again the 
POST parameters were in the HTTP request but not present when the 
mentioned filter logged the request in Tomcat.


I did notice though that the overwhelming majority of the "empty post" 
requests concerned Faces requests (we're using MyFaces 1.1.4). We store 
state on client, so typical Faces HTTP post requests are at least 22KB 
in size. Nevertheless, thousands of requests from the same pages from 
all kinds of different browsers arrive with the post parameters intact.


I'm at a loss here how to proceed. Naturally I could change JSF to keep 
state on server, but because of the way some custom components work 
that's currently not an option. It would also not really solve the 
underlying problem of course.


Any help would be greatly appreciated


Kind regards,
Arjan Tijms

 




--
It's a cult. If you've coded for any length of time, you've run across someone 
from this warped brotherhood. Their creed: if you can write complicated code, 
you must be good.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat looses POST parameters

2007-08-27 Thread Hehl, Thomas
I've read other responses and don't know much more about what to tell you.

It seems to be the first order of business is to figure out how to
consistently re-create the problem. Have you tried running requests from a
load testing app? Try banging on tomcat directly, then on Apache if no luck
there. 

If this doesn't re-create the issue, then the problem is probably outside of
tomcat's realm. Something's going on in your MyFaces or some such.

Sorry not more help.


-Original Message-
From: M4N - Arjan Tijms [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 24, 2007 12:43 PM
To: users@tomcat.apache.org
Subject: Tomcat looses POST parameters

Hi,

We're hosting a fairly high traffic web application based on Tomcat. 
It's running on Debian-Etch, JDK 5.0U10 and Tomcat 5.5.20. We're using 
Apache as a front-end with the AJP connector.

The problem I'm encountering is that for a percentage of the POST 
requests, Tomcat seems to loose all parameters. Our application uses a 
filter that logs the (first few characters of) post parameters. This 
filter is installed as the first one in the filter chain, so nothing 
else can interfere with it. For requests originating from pages which 
logically can not produce such an empty post request, the log clearly 
shows there are no parameters.

The problem is often fairly random, although I have been able to 
consistently reproduce it on one occasion. Using a proxy server to 
monitor what my browser was sending, I clearly saw in the raw HTTP 
headers that parameters where being send, yet they weren't received in 
Tomcat. I also enabled TCP/IP packet logging at the server for a while. 
For requests that appeared with empty parameters in Tomcat, the tcp/ip 
log showed the parameters did arrive at the server.

Next to that I enabled debug logging in the AJP connector, and again the 
POST parameters were in the HTTP request but not present when the 
mentioned filter logged the request in Tomcat.

I did notice though that the overwhelming majority of the "empty post" 
requests concerned Faces requests (we're using MyFaces 1.1.4). We store 
state on client, so typical Faces HTTP post requests are at least 22KB 
in size. Nevertheless, thousands of requests from the same pages from 
all kinds of different browsers arrive with the post parameters intact.

I'm at a loss here how to proceed. Naturally I could change JSF to keep 
state on server, but because of the way some custom components work 
that's currently not an option. It would also not really solve the 
underlying problem of course.

Any help would be greatly appreciated


Kind regards,
Arjan Tijms

-- 
It's a cult. If you've coded for any length of time, you've run across
someone from this warped brotherhood. Their creed: if you can write
complicated code, you must be good.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat looses POST parameters

2007-08-27 Thread M4N - Arjan Tijms

Hi,

thebugslayer wrote:


I would suggest a TCP sniff tool like one found from axis or grinder
to peek at your http track to be sure.
 

Thanks for your reply. The TCP Sniffer from The Grinder is an HTTP 
proxy, and I already tried that:



Using a proxy server to
monitor what my browser was sending, I clearly saw in the raw HTTP
headers that parameters where being send, yet they weren't received in
Tomcat.

As I wrote in my original mail, I traced the problem two levels deeper; 
both at the TCP/IP level at the server and in the connector between 
Apache and Tomcat. Post parameters are still there, but are gone once in 
Tomcat.


Grtz,
Arjan Tijms



On 8/24/07, M4N - Arjan Tijms <[EMAIL PROTECTED]> wrote:
 


Hi,

We're hosting a fairly high traffic web application based on Tomcat.
It's running on Debian-Etch, JDK 5.0U10 and Tomcat 5.5.20. We're using
Apache as a front-end with the AJP connector.

The problem I'm encountering is that for a percentage of the POST
requests, Tomcat seems to loose all parameters. Our application uses a
filter that logs the (first few characters of) post parameters. This
filter is installed as the first one in the filter chain, so nothing
else can interfere with it. For requests originating from pages which
logically can not produce such an empty post request, the log clearly
shows there are no parameters.

The problem is often fairly random, although I have been able to
consistently reproduce it on one occasion. Using a proxy server to
monitor what my browser was sending, I clearly saw in the raw HTTP
headers that parameters where being send, yet they weren't received in
Tomcat. I also enabled TCP/IP packet logging at the server for a while.
For requests that appeared with empty parameters in Tomcat, the tcp/ip
log showed the parameters did arrive at the server.

Next to that I enabled debug logging in the AJP connector, and again the
POST parameters were in the HTTP request but not present when the
mentioned filter logged the request in Tomcat.

I did notice though that the overwhelming majority of the "empty post"
requests concerned Faces requests (we're using MyFaces 1.1.4). We store
state on client, so typical Faces HTTP post requests are at least 22KB
in size. Nevertheless, thousands of requests from the same pages from
all kinds of different browsers arrive with the post parameters intact.

I'm at a loss here how to proceed. Naturally I could change JSF to keep
state on server, but because of the way some custom components work
that's currently not an option. It would also not really solve the
underlying problem of course.

Any help would be greatly appreciated


Kind regards,
Arjan Tijms

--
It's a cult. If you've coded for any length of time, you've run across someone 
from this warped brotherhood. Their creed: if you can write complicated code, 
you must be good.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


   




 




--
It's a cult. If you've coded for any length of time, you've run across someone 
from this warped brotherhood. Their creed: if you can write complicated code, 
you must be good.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat looses POST parameters

2007-08-27 Thread M4N - Arjan Tijms

Hi,


Martin Gainty wrote:


Fiddler lets you construct the request
http://www.fiddlertool.com/fiddler/



Thanks for your suggestion, but I already tried that:


Using a proxy server to
monitor what my browser was sending, I clearly saw in the raw HTTP
headers that parameters where being send


In my case I was using Burpproxy, which seems to do more or less the 
same as fiddler.



Grtz,
Arjan Tijms





- Original Message - From: "thebugslayer" 
<[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Sunday, August 26, 2007 8:06 PM
Subject: Re: Tomcat looses POST parameters



I would suggest a TCP sniff tool like one found from axis or grinder
to peek at your http track to be sure.

On 8/24/07, M4N - Arjan Tijms <[EMAIL PROTECTED]> wrote:


Hi,

We're hosting a fairly high traffic web application based on Tomcat.
It's running on Debian-Etch, JDK 5.0U10 and Tomcat 5.5.20. We're using
Apache as a front-end with the AJP connector.

The problem I'm encountering is that for a percentage of the POST
requests, Tomcat seems to loose all parameters. Our application uses a
filter that logs the (first few characters of) post parameters. This
filter is installed as the first one in the filter chain, so nothing
else can interfere with it. For requests originating from pages which
logically can not produce such an empty post request, the log clearly
shows there are no parameters.

The problem is often fairly random, although I have been able to
consistently reproduce it on one occasion. Using a proxy server to
monitor what my browser was sending, I clearly saw in the raw HTTP
headers that parameters where being send, yet they weren't received in
Tomcat. I also enabled TCP/IP packet logging at the server for a while.
For requests that appeared with empty parameters in Tomcat, the tcp/ip
log showed the parameters did arrive at the server.

Next to that I enabled debug logging in the AJP connector, and again 
the

POST parameters were in the HTTP request but not present when the
mentioned filter logged the request in Tomcat.

I did notice though that the overwhelming majority of the "empty post"
requests concerned Faces requests (we're using MyFaces 1.1.4). We store
state on client, so typical Faces HTTP post requests are at least 22KB
in size. Nevertheless, thousands of requests from the same pages from
all kinds of different browsers arrive with the post parameters intact.

I'm at a loss here how to proceed. Naturally I could change JSF to keep
state on server, but because of the way some custom components work
that's currently not an option. It would also not really solve the
underlying problem of course.

Any help would be greatly appreciated


Kind regards,
Arjan Tijms

--
It's a cult. If you've coded for any length of time, you've run 
across someone from this warped brotherhood. Their creed: if you can 
write complicated code, you must be good.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
/bugslayer

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
It's a cult. If you've coded for any length of time, you've run across someone 
from this warped brotherhood. Their creed: if you can write complicated code, 
you must be good.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat looses POST parameters

2007-08-26 Thread Martin Gainty

Fiddler lets you construct the request
http://www.fiddlertool.com/fiddler/

M--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

- Original Message - 
From: "thebugslayer" <[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Sunday, August 26, 2007 8:06 PM
Subject: Re: Tomcat looses POST parameters



I would suggest a TCP sniff tool like one found from axis or grinder
to peek at your http track to be sure.

On 8/24/07, M4N - Arjan Tijms <[EMAIL PROTECTED]> wrote:

Hi,

We're hosting a fairly high traffic web application based on Tomcat.
It's running on Debian-Etch, JDK 5.0U10 and Tomcat 5.5.20. We're using
Apache as a front-end with the AJP connector.

The problem I'm encountering is that for a percentage of the POST
requests, Tomcat seems to loose all parameters. Our application uses a
filter that logs the (first few characters of) post parameters. This
filter is installed as the first one in the filter chain, so nothing
else can interfere with it. For requests originating from pages which
logically can not produce such an empty post request, the log clearly
shows there are no parameters.

The problem is often fairly random, although I have been able to
consistently reproduce it on one occasion. Using a proxy server to
monitor what my browser was sending, I clearly saw in the raw HTTP
headers that parameters where being send, yet they weren't received in
Tomcat. I also enabled TCP/IP packet logging at the server for a while.
For requests that appeared with empty parameters in Tomcat, the tcp/ip
log showed the parameters did arrive at the server.

Next to that I enabled debug logging in the AJP connector, and again the
POST parameters were in the HTTP request but not present when the
mentioned filter logged the request in Tomcat.

I did notice though that the overwhelming majority of the "empty post"
requests concerned Faces requests (we're using MyFaces 1.1.4). We store
state on client, so typical Faces HTTP post requests are at least 22KB
in size. Nevertheless, thousands of requests from the same pages from
all kinds of different browsers arrive with the post parameters intact.

I'm at a loss here how to proceed. Naturally I could change JSF to keep
state on server, but because of the way some custom components work
that's currently not an option. It would also not really solve the
underlying problem of course.

Any help would be greatly appreciated


Kind regards,
Arjan Tijms

--
It's a cult. If you've coded for any length of time, you've run across 
someone from this warped brotherhood. Their creed: if you can write 
complicated code, you must be good.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
/bugslayer

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat looses POST parameters

2007-08-26 Thread thebugslayer
I would suggest a TCP sniff tool like one found from axis or grinder
to peek at your http track to be sure.

On 8/24/07, M4N - Arjan Tijms <[EMAIL PROTECTED]> wrote:
> Hi,
>
> We're hosting a fairly high traffic web application based on Tomcat.
> It's running on Debian-Etch, JDK 5.0U10 and Tomcat 5.5.20. We're using
> Apache as a front-end with the AJP connector.
>
> The problem I'm encountering is that for a percentage of the POST
> requests, Tomcat seems to loose all parameters. Our application uses a
> filter that logs the (first few characters of) post parameters. This
> filter is installed as the first one in the filter chain, so nothing
> else can interfere with it. For requests originating from pages which
> logically can not produce such an empty post request, the log clearly
> shows there are no parameters.
>
> The problem is often fairly random, although I have been able to
> consistently reproduce it on one occasion. Using a proxy server to
> monitor what my browser was sending, I clearly saw in the raw HTTP
> headers that parameters where being send, yet they weren't received in
> Tomcat. I also enabled TCP/IP packet logging at the server for a while.
> For requests that appeared with empty parameters in Tomcat, the tcp/ip
> log showed the parameters did arrive at the server.
>
> Next to that I enabled debug logging in the AJP connector, and again the
> POST parameters were in the HTTP request but not present when the
> mentioned filter logged the request in Tomcat.
>
> I did notice though that the overwhelming majority of the "empty post"
> requests concerned Faces requests (we're using MyFaces 1.1.4). We store
> state on client, so typical Faces HTTP post requests are at least 22KB
> in size. Nevertheless, thousands of requests from the same pages from
> all kinds of different browsers arrive with the post parameters intact.
>
> I'm at a loss here how to proceed. Naturally I could change JSF to keep
> state on server, but because of the way some custom components work
> that's currently not an option. It would also not really solve the
> underlying problem of course.
>
> Any help would be greatly appreciated
>
>
> Kind regards,
> Arjan Tijms
>
> --
> It's a cult. If you've coded for any length of time, you've run across 
> someone from this warped brotherhood. Their creed: if you can write 
> complicated code, you must be good.
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
/bugslayer

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]