Ajp invalid message received with signature

Viewed 80001

I am using Tomcat 7.0.29 fronted with Apache 2.2.22 modproxy. Configured Ajp as the protocol in httpd.conf and AjpNioProtocol in server.xml. After the server starts, the logs are filled with the following message:

Severe: Invalid message received with signature 20599
com.apache.coyote.ajp.AjpMessage processHeader

There are no requests sent to the web or tomcat server and it still throws that error. Access logs in tomcat and apache show that no request is coming in. What is causing the invalid message error?

Here is the configuration :

  • httpd.conf

    ProxyPass /wl ajp:// ip : port /wl
    ProxyPassReverse /wl ajp:// ip : port /wl
    
  • server.xml

    <Connector port="port" 
               protocol="org.apache.coyote.ajp.AjpNioProtocol" 
               connectionTimeout="20000" 
               acceptorThreadCount="2" 
               maxThreads="1600" 
               redirectPort="8443" />
    
5 Answers

There are no requests sent to the web or tomcat server and it still throws that error. Access logs in tomcat and apache show that no request is coming in. What is causing the invalid message error?

Just some hint for other people because I forgot the same in one of my configs by accident: The mentioned Connector in server.xml is listening globally, because only port is specified, without any address. The latter is defined to listen globally by default:

By default, this port will be used on all IP addresses associated with the server.

https://tomcat.apache.org/tomcat-7.0-doc/config/http.html

So without any additional firewall or such it might be that bad clients are simply testing for open ports using various protocols, which might or might not be HTTP and therefore resulting in error messages with different signatures. Without very good reasons, there shouldn't be any need to make AJP globally available, especially not in case of a proxy-setup like used by the thread starter.

<Connector  address="localhost" port="port" 
            protocol="org.apache.coyote.ajp.AjpNioProtocol" 
            connectionTimeout="20000" 
            acceptorThreadCount="2" 
            maxThreads="1600" 
            redirectPort="8443" />
Related