Installed a new Ubuntu 10.04 server and logging in as root I installed haproxy using apt-get.
I can run haproxy directly as a daemon but when I do /etc/init.d/haproxy start
nothing happens.. not even an error message.
netstat -a
shows nothing is using the http port I'm trying to balance with haproxy…
Ideas?
Edit
-
I noticed that
apt-get install haproxy
says this in the end:update-rc.d: warning: /etc/init.d/haproxy missing LSB information
update-rc.d: see http://wiki.debian.org/LSBInitScripts -
/etc/default/haproxy
saysENABLED=1
Debugging Output for sh -xv /etc/init.d/haproxy start
#!/bin/sh
#
# chkconfig: - 85 15
# description: HA-Proxy is a TCP/HTTP reverse proxy which is particularly suited \
# for high availability environments.
# processname: haproxy
# config: /etc/haproxy.cfg
# pidfile: /var/run/haproxy.pid
# Source function library.
if [ -f /etc/init.d/functions ]; then
. /etc/init.d/functions
elif [ -f /etc/rc.d/init.d/functions ] ; then
. /etc/rc.d/init.d/functions
else
exit 0
fi
+ [ -f /etc/init.d/functions ]
+ [ -f /etc/rc.d/init.d/functions ]
+ exit 0
root@li267-63:~#
Best Answer
Edit
/etc/default/haproxy
and make sure it has a line that saysENABLED=1
in it.The default is ENABLED=0. This is done because haproxy has no sane default configuration, so you need to first configure it, then enable it.