[Ubuntu-ha] [Bug 1855140] Re: How to handle tmpfiles.d in non-systemd environments
0:00 \_ ps auxf root 1 0.0 0.0 18376 3016 ?Ss 15:40 0:00 bash /root/entrypoint.sh haproxy 31 0.0 0.0 54284 1252 ?Ss 15:45 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg This can be reproduced with a simple Docker container the following Dockerfile: -- FROM ubuntu:18.04 MAINTAINER Claudio Kuenzler # install packages RUN apt-get update \ && apt-get install -y -qq haproxy CMD ["/usr/sbin/haproxy","-f","/etc/haproxy/haproxy.cfg"] -- Checking the haproxy package for the run directory shows nothing: # dpkg -L haproxy | grep run ; date Wed Dec 4 15:58:52 UTC 2019 *** Update: After analysis of the haproxy package (see https://www.claudiokuenzler.com/blog/917/haproxy-ubuntu-18.04-docker- image-not-starting-cannot-bind-unix-socket), it turns out that the /run/haproxy directory is defined in debian/haproxy.tmpfile. However tmpfile's are only considered in systems with SystemD. As Docker containers run without Systemd, this directory is never created. Suggestion: Do not rely on Systemd to create /run/haproxy. Maybe use debian/haproxy.dirs? However the permissions are not set in this case. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/haproxy/+bug/1855140/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-ha Post to : ubuntu-ha@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-ha More help : https://help.launchpad.net/ListHelp
[Ubuntu-ha] [Bug 1855140] Re: haproxy package misses creation of default stats socket path in Docker container
Can't edit my comment (#2) so I just wanted to correct the sentence "That's (most likely) the reason why the official HAProxy docker image builds on Alpine Linux which uses Open RC as init system.". The official HAProxy Docker image runs on Debian but also supports Alpine Linux. The big difference there: They don't install HAProxy from a deb package but rather build HAProxy from source (during image build). -- You received this bug notification because you are a member of Ubuntu High Availability Team, which is subscribed to haproxy in Ubuntu. https://bugs.launchpad.net/bugs/1855140 Title: haproxy package misses creation of default stats socket path in Docker container Status in haproxy package in Ubuntu: New Bug description: When installing the haproxy package from the current Ubuntu 18.04 Bionic repos, the package does not install the directory /run/haproxy. This directory is mentioned in the default config file /etc/haproxy/haproxy.cfg: stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners Starting HAProxy manually will show the following error: # /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg [ALERT] 337/154339 (24) : Starting frontend GLOBAL: cannot bind UNIX socket [/run/haproxy/admin.sock] After manual creation of the directory, the start works: # mkdir /run/haproxy # /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg # ps auxf USER PID %CPU %MEMVSZ RSS TTY STAT START TIME COMMAND root10 0.1 0.0 18616 3416 pts/0Ss 15:42 0:00 /bin/bash root32 0.0 0.0 34400 2900 pts/0R+ 15:45 0:00 \_ ps auxf root 1 0.0 0.0 18376 3016 ?Ss 15:40 0:00 bash /root/entrypoint.sh haproxy 31 0.0 0.0 54284 1252 ?Ss 15:45 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg This can be reproduced with a simple Docker container the following Dockerfile: -- FROM ubuntu:18.04 MAINTAINER Claudio Kuenzler # install packages RUN apt-get update \ && apt-get install -y -qq haproxy CMD ["/usr/sbin/haproxy","-f","/etc/haproxy/haproxy.cfg"] -- Checking the haproxy package for the run directory shows nothing: # dpkg -L haproxy | grep run ; date Wed Dec 4 15:58:52 UTC 2019 *** Update: After analysis of the haproxy package (see https://www.claudiokuenzler.com/blog/917/haproxy-ubuntu-18.04-docker- image-not-starting-cannot-bind-unix-socket), it turns out that the /run/haproxy directory is defined in debian/haproxy.tmpfile. However tmpfile's are only considered in systems with SystemD. As Docker containers run without Systemd, this directory is never created. Suggestion: Do not rely on Systemd to create /run/haproxy. Maybe use debian/haproxy.dirs? However the permissions are not set in this case. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/haproxy/+bug/1855140/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-ha Post to : ubuntu-ha@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-ha More help : https://help.launchpad.net/ListHelp
[Ubuntu-ha] [Bug 1855140] Re: haproxy package misses creation of default stats socket path
Thanks, Christian, for your response. I agree, this might likely have a bigger impact than expected (I only figured this out after package analysis), because a lot of packages now depend on systemd for the package installation - yet systemd does not run in Docker. That's (most likely) the reason why the official HAProxy docker image builds on Alpine Linux which uses Open RC as init system. I could of course switch to Alpine but during early development phase of that container I wanted to use Ubuntu 18.04 for additional troubleshooting purposes. It will probably come down whether or not the Ubuntu packages officially support being installed/run in a Docker container or not. I can already imagine the fuss and heavily debated conversations about this topic :-/ . Let me know if I can be of help somehow. ** Summary changed: - haproxy package misses creation of default stats socket path + haproxy package misses creation of default stats socket path in Docker container -- You received this bug notification because you are a member of Ubuntu High Availability Team, which is subscribed to haproxy in Ubuntu. https://bugs.launchpad.net/bugs/1855140 Title: haproxy package misses creation of default stats socket path in Docker container Status in haproxy package in Ubuntu: New Bug description: When installing the haproxy package from the current Ubuntu 18.04 Bionic repos, the package does not install the directory /run/haproxy. This directory is mentioned in the default config file /etc/haproxy/haproxy.cfg: stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners Starting HAProxy manually will show the following error: # /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg [ALERT] 337/154339 (24) : Starting frontend GLOBAL: cannot bind UNIX socket [/run/haproxy/admin.sock] After manual creation of the directory, the start works: # mkdir /run/haproxy # /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg # ps auxf USER PID %CPU %MEMVSZ RSS TTY STAT START TIME COMMAND root10 0.1 0.0 18616 3416 pts/0Ss 15:42 0:00 /bin/bash root32 0.0 0.0 34400 2900 pts/0R+ 15:45 0:00 \_ ps auxf root 1 0.0 0.0 18376 3016 ?Ss 15:40 0:00 bash /root/entrypoint.sh haproxy 31 0.0 0.0 54284 1252 ?Ss 15:45 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg This can be reproduced with a simple Docker container the following Dockerfile: -- FROM ubuntu:18.04 MAINTAINER Claudio Kuenzler # install packages RUN apt-get update \ && apt-get install -y -qq haproxy CMD ["/usr/sbin/haproxy","-f","/etc/haproxy/haproxy.cfg"] -- Checking the haproxy package for the run directory shows nothing: # dpkg -L haproxy | grep run ; date Wed Dec 4 15:58:52 UTC 2019 *** Update: After analysis of the haproxy package (see https://www.claudiokuenzler.com/blog/917/haproxy-ubuntu-18.04-docker- image-not-starting-cannot-bind-unix-socket), it turns out that the /run/haproxy directory is defined in debian/haproxy.tmpfile. However tmpfile's are only considered in systems with SystemD. As Docker containers run without Systemd, this directory is never created. Suggestion: Do not rely on Systemd to create /run/haproxy. Maybe use debian/haproxy.dirs? However the permissions are not set in this case. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/haproxy/+bug/1855140/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-ha Post to : ubuntu-ha@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-ha More help : https://help.launchpad.net/ListHelp
[Ubuntu-ha] [Bug 1855140] Re: haproxy package misses creation of default stats socket path
** Description changed: When installing the haproxy package from the current Ubuntu 18.04 Bionic repos, the package does not install the directory /run/haproxy. This directory is mentioned in the default config file /etc/haproxy/haproxy.cfg: stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners Starting HAProxy manually will show the following error: # /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg [ALERT] 337/154339 (24) : Starting frontend GLOBAL: cannot bind UNIX socket [/run/haproxy/admin.sock] After manual creation of the directory, the start works: # mkdir /run/haproxy # /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg # ps auxf USER PID %CPU %MEMVSZ RSS TTY STAT START TIME COMMAND root10 0.1 0.0 18616 3416 pts/0Ss 15:42 0:00 /bin/bash root32 0.0 0.0 34400 2900 pts/0R+ 15:45 0:00 \_ ps auxf root 1 0.0 0.0 18376 3016 ?Ss 15:40 0:00 bash /root/entrypoint.sh haproxy 31 0.0 0.0 54284 1252 ?Ss 15:45 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg This can be reproduced with a simple Docker container the following Dockerfile: -- FROM ubuntu:18.04 MAINTAINER Claudio Kuenzler # install packages RUN apt-get update \ && apt-get install -y -qq haproxy CMD ["/usr/sbin/haproxy","-f","/etc/haproxy/haproxy.cfg"] -- Checking the haproxy package for the run directory shows nothing: # dpkg -L haproxy | grep run ; date Wed Dec 4 15:58:52 UTC 2019 + + *** + + Update: After analysis of the haproxy package (see + https://www.claudiokuenzler.com/blog/917/haproxy-ubuntu-18.04-docker- + image-not-starting-cannot-bind-unix-socket), it turns out that the + /run/haproxy directory is defined in debian/haproxy.tmpfile. However + tmpfile's are only considered in systems with SystemD. As Docker + containers run without Systemd, this directory is never created. + + Suggestion: Do not rely on Systemd to create /run/haproxy. Maybe use + debian/haproxy.dirs? However the permissions are not set in this case. -- You received this bug notification because you are a member of Ubuntu High Availability Team, which is subscribed to haproxy in Ubuntu. https://bugs.launchpad.net/bugs/1855140 Title: haproxy package misses creation of default stats socket path Status in haproxy package in Ubuntu: New Bug description: When installing the haproxy package from the current Ubuntu 18.04 Bionic repos, the package does not install the directory /run/haproxy. This directory is mentioned in the default config file /etc/haproxy/haproxy.cfg: stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners Starting HAProxy manually will show the following error: # /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg [ALERT] 337/154339 (24) : Starting frontend GLOBAL: cannot bind UNIX socket [/run/haproxy/admin.sock] After manual creation of the directory, the start works: # mkdir /run/haproxy # /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg # ps auxf USER PID %CPU %MEMVSZ RSS TTY STAT START TIME COMMAND root10 0.1 0.0 18616 3416 pts/0Ss 15:42 0:00 /bin/bash root32 0.0 0.0 34400 2900 pts/0R+ 15:45 0:00 \_ ps auxf root 1 0.0 0.0 18376 3016 ?Ss 15:40 0:00 bash /root/entrypoint.sh haproxy 31 0.0 0.0 54284 1252 ?Ss 15:45 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg This can be reproduced with a simple Docker container the following Dockerfile: -- FROM ubuntu:18.04 MAINTAINER Claudio Kuenzler # install packages RUN apt-get update \ && apt-get install -y -qq haproxy CMD ["/usr/sbin/haproxy","-f","/etc/haproxy/haproxy.cfg"] -- Checking the haproxy package for the run directory shows nothing: # dpkg -L haproxy | grep run ; date Wed Dec 4 15:58:52 UTC 2019 *** Update: After analysis of the haproxy package (see https://www.claudiokuenzler.com/blog/917/haproxy-ubuntu-18.04-docker- image-not-starting-cannot-bind-unix-socket), it turns out that the /run/haproxy directory is defined in debian/haproxy.tmpfile. However tmpfile's are only considered in systems with SystemD. As Docker containers run without Systemd, this directory is never created. Suggestion: Do not rely on Systemd to create /run/haproxy. Maybe use debian/haproxy.dirs? However the permissions are not set in this case. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/haproxy/+bug/185
[Ubuntu-ha] [Bug 1855140] Re: haproxy package misses creation of default stats socket path
** Description changed: When installing the haproxy package from the current Ubuntu 18.04 Bionic repos, the package does not install the directory /run/haproxy. This directory is mentioned in the default config file /etc/haproxy/haproxy.cfg: - - stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners - + stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd + listeners Starting HAProxy manually will show the following error: - # /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg [ALERT] 337/154339 (24) : Starting frontend GLOBAL: cannot bind UNIX socket [/run/haproxy/admin.sock] - After manual creation of the directory, the start works: - # mkdir /run/haproxy # /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg # ps auxf USER PID %CPU %MEMVSZ RSS TTY STAT START TIME COMMAND root10 0.1 0.0 18616 3416 pts/0Ss 15:42 0:00 /bin/bash root32 0.0 0.0 34400 2900 pts/0R+ 15:45 0:00 \_ ps auxf root 1 0.0 0.0 18376 3016 ?Ss 15:40 0:00 bash /root/entrypoint.sh haproxy 31 0.0 0.0 54284 1252 ?Ss 15:45 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg - - This can be reproduced with a simple Docker container the following Dockerfile: + This can be reproduced with a simple Docker container the following + Dockerfile: -- FROM ubuntu:18.04 MAINTAINER Claudio Kuenzler # install packages RUN apt-get update \ && apt-get install -y -qq haproxy - CMD ["/usr/sbin/haproxy -c -f /etc/haproxy/haproxy.cfg"] + CMD ["/usr/sbin/haproxy","-f","/etc/haproxy/haproxy.cfg"] -- Checking the haproxy package for the run directory shows nothing: - # dpkg -L haproxy | grep run ; date Wed Dec 4 15:58:52 UTC 2019 -- You received this bug notification because you are a member of Ubuntu High Availability Team, which is subscribed to haproxy in Ubuntu. https://bugs.launchpad.net/bugs/1855140 Title: haproxy package misses creation of default stats socket path Status in haproxy package in Ubuntu: New Bug description: When installing the haproxy package from the current Ubuntu 18.04 Bionic repos, the package does not install the directory /run/haproxy. This directory is mentioned in the default config file /etc/haproxy/haproxy.cfg: stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners Starting HAProxy manually will show the following error: # /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg [ALERT] 337/154339 (24) : Starting frontend GLOBAL: cannot bind UNIX socket [/run/haproxy/admin.sock] After manual creation of the directory, the start works: # mkdir /run/haproxy # /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg # ps auxf USER PID %CPU %MEMVSZ RSS TTY STAT START TIME COMMAND root10 0.1 0.0 18616 3416 pts/0Ss 15:42 0:00 /bin/bash root32 0.0 0.0 34400 2900 pts/0R+ 15:45 0:00 \_ ps auxf root 1 0.0 0.0 18376 3016 ?Ss 15:40 0:00 bash /root/entrypoint.sh haproxy 31 0.0 0.0 54284 1252 ?Ss 15:45 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg This can be reproduced with a simple Docker container the following Dockerfile: ------ FROM ubuntu:18.04 MAINTAINER Claudio Kuenzler # install packages RUN apt-get update \ && apt-get install -y -qq haproxy CMD ["/usr/sbin/haproxy","-f","/etc/haproxy/haproxy.cfg"] -- Checking the haproxy package for the run directory shows nothing: # dpkg -L haproxy | grep run ; date Wed Dec 4 15:58:52 UTC 2019 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/haproxy/+bug/1855140/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-ha Post to : ubuntu-ha@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-ha More help : https://help.launchpad.net/ListHelp
[Ubuntu-ha] [Bug 1855140] Re: haproxy package misses creation of default stats socket path
** Summary changed: - haproxy package misses creation of default socket path + haproxy package misses creation of default stats socket path -- You received this bug notification because you are a member of Ubuntu High Availability Team, which is subscribed to haproxy in Ubuntu. https://bugs.launchpad.net/bugs/1855140 Title: haproxy package misses creation of default stats socket path Status in haproxy package in Ubuntu: New Bug description: When installing the haproxy package from the current Ubuntu 18.04 Bionic repos, the package does not install the directory /run/haproxy. This directory is mentioned in the default config file /etc/haproxy/haproxy.cfg: stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners Starting HAProxy manually will show the following error: # /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg [ALERT] 337/154339 (24) : Starting frontend GLOBAL: cannot bind UNIX socket [/run/haproxy/admin.sock] After manual creation of the directory, the start works: # mkdir /run/haproxy # /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg # ps auxf USER PID %CPU %MEMVSZ RSS TTY STAT START TIME COMMAND root10 0.1 0.0 18616 3416 pts/0Ss 15:42 0:00 /bin/bash root32 0.0 0.0 34400 2900 pts/0R+ 15:45 0:00 \_ ps auxf root 1 0.0 0.0 18376 3016 ?Ss 15:40 0:00 bash /root/entrypoint.sh haproxy 31 0.0 0.0 54284 1252 ?Ss 15:45 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg This can be reproduced with a simple Docker container the following Dockerfile: -- FROM ubuntu:18.04 MAINTAINER Claudio Kuenzler # install packages RUN apt-get update \ && apt-get install -y -qq haproxy CMD ["/usr/sbin/haproxy -c -f /etc/haproxy/haproxy.cfg"] -- Checking the haproxy package for the run directory shows nothing: # dpkg -L haproxy | grep run ; date Wed Dec 4 15:58:52 UTC 2019 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/haproxy/+bug/1855140/+subscriptions ___ Mailing list: https://launchpad.net/~ubuntu-ha Post to : ubuntu-ha@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-ha More help : https://help.launchpad.net/ListHelp
[Ubuntu-ha] [Bug 1855140] [NEW] haproxy package misses creation of default stats socket path
Public bug reported: When installing the haproxy package from the current Ubuntu 18.04 Bionic repos, the package does not install the directory /run/haproxy. This directory is mentioned in the default config file /etc/haproxy/haproxy.cfg: stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners Starting HAProxy manually will show the following error: # /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg [ALERT] 337/154339 (24) : Starting frontend GLOBAL: cannot bind UNIX socket [/run/haproxy/admin.sock] After manual creation of the directory, the start works: # mkdir /run/haproxy # /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg # ps auxf USER PID %CPU %MEMVSZ RSS TTY STAT START TIME COMMAND root10 0.1 0.0 18616 3416 pts/0Ss 15:42 0:00 /bin/bash root32 0.0 0.0 34400 2900 pts/0R+ 15:45 0:00 \_ ps auxf root 1 0.0 0.0 18376 3016 ?Ss 15:40 0:00 bash /root/entrypoint.sh haproxy 31 0.0 0.0 54284 1252 ?Ss 15:45 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg This can be reproduced with a simple Docker container the following Dockerfile: -- FROM ubuntu:18.04 MAINTAINER Claudio Kuenzler # install packages RUN apt-get update \ && apt-get install -y -qq haproxy CMD ["/usr/sbin/haproxy -c -f /etc/haproxy/haproxy.cfg"] -- Checking the haproxy package for the run directory shows nothing: # dpkg -L haproxy | grep run ; date Wed Dec 4 15:58:52 UTC 2019 ** Affects: haproxy (Ubuntu) Importance: Undecided Status: New ** Description changed: When installing the haproxy package from the current Ubuntu 18.04 Bionic - repos, the package does not install the directory `/run/haproxy`. This + repos, the package does not install the directory /run/haproxy. This directory is mentioned in the default config file - `/etc/haproxy/haproxy.cfg`: + /etc/haproxy/haproxy.cfg: - ``` - stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners - ``` + + stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners + Starting HAProxy manually will show the following error: - ``` - # /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg + + # /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg [ALERT] 337/154339 (24) : Starting frontend GLOBAL: cannot bind UNIX socket [/run/haproxy/admin.sock] - ``` + After manual creation of the directory, the start works: - ``` + # mkdir /run/haproxy # /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg # ps auxf USER PID %CPU %MEMVSZ RSS TTY STAT START TIME COMMAND root10 0.1 0.0 18616 3416 pts/0Ss 15:42 0:00 /bin/bash root32 0.0 0.0 34400 2900 pts/0R+ 15:45 0:00 \_ ps auxf root 1 0.0 0.0 18376 3016 ?Ss 15:40 0:00 bash /root/entrypoint.sh haproxy 31 0.0 0.0 54284 1252 ?Ss 15:45 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg - ``` - This can be reproduced with a simple Docker container the following - Dockerfile: - ``` + This can be reproduced with a simple Docker container the following Dockerfile: + + -- FROM ubuntu:18.04 MAINTAINER Claudio Kuenzler # install packages RUN apt-get update \ - && apt-get install -y -qq haproxy + && apt-get install -y -qq haproxy CMD ["/usr/sbin/haproxy -c -f /etc/haproxy/haproxy.cfg"] - ``` + -- Checking the haproxy package for the run directory shows nothing: - ``` - # dpkg -L haproxy | grep run ; date + + # dpkg -L haproxy | grep run ; date Wed Dec 4 15:58:52 UTC 2019 - ``` -- You received this bug notification because you are a member of Ubuntu High Availability Team, which is subscribed to haproxy in Ubuntu. https://bugs.launchpad.net/bugs/1855140 Title: haproxy package misses creation of default stats socket path Status in haproxy package in Ubuntu: New Bug description: When installing the haproxy package from the current Ubuntu 18.04 Bionic repos, the package does not install the directory /run/haproxy. This directory is mentioned in the default config file /etc/haproxy/haproxy.cfg: stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners Starting HAProxy manually will show the following error: # /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg [ALERT] 337/154339 (24) : Starting frontend GLOBAL: cannot bind UNIX socket [/run/haproxy/admin.sock] After manual creation of the directory, the start works: # mkdir /run/haproxy # /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg # ps auxf USER PID %CPU %MEMVSZ RSS TTY STAT START TIME COMMAND root10 0.1 0.0 18616 3416
[Ubuntu-ha] [Bug 1494141] Re: HAProxy 1.5 init script does not terminate processes
By the way... this bug was also backported into the official trusty version of HAProxy (1.4).. Jeez! In the meantime its fixed again. haproxy (1.4.24-2ubuntu0.2) trusty; urgency=high * debian/haproxy.init: + Pass the pidfile to the --pidfile argument instead of the PID number. (LP: #1477198). -- Jorge NiedbalskiWed, 22 Jul 2015 11:12:26 -0500 haproxy (1.4.24-2ubuntu0.1) trusty; urgency=medium * debian/haproxy.init: + Backport of utopic start/stop routines, uses start-stop-daemon to reliable terminate all haproxy processes and return the proper exit code. (LP: #1462495). + Backport of utopic check_haproxy_config routine, that test the configuration before start or reload. (LP: #1468879) -- Jorge Niedbalski Thu, 25 Jun 2015 12:51:05 -0700 That's just as an additional note. -- You received this bug notification because you are a member of Ubuntu High Availability Team, which is subscribed to haproxy in Ubuntu. https://bugs.launchpad.net/bugs/1494141 Title: HAProxy 1.5 init script does not terminate processes Status in trusty-backports: In Progress Status in haproxy package in Ubuntu: Fix Released Status in haproxy source package in Trusty: Invalid Bug description: On a new installation of Ubuntu 14.04.3 LTS I installed HAProxy 1.5 from trusty-backports (1.5.4-1ubuntu2.1~ubuntu14.04.1). When I restarted HAProxy, I got random HTTP 503 although the backend servers were all working fine. By checking netstat, I saw that HAProxy was listening multiple times on the frontend ports. It seems that the init script coming with the installation does not work correctly. The processes are not terminated correctly when using stop (or restart, in this matter, either). Only with a kill I was able to correctly terminate the HAProxy processes. The following output should show more clarity: root@mylinux:~# netstat -lntp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp0 0 0.0.0.0:80800.0.0.0:* LISTEN 4653/haproxy tcp0 0 0.0.0.0:80800.0.0.0:* LISTEN 4221/haproxy tcp0 0 0.0.0.0:80 0.0.0.0:* LISTEN 956/nginx tcp0 0 0.0.0.0:22 0.0.0.0:* LISTEN 855/sshd tcp0 0 0.0.0.0:80900.0.0.0:* LISTEN 4653/haproxy tcp0 0 0.0.0.0:80900.0.0.0:* LISTEN 4221/haproxy tcp0 0 0.0.0.0:80990.0.0.0:* LISTEN 4653/haproxy tcp0 0 0.0.0.0:80990.0.0.0:* LISTEN 4221/haproxy tcp6 0 0 :::22 :::*LISTEN 855/sshd root@mylinux:~# service haproxy stop * Stopping haproxy haproxy [ OK ] root@mylinux:~# service haproxy status haproxy not running. root@mylinux:~# netstat -lntp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp0 0 0.0.0.0:80800.0.0.0:* LISTEN 4653/haproxy tcp0 0 0.0.0.0:80800.0.0.0:* LISTEN 4221/haproxy tcp0 0 0.0.0.0:80 0.0.0.0:* LISTEN 956/nginx tcp0 0 0.0.0.0:22 0.0.0.0:* LISTEN 855/sshd tcp0 0 0.0.0.0:80900.0.0.0:* LISTEN 4653/haproxy tcp0 0 0.0.0.0:80900.0.0.0:* LISTEN 4221/haproxy tcp0 0 0.0.0.0:80990.0.0.0:* LISTEN 4653/haproxy tcp0 0 0.0.0.0:80990.0.0.0:* LISTEN 4221/haproxy tcp6 0 0 :::22 :::*LISTEN 855/sshd root@mylinux:~# killall haproxy root@mylinux:~# netstat -lntp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp0 0 0.0.0.0:80 0.0.0.0:* LISTEN 956/nginx tcp0 0 0.0.0.0:22 0.0.0.0:* LISTEN 855/sshd tcp6 0 0 :::22 :::*LISTEN 855/sshd root@mylinux:~# service haproxy start * Starting haproxy haproxy [ OK ] root@mylinux:~# netstat -lntp Active Internet connections (only servers)
[Ubuntu-ha] [Bug 1494141] Re: HAProxy 1.5 init script does not terminate processes
Chase them with beer. Works faster ^^ -- You received this bug notification because you are a member of Ubuntu High Availability Team, which is subscribed to haproxy in Ubuntu. https://bugs.launchpad.net/bugs/1494141 Title: HAProxy 1.5 init script does not terminate processes Status in trusty-backports: In Progress Status in haproxy package in Ubuntu: Fix Released Status in haproxy source package in Trusty: Invalid Bug description: On a new installation of Ubuntu 14.04.3 LTS I installed HAProxy 1.5 from trusty-backports (1.5.4-1ubuntu2.1~ubuntu14.04.1). When I restarted HAProxy, I got random HTTP 503 although the backend servers were all working fine. By checking netstat, I saw that HAProxy was listening multiple times on the frontend ports. It seems that the init script coming with the installation does not work correctly. The processes are not terminated correctly when using stop (or restart, in this matter, either). Only with a kill I was able to correctly terminate the HAProxy processes. The following output should show more clarity: root@mylinux:~# netstat -lntp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp0 0 0.0.0.0:80800.0.0.0:* LISTEN 4653/haproxy tcp0 0 0.0.0.0:80800.0.0.0:* LISTEN 4221/haproxy tcp0 0 0.0.0.0:80 0.0.0.0:* LISTEN 956/nginx tcp0 0 0.0.0.0:22 0.0.0.0:* LISTEN 855/sshd tcp0 0 0.0.0.0:80900.0.0.0:* LISTEN 4653/haproxy tcp0 0 0.0.0.0:80900.0.0.0:* LISTEN 4221/haproxy tcp0 0 0.0.0.0:80990.0.0.0:* LISTEN 4653/haproxy tcp0 0 0.0.0.0:80990.0.0.0:* LISTEN 4221/haproxy tcp6 0 0 :::22 :::*LISTEN 855/sshd root@mylinux:~# service haproxy stop * Stopping haproxy haproxy [ OK ] root@mylinux:~# service haproxy status haproxy not running. root@mylinux:~# netstat -lntp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp0 0 0.0.0.0:80800.0.0.0:* LISTEN 4653/haproxy tcp0 0 0.0.0.0:80800.0.0.0:* LISTEN 4221/haproxy tcp0 0 0.0.0.0:80 0.0.0.0:* LISTEN 956/nginx tcp0 0 0.0.0.0:22 0.0.0.0:* LISTEN 855/sshd tcp0 0 0.0.0.0:80900.0.0.0:* LISTEN 4653/haproxy tcp0 0 0.0.0.0:80900.0.0.0:* LISTEN 4221/haproxy tcp0 0 0.0.0.0:80990.0.0.0:* LISTEN 4653/haproxy tcp0 0 0.0.0.0:80990.0.0.0:* LISTEN 4221/haproxy tcp6 0 0 :::22 :::*LISTEN 855/sshd root@mylinux:~# killall haproxy root@mylinux:~# netstat -lntp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp0 0 0.0.0.0:80 0.0.0.0:* LISTEN 956/nginx tcp0 0 0.0.0.0:22 0.0.0.0:* LISTEN 855/sshd tcp6 0 0 :::22 :::*LISTEN 855/sshd root@mylinux:~# service haproxy start * Starting haproxy haproxy [ OK ] root@mylinux:~# netstat -lntp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp0 0 0.0.0.0:80800.0.0.0:* LISTEN 8205/haproxy tcp0 0 0.0.0.0:80 0.0.0.0:* LISTEN 956/nginx tcp0 0 0.0.0.0:22 0.0.0.0:* LISTEN 855/sshd tcp0 0 0.0.0.0:80900.0.0.0:* LISTEN 8205/haproxy tcp0 0 0.0.0.0:80990.0.0.0:* LISTEN 8205/haproxy tcp6 0 0 :::22 :::*LISTEN 855/sshd root@mylinux:~# service haproxy restart * Restarting haproxy haproxy [ OK ] root@nzzad-lb01-test:~# netstat -lntp Active Internet
[Ubuntu-ha] [Bug 1494141] Re: HAProxy 1.5 init script does not terminate processes
The "new bug" for trusty concerning if nproc > 1 is probably this one: https://bugs.launchpad.net/ubuntu/+source/haproxy/+bug/1481737 ? -- You received this bug notification because you are a member of Ubuntu High Availability Team, which is subscribed to haproxy in Ubuntu. https://bugs.launchpad.net/bugs/1494141 Title: HAProxy 1.5 init script does not terminate processes Status in trusty-backports: In Progress Status in haproxy package in Ubuntu: Fix Released Status in haproxy source package in Trusty: Invalid Bug description: On a new installation of Ubuntu 14.04.3 LTS I installed HAProxy 1.5 from trusty-backports (1.5.4-1ubuntu2.1~ubuntu14.04.1). When I restarted HAProxy, I got random HTTP 503 although the backend servers were all working fine. By checking netstat, I saw that HAProxy was listening multiple times on the frontend ports. It seems that the init script coming with the installation does not work correctly. The processes are not terminated correctly when using stop (or restart, in this matter, either). Only with a kill I was able to correctly terminate the HAProxy processes. The following output should show more clarity: root@mylinux:~# netstat -lntp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp0 0 0.0.0.0:80800.0.0.0:* LISTEN 4653/haproxy tcp0 0 0.0.0.0:80800.0.0.0:* LISTEN 4221/haproxy tcp0 0 0.0.0.0:80 0.0.0.0:* LISTEN 956/nginx tcp0 0 0.0.0.0:22 0.0.0.0:* LISTEN 855/sshd tcp0 0 0.0.0.0:80900.0.0.0:* LISTEN 4653/haproxy tcp0 0 0.0.0.0:80900.0.0.0:* LISTEN 4221/haproxy tcp0 0 0.0.0.0:80990.0.0.0:* LISTEN 4653/haproxy tcp0 0 0.0.0.0:80990.0.0.0:* LISTEN 4221/haproxy tcp6 0 0 :::22 :::*LISTEN 855/sshd root@mylinux:~# service haproxy stop * Stopping haproxy haproxy [ OK ] root@mylinux:~# service haproxy status haproxy not running. root@mylinux:~# netstat -lntp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp0 0 0.0.0.0:80800.0.0.0:* LISTEN 4653/haproxy tcp0 0 0.0.0.0:80800.0.0.0:* LISTEN 4221/haproxy tcp0 0 0.0.0.0:80 0.0.0.0:* LISTEN 956/nginx tcp0 0 0.0.0.0:22 0.0.0.0:* LISTEN 855/sshd tcp0 0 0.0.0.0:80900.0.0.0:* LISTEN 4653/haproxy tcp0 0 0.0.0.0:80900.0.0.0:* LISTEN 4221/haproxy tcp0 0 0.0.0.0:80990.0.0.0:* LISTEN 4653/haproxy tcp0 0 0.0.0.0:80990.0.0.0:* LISTEN 4221/haproxy tcp6 0 0 :::22 :::*LISTEN 855/sshd root@mylinux:~# killall haproxy root@mylinux:~# netstat -lntp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp0 0 0.0.0.0:80 0.0.0.0:* LISTEN 956/nginx tcp0 0 0.0.0.0:22 0.0.0.0:* LISTEN 855/sshd tcp6 0 0 :::22 :::*LISTEN 855/sshd root@mylinux:~# service haproxy start * Starting haproxy haproxy [ OK ] root@mylinux:~# netstat -lntp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp0 0 0.0.0.0:80800.0.0.0:* LISTEN 8205/haproxy tcp0 0 0.0.0.0:80 0.0.0.0:* LISTEN 956/nginx tcp0 0 0.0.0.0:22 0.0.0.0:* LISTEN 855/sshd tcp0 0 0.0.0.0:80900.0.0.0:* LISTEN 8205/haproxy tcp0 0 0.0.0.0:80990.0.0.0:* LISTEN 8205/haproxy tcp6 0 0 :::22 :::*LISTEN 855/sshd root@mylinux:~# service haproxy restart * Restarting haproxy haproxy
[Ubuntu-ha] [Bug 1494141] Re: HAProxy 1.5 init script does not terminate processes
Salut Louis, Thanks for taking care of this bug. Have I understood correctly that the haproxy package in trusty-backports is already updated? Or do I have to wait until the package is released to all mirrors? -- You received this bug notification because you are a member of Ubuntu High Availability Team, which is subscribed to haproxy in Ubuntu. https://bugs.launchpad.net/bugs/1494141 Title: HAProxy 1.5 init script does not terminate processes Status in trusty-backports: In Progress Status in haproxy package in Ubuntu: Fix Released Status in haproxy source package in Trusty: Invalid Bug description: On a new installation of Ubuntu 14.04.3 LTS I installed HAProxy 1.5 from trusty-backports (1.5.4-1ubuntu2.1~ubuntu14.04.1). When I restarted HAProxy, I got random HTTP 503 although the backend servers were all working fine. By checking netstat, I saw that HAProxy was listening multiple times on the frontend ports. It seems that the init script coming with the installation does not work correctly. The processes are not terminated correctly when using stop (or restart, in this matter, either). Only with a kill I was able to correctly terminate the HAProxy processes. The following output should show more clarity: root@mylinux:~# netstat -lntp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp0 0 0.0.0.0:80800.0.0.0:* LISTEN 4653/haproxy tcp0 0 0.0.0.0:80800.0.0.0:* LISTEN 4221/haproxy tcp0 0 0.0.0.0:80 0.0.0.0:* LISTEN 956/nginx tcp0 0 0.0.0.0:22 0.0.0.0:* LISTEN 855/sshd tcp0 0 0.0.0.0:80900.0.0.0:* LISTEN 4653/haproxy tcp0 0 0.0.0.0:80900.0.0.0:* LISTEN 4221/haproxy tcp0 0 0.0.0.0:80990.0.0.0:* LISTEN 4653/haproxy tcp0 0 0.0.0.0:80990.0.0.0:* LISTEN 4221/haproxy tcp6 0 0 :::22 :::*LISTEN 855/sshd root@mylinux:~# service haproxy stop * Stopping haproxy haproxy [ OK ] root@mylinux:~# service haproxy status haproxy not running. root@mylinux:~# netstat -lntp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp0 0 0.0.0.0:80800.0.0.0:* LISTEN 4653/haproxy tcp0 0 0.0.0.0:80800.0.0.0:* LISTEN 4221/haproxy tcp0 0 0.0.0.0:80 0.0.0.0:* LISTEN 956/nginx tcp0 0 0.0.0.0:22 0.0.0.0:* LISTEN 855/sshd tcp0 0 0.0.0.0:80900.0.0.0:* LISTEN 4653/haproxy tcp0 0 0.0.0.0:80900.0.0.0:* LISTEN 4221/haproxy tcp0 0 0.0.0.0:80990.0.0.0:* LISTEN 4653/haproxy tcp0 0 0.0.0.0:80990.0.0.0:* LISTEN 4221/haproxy tcp6 0 0 :::22 :::*LISTEN 855/sshd root@mylinux:~# killall haproxy root@mylinux:~# netstat -lntp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp0 0 0.0.0.0:80 0.0.0.0:* LISTEN 956/nginx tcp0 0 0.0.0.0:22 0.0.0.0:* LISTEN 855/sshd tcp6 0 0 :::22 :::*LISTEN 855/sshd root@mylinux:~# service haproxy start * Starting haproxy haproxy [ OK ] root@mylinux:~# netstat -lntp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp0 0 0.0.0.0:80800.0.0.0:* LISTEN 8205/haproxy tcp0 0 0.0.0.0:80 0.0.0.0:* LISTEN 956/nginx tcp0 0 0.0.0.0:22 0.0.0.0:* LISTEN 855/sshd tcp0 0 0.0.0.0:80900.0.0.0:* LISTEN 8205/haproxy tcp0 0 0.0.0.0:80990.0.0.0:* LISTEN 8205/haproxy tcp6 0 0 :::22 :::*LISTEN 855/sshd root@mylinux:~# service haproxy restart *