HAProxy Enterprise Documentation 1.7r1

Start/Stop the Service

HAProxy Enterprise runs as a service, which you can start or stop by calling systemctl:

$ sudo systemctl start hapee-1.7-lb
$ sudo systemctl stop hapee-1.7-lb

Use the systemctl status command to check whether the service is running:

$ sudo systemctl status hapee-1.7-lb

  hapee-1.7-lb.service - HAPEE Load Balancer
    Loaded: loaded (/lib/systemd/system/hapee-1.7-lb.service; enabled; vendor preset: enabled)
    Active: active (running) since Wed 2020-12-02 15:56:43 UTC; 1min 35s ago
    Main PID: 12977 (hapee-lb)
    Tasks: 3 (limit: 1152)
    CGroup: /system.slice/hapee-1.7-lb.service
            ├─12977 /opt/hapee-1.7/sbin/hapee-lb -Ws -f /etc/hapee-1.7/hapee-lb.cfg -p /run/hapee-1.7-lb.pid
            └─12992 /opt/hapee-1.7/sbin/hapee-lb -Ws -f /etc/hapee-1.7/hapee-lb.cfg -p /run/hapee-1.7-lb.pid

  Dec 02 15:56:43 lb1 systemd[1]: Starting HAPEE Load Balancer...
  Dec 02 15:56:43 lb1 hapee-lb[12977]: [NOTICE] 336/155643 (12977) : New worker #1 (12992) forked
  Dec 02 15:56:43 lb1 systemd[1]: Started HAPEE Load Balancer.

Reload the configuration

To reload the HAProxy Enterprise configuration without restarting the process, call systemctl reload:

$ sudo systemctl reload hapee-1.7-lb

From a technical standpoint, this sends the SIGUSR2 signal, which causes HAProxy Enterprise's main process to re-execute itself. It reloads the configuration file and creates new workers. No connections will be dropped. However, you must keep the expose-fd listeners parameter on the stats socket line in the global section of your configuration for this to continue working:

$ stats socket  /var/run/hapee-1.7/hapee-lb.sock user hapee-lb group hapee mode 660 level admin expose-fd listeners

Start with split configuration files

If your configuration is split into several specific files (eg: tcp vs http), we recommend that you edit the service to load a directory rather than a single file. For example, place all of your .cfg files into the /etc/hapee-1.7 directory. Then, edit the file /lib/systemd/system/hapee-1.7-lb.service. Change the CONFIG parameter in the Environment field to point to the directory:

[Service]
Environment="CONFIG=/etc/hapee-1.7" "PIDFILE=/run/hapee-1.7-lb.pid"

Call systemctl daemon-reload and then restart the service:

$ sudo systemctl daemon-reload
$ sudo systemctl restart hapee-1.7-lb

Next up

Enable/Disable Servers