tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: AJP Errors. Apache + Tomcat
Date Wed, 19 Oct 2011 09:27:38 GMT
Francis GALIEGUE wrote:
> On Wed, Oct 19, 2011 at 10:48, André Warnier <> wrote:
>> Hi.
>> The problem can also be due just to the difference in startup time between
>> Apache httpd and Tomcat.  At the time Apache httpd (and its embedded
>> mod_proxy_ajp module) try to contact Tomcat, Tomcat has possibly not yet
>> "opened" its Connector on port 8009, which causes the host to refuse a
>> connection to that port.
>> In my experience anything involving Java tends to take a while to "start the
>> machinery" (it is after all a "java virtual machine").
>> In the practice thus, what we always do in such configurations, is to start
>> Tomcat first (which really means mostly "start the java virtual machine
>> which runs Tomcat")
>> , wait a couple of seconds, and then start the Apache httpd part.
> Actually, there is a reliable way of waiting for Tomcat to be fully
> started: wait to see the port specified in <Server> open for
> listening. Then you are sure Tomcat is fully loaded. This is what I
> use and it's very reliable.

Yes, that would be more reliable than my 2 seconds above.
Although if one really wanted to split hairs in 4 parts (lenghtwise), one could argue that

the fact that the port mentioned in <Server> is open and listening, does not necessarily

mean that the port in the AJP Connector is open and listening.

Now just by curiosity, what mechanism do you use exactly to check that the <server>
is listening ?  (yes, the script lines..)

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message