Hello,
I'm trying to configure a HA+LB environment with heartbeat+ldirectord.
I followed this doc:
http://www.ultramonkey.org/3/topologies/hc-ha-lb-eg.html
heartbeat 2.0.7-2
ldirectord 1.2.5-3
kernel 2.6.18-5-686
ha.cf
==========================================================
logfacility local0
use_logd yes
keepalive 1
deadtime 10
warntime 5
initdead 150
udpport 695
bcast eth1
auto_failback off
node node1
node node2
respawn hacluster /usr/lib/heartbeat/ipfail
apiauth ipfail gid=haclient uid=hacluster
==========================================================
haresources
==========================================================
node1 ldirectord LVSSyncDaemonSwap::master \
IPaddr2::10.2.1.200/23/eth1/10.2.1.255
==========================================================
ldirector.cf
==========================================================
checktimeout=10
checkinterval=2
autoreload=no
logfile="local0"
quiescent=yes
logfile="/var/log/ldirectord.log"
virtual=10.2.1.200:20057
real=10.2.1.20:20057 gate
real=10.2.1.109:20057 gate
real=10.2.1.110:20057 gate
service=none
scheduler=wrr
checktype=connect
protocol=tcp
==========================================================
I can see LVS kernel table without problems:
node1:# ipvsadm -L -n
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 10.2.1.200:20057 wrr
-> 10.2.1.110:20057 Route 1 0 0
-> 10.2.1.109:20057 Route 1 0 0
-> 10.2.1.20:20057 Route 1 0 0
and VIP interface:
node1:/var/log# ip addr sh eth1
3: eth1: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen
1000
link/ether 00:30:48:41:9f:df brd ff:ff:ff:ff:ff:ff
inet 10.2.1.117/23 brd 10.2.1.255 scope global eth1
inet 10.2.1.200/23 brd 10.2.1.255 scope global secondary eth1
inet6 fe80::230:48ff:fe41:9fdf/64 scope link
valid_lft forever preferred_lft forever
Well, the problem is that the service only works a few seconds:
client1:~# telnet 10.2.1.200 20057
Trying 10.2.1.200...
Connected to 10.2.1.200 (10.2.1.200).
Escape character is '^]'.
+OK Server Health 2.0.c
quit
Connection closed by foreign host.
Connection closed by foreign host.
client1:~# telnet 10.2.1.200 20057
Trying 10.2.1.200...
Connected to 10.2.1.200 (10.2.1.200).
Escape character is '^]'.
+OK Server Health 2.0.c
quit
Connection closed by foreign host.
client1:~# telnet 10.2.1.200 20057
Trying 10.2.1.200...
telnet: connect to address 10.2.1.200: Connection refused
telnet: Unable to connect to remote host: Connection refused
client1:~# telnet 10.2.1.200 20057
Trying 10.2.1.200...
telnet: connect to address 10.2.1.200: Connection refused
telnet: Unable to connect to remote host: Connection refused
but, some seconds after...
client1:~# telnet 10.2.1.200 20057
Trying 10.2.1.200...
Connected to 10.2.1.200 (10.2.1.200).
Escape character is '^]'.
+OK Server Health 2.0.c
quit
Connection closed by foreign host.
[...]
some minutes after, the same situation.
but LVS kernel table says:
node1:/var/log# ipvsadm -L -n
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 10.2.1.200:20057 wrr
-> 10.2.1.110:20057 Route 1 0 2
-> 10.2.1.109:20057 Route 1 0 3
-> 10.2.1.20:20057 Route 1 0 2
Any ideas? Is it a problem with a real server? but If I try a telnet to
20057 port from master to all real servers, works fine..
Kind regards
Jordi
|