Public bug reported:

Binary package hint: haproxy

I've got haproxy installed and configured on one of my servers.  In the
first 'listen' section of the config file, it binds to a number of
aliased IP addresses.  While I can start the service fine from the login
prompt, it would not start at boot time, instead it showed the following
in /var/log/boot.log

 * Starting haproxy haproxy                                                     
[ALERT] 346/160552 (927) : Starting proxy haproxy: cannot bind socket
[ALERT] 346/160552 (927) : Starting proxy haproxy: cannot bind socket
[ALERT] 346/160552 (927) : Starting proxy haproxy: cannot bind socket
[ALERT] 346/160552 (927) : Starting proxy haproxy: cannot bind socket
[ALERT] 346/160552 (927) : Starting proxy haproxy: cannot bind socket
[ALERT] 346/160552 (927) : Starting proxy haproxy: cannot bind socket
[ALERT] 346/160552 (927) : Starting proxy haproxy: cannot bind socket
                                                                         [fail]

On inspection the problem seems to come down to the lack of and
specified start/stop numbers in the sysV init scripts, so it defaults to
S20/K20 for everything.  While the correct solution is to write an
upstart script for haproxy, in the mean time, it should be set, so that
the start number is higher than 35 (which seems to be the number
/etc/init.d/networking uses)/

Changing the startup number to 35 seems to fix it, but I think 36 would
be safer (the old number for networking was 35, so best make it start
after that).

This fixed the problem, on my server:-

update-rc.d -f haproxy remove
update-rc.d haproxy start 36 2 3 4 5 . stop 20 0 1 6 .

** Affects: haproxy (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/689734

Title:
  HAProxy fails to start at boot time

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to