Administration

Manage the HAProxy Enterprise service

This section describes how to manage the load balancer service on Linux.

Get the HAProxy Enterprise version Jump to heading

To see the installed version of the software:

bash
/opt/hapee-2.8/sbin/hapee-lb version
bash
/opt/hapee-2.8/sbin/hapee-lb version

Start and stop the service Jump to heading

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

Start the service:

bash
sudo systemctl start hapee-2.8-lb
bash
sudo systemctl start hapee-2.8-lb

Stop the service:

bash
sudo systemctl stop hapee-2.8-lb
bash
sudo systemctl stop hapee-2.8-lb

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

bash
sudo systemctl status hapee-2.8-lb
bash
sudo systemctl status hapee-2.8-lb
output
bash
hapee-2.8-lb.service - HAPEE Load Balancer
Loaded: loaded (/lib/systemd/system/hapee-2.8-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-2.8-lb.service
├─12977 /opt/hapee-2.8/sbin/hapee-lb -Ws -f /etc/hapee-2.8/hapee-lb.cfg -p /ruhapee-2.8-lb.pid
└─12992 /opt/hapee-2.8/sbin/hapee-lb -Ws -f /etc/hapee-2.8/hapee-lb.cfg -p /run/ hapee-2.8-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.
output
bash
hapee-2.8-lb.service - HAPEE Load Balancer
Loaded: loaded (/lib/systemd/system/hapee-2.8-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-2.8-lb.service
├─12977 /opt/hapee-2.8/sbin/hapee-lb -Ws -f /etc/hapee-2.8/hapee-lb.cfg -p /ruhapee-2.8-lb.pid
└─12992 /opt/hapee-2.8/sbin/hapee-lb -Ws -f /etc/hapee-2.8/hapee-lb.cfg -p /run/ hapee-2.8-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 Jump to heading

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

bash
sudo systemctl reload hapee-2.8-lb
bash
sudo systemctl reload hapee-2.8-lb

This sends the SIGUSR2 signal, which causes the load balancer’s main process to re-execute itself. It reloads the configuration file and creates new workers. No connections will be dropped.

In versions prior to 2.6r1, you must add the expose-fd listeners parameter on the stats socket line in the global section of your configuration for this to work. Versions 2.6r1 and later do not require this.

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

Validate your configuration Jump to heading

Use the hapee-lb program’s -c flag to check the validity of your configuration.

bash
sudo /opt/hapee-2.8/sbin/hapee-lb -c -f /etc/hapee-2.8/hapee-lb.cfg
bash
sudo /opt/hapee-2.8/sbin/hapee-lb -c -f /etc/hapee-2.8/hapee-lb.cfg
output
bash
Configuration file is valid
output
bash
Configuration file is valid

Multiple configuration files

If you have multiple configuration files in your application, be sure to check them all in the correct order.

If this page was useful, please, Leave the feedback.