I've encountered a weird bug and ran out of ways to troubleshoot it.
I've set up 3 virtual machines: LVS, RS1 and RS2.
RS1 and RS2 are running a simple php website. RS2 is an exact copy of RS1 with only the ip address changed.
All of the machines are conected to a local network (1.1.1.0/24
).
Here's my ipvsadm
config:
echo "1" > /proc/sys/net/ipv4/ip_forward
echo "0" > /proc/sys/net/ipv4/conf/all/send_redirects
echo "0" > /proc/sys/net/ipv4/conf/default/send_redirects
echo "0" > /proc/sys/net/ipv4/conf/eth0/send_redirects
LVS_IP=192.168.1.180
RS1_IP=1.1.1.2
RS2_IP=1.1.1.3
ipvsadm -A -t $LVS_IP:www -s rr
ipvsadm -a -t $RS1_IP:www -r $RS1_IP:www -m -w 1
ipvsadm -a -t $RS2_IP:www -r $RS2_IP:www -m -w 2
Running links 1.1.1.2
and links 1.1.1.3
displays the same positive result - the contents of my webpage.
However, running links 192.168.1.180
(LVS's external IP) gives me proper results... but only every other time (50% of requests). It seems that when the LVS round-robins the request to RS2, there's just no response. (links
says "Making connection..." and then nothing happens).
How can I attempt debugging such an issue?