Failed appending the header value with 413 response in Apache HTTPD using mod_jk

Solution Verified - Updated -

Issue

  • We use mod_jk, and see a 413 response for some requests:

    Request Entity Too Large
    The requested resource
    /app does not allow request data with GET requests, or the amount of data provided in the request exceeds the capacity limit.  
    
  • And mod_jk logs show:

    [error] ajp_marshal_into_msgb::jk_ajp_common.c (476): (node1) failed appending the header value for header 'Authorization' of length 13
    [info] ajp_service::jk_ajp_common.c (2577): (node1) Creating AJP message failed without recovery - check max_packet_size
    
  • Wireshark trace shows that web server is rejecting with the response below, but the same error is not present either in JBoss EAP logs or in the apache logs in debug mode.

    Hypertext Transfer Protocol
        HTTP/1.1 413 Request Entity Too Large\r\n
            [Expert Info (Chat/Sequence): HTTP/1.1 413 Request Entity Too Large\r\n]
                [Message: HTTP/1.1 413 Request Entity Too Large\r\n]
                [Severity level: Chat]
                [Group: Sequence]
            Request Version: HTTP/1.1
            Status Code: 413
            Response Phrase: Request Entity Too Large
        Date: Fri, 15 Feb 2013 21:49:36 GMT\r\n
        Server: Apache/2.2.15 (Red Hat)\r\n
        Connection: close\r\n
        Content-Type: text/html; charset=iso-8859-1\r\n
        \r\n
    
    [ajp-10.10.10.10-8009-1] DEBUG (org.jboss.ws.core.soap.MessageFactoryImpl) - createMessage: [contentType=multipart/related; 
    boundary=MIMEBoundary_31c97d726c91ad383489007f7b814a12eee5a08a363091bf; 
    type="application/xop+xml"; 
    start="<0.21c97d726c91ad383489007f7b814a12eee5a08a363091bf@apache.org>"; 
    start-info="application/soap+xml"; action="urn:processNPCMsg"]
    
    [ajp-10.10.10.10-8009-1] DEBUG (org.apache.coyote.ajp.AjpMessage) - Received 0 18
    [ajp-10.10.10.10-8009-1] TRACE (org.jboss.ws.core.soap.MessageFactoryImpl) - createMessage
    
    [ajp-10.10.10.10-8009-1] DEBUG (org.jboss.ws.metadata.umdm.EndpointMetaData) - Configure SOAPBinding
    [ajp-10.10.10.10-8009-1] ERROR (org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS) - SOAP request exception
    java.lang.IllegalArgumentException: multipart/related stream invalid, no root part was found
        at org.jboss.ws.core.soap.attachment.MultipartRelatedDecoder.decodeMultipartRelatedMessage(MultipartRelatedDecoder.java:171)
    
  • How to increase the maxPostSize value from default 2MB to 10MB to upload larger files?

Environment

  • Red Hat Enterprise Linux (RHEL)
  • Red Hat Software Collections (RHSCL)
  • Red Hat JBoss Web Server (JWS)
    • 3.0.x
  • Red Hat JBoss Core Services (JBCS)
  • Apache Web Server (HTTPD)
    • mod_jk
    • mod_proxy

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content