Re: Problems Reloading

From: Willy Tarreau <w#1wt.eu>
Date: Wed, 14 Jan 2009 06:32:08 +0100


On Tue, Jan 13, 2009 at 07:33:03PM -0600, Jerod Santo wrote:
> I am just getting started with haproxy and want to use it to do
> content-switching. I'm having a little trouble reloading configuration
> changes with my current config because when I execute the following command:
> haproxy -f /etc/haproxy/haproxy.conf -p $(</var/run/haproxy-private.pid)
> -st $(</var/run/haproxy-private.pid)

There is something wrong above, your pid file is wrong :

   -p $(</var/run/haproxy-private.pid)

will become "-p 12345" for instance if last pid was 12345. If you did this twice, you have not updated /var/run/haproxy-private.pid which then contains an old pid, so the new process will not be able to send the signal to the old one.

You need to proceed like this :

# haproxy -f /etc/haproxy/haproxy.conf -p /var/run/haproxy-private.pid -st $(</var/run/haproxy-private.pid)

But this will work only once the correct pid is in this file. In the mean time, you can also use that (assuming you only have one haproxy on your machine) :

# haproxy -f /etc/haproxy/haproxy.conf -p /var/run/haproxy-private.pid -st $(pidof haproxy)

Regards,
Willy Received on 2009/01/14 06:32

This archive was generated by hypermail 2.2.0 : 2009/01/14 06:45 CET