Configuring and running the local balancer on a cluster node

3 July 2024

ID 243044

Only applicable when integrating with multiple servers of KATA 5.0 or a later version.

To configure the local balancer on a cluster node:

  1. Start an operating system command shell on the cluster node to run commands with superuser (system administrator) permissions.
  2. Rename the basic configuration file of the balancer with the following command:

    mv /etc/haproxy/haproxy.cfg /etc/haproxy/haproxy.cfg.orig

  3. Place the previously prepared configuration haproxy.cfg configuration file in the /etc/haproxy directory and set access rights for it using the following commands:

    chown root:root /etc/haproxy/haproxy.cfg

    chmod 640 /etc/haproxy/haproxy.cfg

  4. Create the /etc/rsyslog.d/haproxy.conf file with the following content:

    $ModLoad imudp

    $UDPServerRun 514

    $UDPServerAddress 127.0.0.1

    if $syslogfacility-text == 'local6' then /var/log/haproxy.log

    if $syslogfacility-text == 'local6' then stop

    if $programname startswith 'haproxy' then /var/log/haproxy.log

    if $programname startswith 'haproxy' then stop

  5. Create the /var/log/haproxy.log file and set access rights for it using the following commands:

    touch /var/log/haproxy.log

    chown root:adm /var/log/haproxy.log

    chmod 640 /var/log/haproxy.log

  6. If necessary, edit the log rotation settings file for the local balancer (/etc/logrotate.d/haproxy).

    By default, entries are rotated daily.

  7. Restart the system log service:

    systemctl restart rsyslog

  8. Start the local balancer service:

    systemctl start haproxy

  9. Allow running the local balancer service automatically:

    systemctl enable haproxy

  10. Check the status of the local balancer service:

    systemctl status haproxy

    The status must be running.

  11. Check the presence of entries in the local balancer log:

    tail /var/log/haproxy.log

The local balancer is configured and started on the KSMG cluster node.

Did you find this article helpful?
What can we do better?
Thank you for your feedback! You're helping us improve.
Thank you for your feedback! You're helping us improve.