High Availability Load Balancing with Linux Virtual Server

openSuSE Leap 42.1

I have three machines - two with web servers and one intended to be a Load Balancer with simple Round-Robin algorithm.
Both Web Servers are up and publish a simple test.html with “still alive” text.


**perth:~ # curl 192.168.56.11:80/test.html**
still alive
**perth:~ # curl 192.168.56.12:80/test.html**
still alive

I would like to use Linux Virtual Server therefore I followed SUSE 12 High Availability Load Balancing manual https://www.suse.com/documentation/sle_ha/book_sleha/data/cha_ha_lvs.html

After installing yast2-iplb package I used Yast2 GUI to edit /etc/ha.d/ldirector.cf


autoreload = yes
checkinterval = 5
checktimeout = 3
quiescent = yes
virtual = 192.168.56.13:80
        checktype = negotiate
        protocol = tcp
        real = 192.168.56.11:80 gate
        real = 192.168.56.12:80 gate
        receive = "still alive"
        request = "test.html"
        scheduler = rr
        service = http

When I try to start the service, it fails.


**perth:~ # systemctl status ldirectord**
ldirectord.service - Monitor and administer real servers in a LVS cluster of load balanced virtual servers
   Loaded: loaded (/usr/lib/systemd/system/ldirectord.service; enabled)
   Active: active (running) since Tue 2015-11-17 22:29:21 AWST; 51min ago
  Process: 732 ExecStartPost=/usr/bin/touch /var/lock/subsys/ldirectord (code=exited, status=0/SUCCESS)
  Process: 523 ExecStart=/usr/sbin/ldirectord start (code=exited, status=0/SUCCESS)
 Main PID: 734 (ldirectord)
   CGroup: /system.slice/ldirectord.service
           └─734 /usr/bin/perl -w /usr/sbin/ldirectord start
**perth:~ # systemctl start ipvsadm**
Job for ipvsadm.service failed. See "systemctl status ipvsadm.service" and "journalctl -xn" for details.
**perth:~ # systemctl status ipvsadm**
ipvsadm.service - Initialise the Linux Virtual Server
   Loaded: loaded (/usr/lib/systemd/system/ipvsadm.service; enabled)
   Active: failed (Result: exit-code) since Tue 2015-11-17 23:07:24 AWST; 11s ago
  Process: 1819 ExecStart=/bin/bash -c exec /sbin/ipvsadm-restore < /etc/sysconfig/ipvsadm (code=exited, status=255)
 Main PID: 1819 (code=exited, status=255)

Nov 17 23:07:24 perth bash[1819]: Try `ipvsadm -h' or 'ipvsadm --help' for more information.

Service log says rather nothing:


perth:~ # journalctl -xn
-- Logs begin at Tue 2015-11-17 04:16:56 AWST, end at Tue 2015-11-17 23:07:24 AWST. --
Nov 17 22:37:56 perth kernel: IPVS: __ip_vs_del_service: enter
Nov 17 22:39:01 perth sshd[1566]: Accepted keyboard-interactive/pam for root from 192.168.56.1 por
Nov 17 22:39:01 perth sshd[1566]: pam_unix(sshd:session): session opened for user root by (uid=0)
Nov 17 22:42:19 perth bash[1626]: Try `ipvsadm -h' or 'ipvsadm --help' for more information.
Nov 17 22:45:01 perth cron[1657]: pam_unix(crond:session): session opened for user root by (uid=0)
Nov 17 22:45:01 perth CRON[1657]: pam_unix(crond:session): session closed for user root
Nov 17 23:00:01 perth cron[1718]: pam_unix(crond:session): session opened for user root by (uid=0)
Nov 17 23:00:01 perth CRON[1718]: pam_unix(crond:session): session closed for user root
Nov 17 23:07:24 perth bash[1819]: Try `ipvsadm -h' or 'ipvsadm --help' for more information.
Nov 17 23:07:24 perth kernel: IPVS: __ip_vs_del_service: enter

I would like to ask for some hints or solution steps.
Thank you
Michal

Based on what you posted (I haven’t tried to set up HPC recently)

I’d start with investigating the error line

  Process: 1819 ExecStart=/bin/bash -c exec /sbin/ipvsadm-restore < /etc/sysconfig/ipvsadm

Maybe take a look in the YAST /etc/sysconfig editor to see if it’s there and what options might exist.
Maybe see if /sbin/ipvsadm-restore exists already. If it exists, maybe remove it. Permissions might not be correct to over-write.
As the error comment suggests, check whether ipvsadm can be invoked from the command line (with the help flag for testing)

TSU