Why am I seeing “ajp_read_header: ajp_ilink_receive failed” https proxy errors?

[DATE] [error] ajp_read_header: ajp_ilink_receive failed

[DATE] [error] (120006)APR does not understand this error code: proxy: read response failed from [::1]:8019 (localhost)

When you receive the above errors, the problem is probably related to the Tomcat and/or Apache configurations.

As documented in Tomcat’s documentation, when configuring the connection, the ‘packetSize’ (which sets the max AJP packet size in bytes) needs to be equal to the ‘max_packet_size’ that is configured for mod_jk. Misconfiguration may lead to data loss.


Here is another case for example, with similar errors, using JBoss, (which uses Tomcat to serve its web-applications):