tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Changing the packetSize in AJP connector causes 503 Internal Server Error in Tomcat 9
Date Tue, 08 May 2018 16:59:14 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Mark,

On 5/3/18 5:41 AM, Mark Thomas wrote:
> On 03/05/18 10:36, Mark Thomas wrote:
>> On 03/05/18 09:48, Andreas Bergander wrote:
>>> Hi,
>>> 
>>> I've upgrade from Tomcat 8.5 to 9.0.7 and I've got an issue
>>> regarding the packet size in the AJP connector. It seems like
>>> only the default value (8192) works now. If I set it to
>>> anything greater than that I'll get 503 Internal Server Error
>>> when trying to access a web page. It worked fine in 8.5 but now
>>> I get EOFExceptions in the AJP processor. Has anything changed
>>> regarding the packet size? Should it still work with values
>>> greater than 8192?
>> 
>> It should work but I can confirm that it currently does not. 
>> Investigating now...
> 
> That was easy :)
> 
> You need to remember to change the packet size to be exactly the
> same value on both Tomcat and httpd.
> 
> When I changed it just on Tomcat (to 20000), I saw 503 errors from 
> httpd. Once I changed them both to be 20000, everything worked as
> expected.

This bites enough people that it may be worth correcting, or at least
changing the behavior when it happens.

AJP already encodes the packet-size in the header of each packet. Why
not simply compare that to the MaxPacketSize on the Tomcat side and
issue a useful error message instead of whatever is currently happening?

Andreas, what error message(s) do you see in the log(s) on the Tomcat
side when this happens?

Or maybe even auto-size the buffer on the Tomcat side to be nice about i
t?

Oddly enough, the AJP documentation[1] says that the practical limit
of the packet size is 8k, though I and probably many others have
happily been using higher values for quite some time.

- -chris

[1] http://tomcat.apache.org/connectors-doc/ajp/ajpv13a.html
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlrx12IACgkQHPApP6U8
pFgtAw/+I0Wv4uMERn01xjvuokEnv5daGe0QKTV7Gw6QYMQqb0hJM29yseRmMzDm
NXMFyyaKb5URdrTcxk9Mt5nQVPl0vc8Qmf7CbK8rqntrUN//eGfSdsXxWi987SR6
9bF5/C0+b/KcXlPuT2FRejBsZBwI/mnktWyuBBJ5UHl23q6pL6WmuTjz7PrEVF9O
QfzA6ztlZN3LzICaNVC/h4zmMm+rwR7zL32v/lO3wve9AvrlZIpNI83e0bhYHdm3
TWaF3PCwQGgRKoWPFRw4Hv4Y+VHyMyaNtjc4nKRszk5SwyO9vgiU/VzdRiX+0Lw4
B716nX7E3ETUYYHMr7d02MRhhNoxttc0WhKCqhMMjRskwvCljbtkhyvt7NYR2Zsc
xmMxcPRNjUCxKz01ZWLakZ73s0CvuKSBClRAjDxWoYBmOpz88PHr4YeO4l9ME0Du
fwcnMuRvyNlbsZMz6jAQqDEwfqybvmWTdDGDFlj4+SQxX+Qf5wytbQ4tgTXvYPmx
UiyCjjRi/hLCxxkNvMf0mOcN8nair56Qly6Z1T+JR6ztbSugRAhmZAx8oHtL8HKF
QrR5yVuGJyBdysbkxq1q29bHt9bGHpnzHsifZjHGNk3tQiLWZ5aKkguv0CizmPm8
y7tAAYL9feAkaybeUw7BBb13gANLOpfIQi1NC6iavnrOsG13gBU=
=rEkE
-----END PGP SIGNATURE-----

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


Mime
View raw message