You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2019/03/12 15:18:38 UTC

[Bug 63257] New: AJP connector can't handle greater than 8192 bytes

https://bz.apache.org/bugzilla/show_bug.cgi?id=63257

            Bug ID: 63257
           Summary: AJP connector can't handle greater than 8192 bytes
           Product: Tomcat 9
           Version: 9.0.16
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: jeremy.scott@wisc.edu
  Target Milestone: -----

Environment:

Tomcat 9.0.16 running under OpenJDK 11.0.2+9 on Centos 7 fronted with
Apache/2.4.6, traffic sent with AJP Proxy over localhost.

(Also tested Tomcat 8.5.38... no issue there.)

In server.xml an AJP/1.3 connector is defined with parameter:

packetSize="65536"

In Apache httpd.conf for mod_proxy_ajp:

ProxyIOBufferSize 65536

ProxyPass /app ajp://127.0.0.1:4007/app retry=3


In catalina.log:

3/11/2019 4:32:08 PM[Mon Mar 11 16:32:08.795340 2019] [proxy_ajp:error] [pid
75:tid 139745006905088] AH01081: ajp_msg_check_header() incoming message is too
big 17748, max is 8192
3/11/2019 4:32:08 PM[Mon Mar 11 16:32:08.795356 2019] [proxy_ajp:error] [pid
75:tid 139745006905088] AH01031: ajp_ilink_receive() received bad header

In httpd.log:

[Mon Mar 11 11:16:42.367789 2019] [proxy:error] [pid 77:tid 140196322473728]
(111)Connection refused: AH00957: AJP: attempt to connect to 127.0.0.1:4007
(127.0.0.1) failed
[Mon Mar 11 11:16:42.367892 2019] [proxy:error] [pid 77:tid 140196322473728]
AH00959: ap_proxy_connect_backend disabling worker for (127.0.0.1) for 3s
[Mon Mar 11 11:16:42.367905 2019] [proxy_ajp:error] [pid 77:tid
140196322473728] [client x.x.x.x:44946] AH00896: failed to make connection to
backend: 127.0.0.1
[Mon Mar 11 14:59:40.048412 2019] [proxy_ajp:error] [pid 76:tid
140195995158272] [client 128.104.17.95:4256] AH00992: ajp_read_header:
ajp_ilink_receive failed, referer: ...
[Mon Mar 11 14:59:40.048446 2019] [proxy_ajp:error] [pid 76:tid
140195995158272] (120007)APR does not understand this error code: [client
x.x.x.x:4256] AH00893: dialog to 127.0.0.1:4007 (127.0.0.1) failed, referer:
...


Does not seem to matter if we remove ProxyIOBufferSize from Apache (and letting
it default to 8192)

Small app requests under 8192 bytes work, ones over do not. Again, not an issue
in Tomcat 8.5.38.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 63257] AJP connector can't handle greater than 8192 bytes

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63257

Rainer Jung <ra...@kippdata.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Rainer Jung <ra...@kippdata.de> ---
Closing as invalid, since you provided only logs from the web server, not from
Tomcat. You wrote the first snippet comes from catalina.log (Tomcat) but the
contents are obviously from an httpd error log. But the contents of the first
and of the second log snippet do not belong together.

The first log snippet, seamingly the later one, indicates that this Apache web
server was not correctly configured to handle big AJP packets.

The second log snippet indicates there was a - possibly unrelated - problem of
connecting from the Apache server to the Tomcat back end.

I suggest you present your problem to the Tomcat users mailing list. You can
reopen this issue here, once the list discussion provides evidence, tha there
is a real bug.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 63257] AJP connector can't handle greater than 8192 bytes

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63257

--- Comment #2 from jeremy.scott@wisc.edu ---
Apologies, the first log is a STDERR burp from Apache that got mixed with
catalina.log STDERR, not catalina.log.

We did some more investigation and found that the Apache setting that enables
packets > 8192 (ProxyIOBufferSize 65536) was not going into effect because it
was wrapped in an <IfModule ... > condition. (The module is loaded but we are
investigating why the condition isn't satisfied.) Tomcat 8.5 worked because it
never sent packets larger than 8192, even though it was allowed to, Tomcat 9 is
sending bigger packets as it is configured to. With ProxyIOBufferSize outside
of the conditional, it is now working as expected.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 63257] AJP connector can't handle greater than 8192 bytes

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63257

--- Comment #3 from Rainer Jung <ra...@kippdata.de> ---
Thanks for letting us know the solution.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org