vincentbernat / haproxy-debian-repository-wizard

Web application to select the appropriate Debian repository for HAProxy
https://haproxy.debian.net
10 stars 7 forks source link

Broken HAProxy package #1

Closed joshuaspence closed 7 years ago

joshuaspence commented 9 years ago

Sorry for reporting this here... I wanted to report this on https://launchpad.net/~vbernat/+archive/ubuntu/haproxy-1.4 but I couldn't figure out how.

I wanted to report an issue with the HAProxy package. It seems that the latest DEB contains an invalid configuration file.

josh@ip-10-169-84-234:~$ sudo apt-get install haproxy
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  vim-haproxy
The following NEW packages will be installed:
  haproxy
0 upgraded, 1 newly installed, 0 to remove and 64 not upgraded.
Need to get 452 kB of archives.
After this operation, 817 kB of additional disk space will be used.
Get:1 http://ppa.launchpad.net/vbernat/haproxy-1.4/ubuntu/ precise/main haproxy amd64 1.4.25-2ppa1~precise [452 kB]
Fetched 452 kB in 0s (537 kB/s)  
Selecting previously unselected package haproxy.
(Reading database ... 67754 files and directories currently installed.)
Unpacking haproxy (from .../haproxy_1.4.25-2ppa1~precise_amd64.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up haproxy (1.4.25-2ppa1~precise) ...
 * Starting haproxy haproxy                                                                                                                          [ALERT] 132/200153 (23941) : config : no <listen> line. Nothing to do !
[ALERT] 132/200153 (23941) : Fatal errors found in configuration.
                                                                                                                                              [fail]
invoke-rc.d: initscript haproxy, action "start" failed.
dpkg: error processing haproxy (--configure):
 subprocess installed post-installation script returned error exit status 1
E: Sub-process /usr/bin/dpkg returned an error code (1)

The config file is as follows:

global
    log /dev/log    local0
    log /dev/log    local1 notice
    chroot /var/lib/haproxy
    user haproxy
    group haproxy
    daemon

defaults
    log global
    mode    http
    option  httplog
    option  dontlognull
        contimeout 5000
        clitimeout 50000
        srvtimeout 50000
    errorfile 400 /etc/haproxy/errors/400.http
    errorfile 403 /etc/haproxy/errors/403.http
    errorfile 408 /etc/haproxy/errors/408.http
    errorfile 500 /etc/haproxy/errors/500.http
    errorfile 502 /etc/haproxy/errors/502.http
    errorfile 503 /etc/haproxy/errors/503.http
    errorfile 504 /etc/haproxy/errors/504.http
vincentbernat commented 9 years ago

With HAProxy 1.4, it is not possible to have a valid configuration without a listener. You can just put a valid configuration or prevent HAProxy to start (update-rc.d haproxy disable).