After running through most of the steps outlined in the following tutorial: I'm finding that I do not get the desired output when running the following command on my load balancers: ip addr sh eth0 I see the following on lb1: eth0 Link encap:Ethernet HWaddr 00:0c:29:63:f7:5c inet addr:192.168.0.100 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fe63:f75c/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:15838 errors:0 dropped:0 overruns:0 frame:0 TX packets:8761 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:21111826 (20.1 MiB) TX bytes:844920 (825.1 KiB) Interrupt:18 Base address:0x1400 eth0:0 Link encap:Ethernet HWaddr 00:0c:29:63:f7:5c inet addr:192.168.0.99 Bcast:192.168.0.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:18 Base address:0x1400 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:8 errors:0 dropped:0 overruns:0 frame:0 TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:560 (560.0 B) TX bytes:560 (560.0 B) And on lb2: eth0 Link encap:Ethernet HWaddr 00:0c:29:63:f7:5c inet addr:192.168.0.101 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fe63:f75c/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:15838 errors:0 dropped:0 overruns:0 frame:0 TX packets:8761 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:21111826 (20.1 MiB) TX bytes:844920 (825.1 KiB) Interrupt:18 Base address:0x1400 eth0:0 Link encap:Ethernet HWaddr 00:0c:29:63:f7:5c inet addr:192.168.0.99 Bcast:192.168.0.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:18 Base address:0x1400 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:8 errors:0 dropped:0 overruns:0 frame:0 TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:560 (560.0 B) TX bytes:560 (560.0 B) It appears that both load balancers are actively listening on the 192.168.0.99 address. Based on the guide, only lb1 should actively be listening and lb2 will only listen on that address if lb1 goes down. The guide also did not walk through how to setup the /etc/network/interfaces file to setup eth0:0. I modified this file on both load balancer nodes and set them both to auto start the eth0:0 interface. This may be where I'm going wrong. Could someone point me to a sample /etc/network/interfaces file for this setup or identify what I might be missing? Thanks
Not sure why -- but when I restart the heartbeat service on LB1 -- then the two load balancers report the desired status. If I shutdown LB1, then LB2 takes over. When LB1 comes back online, then LB2 goes back to passive mode. I'm still confused as to why I have to restart the heartbeat service on LB1 for this to work properly. Also -- when attempting to access the backend webserver through the virtual IP (balanced between the two load balancers), I receive the following: 503 Service Unavailable No server is available to handle this request Any guidance would be appreciated.
Turns out I fat-fingered the check.txt file reference in the ha.cf file. After correcting this, the HAProxy stats page reported the correct status for the web servers. Once the load balancers saw the web servers as alive, content was served up from either server. I guess I should stop trying to configuring these things at so late at night.