Thanks for your reply!
I'm having the following configuration:
Two real servers with vmware server installed. I'm just looking at one of the two servers:
1st Real server (host):
- 1st interface: public IPs, connected to the internet over eth0
- 2nd interface: 1 private IP (192.168.1.2) connected over a switch to the other virtual server host
I followed your tutorial, but used the configuration like this:
two virtual clients : loadb1 (192.168.0.11) and loadb2 (192.168.0.12) bridged to eth1 (local net)
and instead of the local virtual IP a public virtual IP bridged to eth0
two virtual clients: web1 (192.168.0.61) and web2 (192.168.0.62) bridged to eth1 (local net)
I can access websites on web1/2 on the local net directly.
But I can't connect to the webservers using the load balancer over the public IP.
Configuration on load1: (load2 the same just the other local ip)
/etc/ha.d/haresources:
Code:
load1 \
ldirectord::ldirectord.cf \
LVSSyncDaemonSwap::master \
IPaddr2::aaa.aaa.aaa.aaa/24/eth0 \
IPaddr2::bbb.bbb.bbb.bbb/24/eth0
/etc/ha.d/ldirectord.cf:
Code:
checktimeout=10
checkinterval=2
autoreload=no
logfile="local0"
quiescent=yes
virtual=aaa.aaa.aaa.aaa:80
real=192.168.0.61:80 gate
real=192.168.0.62:80 gate
fallback=127.0.0.1:80 gate
service=http
request="ldirector.html"
receive="Test Page"
scheduler=wrr
protocol=tcp
checktype=negotiate
virtual=bbb.bbb.bbb.bbb:80
real=192.168.0.61:80 gate
real=192.168.0.62:80 gate
fallback=127.0.0.1:80 gate
service=http
request="ldirector.html"
receive="Test Page"
scheduler=wrr
protocol=tcp
checktype=negotiate
Where aaa.aaa.aaa.aaa and bbb.bbb.bbb.bbb are public IPs.
sysctl -p:
Code:
net.ipv4.ip_forward = 1
ipvsadm:
Code:
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP bbb.bbb.bbb.bbb:www wrr
-> 192.168.0.62:www Route 1 0 0
-> 192.168.0.61:www Route 1 0 0
TCP aaa.aaa.aaa.aaa:www wrr
-> 192.168.0.62:www Route 1 0 0
-> 192.168.0.61:www Route 1 0 0
Connection from a client (internet) over the load balancer's public IP
ipvsadm -L -c -n:
Code:
IPVS connection entries
pro expire state source virtual destination
TCP 00:51 SYN_RECV clientip:61625 aaa.aaa.aaa.aaa:80 192.168.0.62:80
The state "SYN_RECV" never changes and the client gets a timeout.
Configuration on web1/2:
ifconfig:
Code:
eth0 Link encap:Ethernet HWaddr 00:0C:29:25:96:2E
inet addr:192.168.0.61 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe25:962e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1671007 errors:0 dropped:0 overruns:0 frame:0
TX packets:1352975 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:148462185 (141.5 MiB) TX bytes:166755807 (159.0 MiB)
Interrupt:177 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:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
lo:0 Link encap:Local Loopback
inet addr:aaa.aaa.aaa.aaa Mask:255.255.255.255
UP LOOPBACK RUNNING MTU:16436 Metric:1
lo:1 Link encap:Local Loopback
inet addr:bbb.bbb.bbb.bbb Mask:255.255.255.255
UP LOOPBACK RUNNING MTU:16436 Metric:1
sysctl -p:
Code:
net.ipv4.conf.all.arp_ignore = 1
net.ipv4.conf.eth0.arp_ignore = 1
net.ipv4.conf.all.arp_announce = 2
net.ipv4.conf.eth0.arp_announce = 2
The gateway for the webservers:
route:
Code:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
when the client connects:
netstat:
Code:
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 aaa.aaa.aaa.aaa:www clientIP:61676 SYN_RECV
And here, it stays in the "SYN_RECV" state, too.
In my opinion the packets from the client are forwarded over the loadbalancer to the webserver. But here apache doesn't get the packets...
I don't know how to check each step, to evaluate the error...
Do you have any clue what the problem could be?
Thank you very much and best regards
Markus
Recent comments
13 hours 11 min ago
14 hours 11 min ago
17 hours 58 min ago
19 hours 12 min ago
22 hours 48 min ago
1 day 6 hours ago
1 day 14 hours ago
1 day 16 hours ago
2 days 7 hours ago
2 days 9 hours ago