3
votes

I'm trying to resolve an issue about connecting Apache and Tomcat with mod_proxy_ajp. From reading I found that the problem might be the numbers of workers in the Apache and the Tomcat. So I try to find the worker's definition in the Tomcat but I couldnt find any. Can it be? Can Tomcat work without a workers.properties file? I checked the imports in the Tomcat conf just to make sure that there isnt a different file name but none. How can I find out the worker's configuration of my Tomcat setup? Is there a default?

The problem that I'm trying to solve is that in some cases the Tomcat stops responding to the Apache - in the Apache log I see many errors like: 1. "(70007)The timeout specified has expired: ajp_ilink_receive() can't receive header" 2. "ajp_read_header: ajp_ilink_receive failed" 3. "(120006)APR does not understand this error code: proxy: read response failed from 127.0.0.1:9005 (localhost)")

So I'm trying to find out maybe the Apache has more workers than the Tomcat.

I'm using Apache 2.2.15 and Tomcat 7, connected with mod_proxy ajp on a Redhat machine.

Any ideas? Thanks! Baba

1
How did you solve it.. it is happening for me too..Dilip Rajkumar
I did not :( tried to define specific connector, to play with the executors...and yet it still happens. do you have any ideas?baba smith
I tried so hard.. finally I configured tomcat as my webserver and made tomcat listen to 80 and 443 and now the application works fast and good... If you find get a breakthrough please post it..Dilip Rajkumar
did you take a look at the thread dumps from when the tomcat stopped responding? in mine it looks like most of the threads are waiting for a lock that is related to log4j. i'm still investigating it...baba smith

1 Answers

0
votes

On Tomcat side you have to configure AJP connector in server.xml, for example:

<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="9009" protocol="AJP/1.3" redirectPort="8443"/>