Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Panel

Tomcat 7 manager fails when deploying a WAR file when using the AJP connector

When the Tomcat 7 manager tries to deploy a war file, it fails with the following error:

Code Block
Feb 28, 2013 8:20:35 AM org.apache.coyote.ajp.AjpMessage processHeader
SEVERE: Invalid message received with signature 8192

ANSWER:

  • By default, the maximum packet size that can be process by the AJP connector is 8192 bytes.  Do the following to change the default:
    1. Edit the Tomcat server.xml file located in the conf directory of your Tomcat installation.
    2. Find the Connector entry (show below).
      Code Block
      <Connector port="8009" protocol="AJP/1.3" tomcatAuthentication="false" redirectPort="8443" address="127.0.0.1" maxPostSize="536870912" />
      
    3. Add maxHttpHeaderSize="65536" and packetSize="65536" so that the Connector is as follows:
      Code Block
      <Connector port="8009" protocol="AJP/1.3" tomcatAuthentication="false" redirectPort="8443" address="127.0.0.1"  maxPostSize="536870912" maxHttpHeaderSize="65536" packetSize="65536" />
      
    4. When you are satisfied with your changes, save your changes and restart your Tomcat server.

...