You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Stephen Nelson-Smith <sa...@gmail.com> on 2008/09/30 21:12:05 UTC

Tomcat getting insufficient POST data

I have an application that parses xml.  I send it xml using another
little app, which makes an http post.  The averge size of a post is
about 3000 characters.  Here is the significant information:

* I have a system which is being replaced, which consists of RHEL3,
httpd 2.0, mod_jk and Tomcat 6.0.16
* I have a new system, to replace the old one, which consists of 3 x
Tomcat 6.0.16 machines, to be load balanced.

Testing:

* Submitting straight to one of the new tomcat 6.0.16 machines, over
http, works without fail - the XML is parsed.
* Submitting to the old system (httpd 2.0 using mod_jk, with tomcat
6.0.16 on  the same box) works fine.
* Submitting to a separate machine, running httpd 2.2, and  using
mod_proxy_ajp to proxy to tomcat 6.0.16 only works if the POST is
smaller than about 1600 bytes, otherwise the data appears to be
unterminated to the app.  Tcpdump shows where the data continues into
a second packet, and this is exactly where the app says the xml is
unterminated.
* Submitting to a separate machine using nginx or httpd, and proxying
via http to a tomcat machinen works fine, only the very first time
after a tomcat restart.  Thereafter it fails, in the same way -
complaining about unterminated XML.  As soon as Tomcat is restarted,
the very next one works, and then fails again thereafter.

Can anyone see a pattern here?  I can't see a way through any more,
and it's looking like we can't find any way to load-balance, or even
simply proxy to Tomcat reliably.

I'm at my wit's end... so any help would be most gratefully received.

S.

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


Re: Tomcat getting insufficient POST data

Posted by Stephen Nelson-Smith <sa...@gmail.com>.
Hello,

> Yes - I'll package 6.0.18 this afternoon and test it this evening.

Initial tests look positive - will do more extensive tests this
morning.  Thanks very much for the suggestion.

S.

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


Re: Tomcat getting insufficient POST data

Posted by Stephen Nelson-Smith <sa...@gmail.com>.
Hi Rainer,
>  This reminds me of some problem we found when fixing BZ 44494. Could you
> please try with 6.0.18? Your symptoms don't really fit 44494 exactly, but
> there's a chance 6.0.18 fixed it.

Yes - I'll package 6.0.18 this afternoon and test it this evening.

S.

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


Re: Tomcat getting insufficient POST data

Posted by Rainer Jung <ra...@kippdata.de>.
Stephen Nelson-Smith wrote:
> On Tue, Sep 30, 2008 at 8:12 PM, Stephen Nelson-Smith
> <sa...@gmail.com> wrote:
> 
>> Testing:
>>
>> * Submitting straight to one of the new tomcat 6.0.16 machines, over
>> http, works without fail - the XML is parsed.
> 
> Ok.... so now it transpires that actually direct http to Tomcat never
> worked more than once, after a tomcat restart either.  So the only
> thing that works is the mod_jk setup.
> 
> This makes me very suspicious - why would it work only once?

This reminds me of some problem we found when fixing BZ 44494. Could you 
please try with 6.0.18? Your symptoms don't really fit 44494 exactly, 
but there's a chance 6.0.18 fixed it.

Regards,

Rainer

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


Re: Tomcat getting insufficient POST data

Posted by Mark Thomas <ma...@apache.org>.
Stephen Nelson-Smith wrote:
> On Tue, Sep 30, 2008 at 8:12 PM, Stephen Nelson-Smith
> <sa...@gmail.com> wrote:
> 
>> Testing:
>>
>> * Submitting straight to one of the new tomcat 6.0.16 machines, over
>> http, works without fail - the XML is parsed.
> 
> Ok.... so now it transpires that actually direct http to Tomcat never
> worked more than once, after a tomcat restart either.  So the only
> thing that works is the mod_jk setup.
> 
> This makes me very suspicious - why would it work only once?
> 
> Can I cluster with mod_jk and apache 2.2?
Absolutely.

Have you checked that the request is valid. For example, does the content
length header agree with what you are sending?

I would use mod_proxy_http rather than mod_jk and then dig out wireshark to
see exactly what is going on.

Mark



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


Re: Tomcat getting insufficient POST data

Posted by Stephen Nelson-Smith <sa...@gmail.com>.
On Tue, Sep 30, 2008 at 8:12 PM, Stephen Nelson-Smith
<sa...@gmail.com> wrote:

> Testing:
>
> * Submitting straight to one of the new tomcat 6.0.16 machines, over
> http, works without fail - the XML is parsed.

Ok.... so now it transpires that actually direct http to Tomcat never
worked more than once, after a tomcat restart either.  So the only
thing that works is the mod_jk setup.

This makes me very suspicious - why would it work only once?

Can I cluster with mod_jk and apache 2.2?

S.

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