cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Can I use curl for Apache AJP/1.3 status check?

From: Ralph Mitchell <ralphmitchell_at_gmail.com>
Date: Tue, 17 Apr 2007 08:57:34 -0500

On 4/17/07, Saberhagen Nathan <dualspace_at_gmail.com> wrote:
> I'm using Apache web server(2.0.47) & Apache Tomcat (5.5.20).
> They are tied with mod_jk, AJP/1.3.
>
> Restarting the server as follows:
> 1. stop apache
> 2. stop tomcat
> 3. deploy fixed/updated web application
> 4. startup tomcat
> 5. (Not now)
> 6. startup apache
>
> between 4 and 6, before starting apache, I want to check tomcat properly
> started via AJP;
> if not, do not start apache.
>
> - Can I use curl on process 5?
> - And how can it be?
> (assume AJP port is 8102)
>

How about:

     curl -o /dev/null http://localhost:8102

then check the return code. If it's non-zero, tomcat probably isn't
talking. Or you could save the output and check it for specific
content.

Ralph Mitchell
Received on 2007-04-17