-1

I am using RHEL 6.8 for load balancing using LVS direct routing. For some reason I had to restart my LVS router. after rebooting, LVS service was not working

I have done following things, still it is not working

/sbin/chkconfig --level 0123456 iptables on
/sbin/chkconfig --level 0123456 piranha-gui on
/sbin/chkconfig --level 0123456 pulse on
/sbin/chkconfig --level 0123456 sshd on
service httpd restart
service piranha-gui restart
service pulse restart
ipvsadm -A -t 10.209.104.60:80 -s rr
ipvsadm -a -t 10.209.104.60:80 -r 10.209.104.7:80 -g
ipvsadm -a -t 10.209.104.60:80 -r 10.209.104.5:80 -g

ifconfig command is not showing VIP as a alias to eth0 (which I think, should be automatically configured from /etc/sysconfig/ha/lvs.cf file)

LOG file entries

lvsprimary pulse[3143]: STARTING PULSE AS MASTER

lvsprimary pulse[3143]: partner dead: activating lvs

lvsprimary lvsd[3147]: starting virtual service loadbalancer active:80

lvsprimary kernel: IPVS: __ip_vs_del_service: enter

lvsprimary kernel:IPVS: __ip_vs_del_service: enter

lvsprimary lvsd[3147]: create_monitor for loadbalancer/server1 running as pid 3151

lvsprimary lvsd[3147]: create_monitor for loadbalancer/server2 running as pid 3152

lvsprimary nanny[3152]: starting LVS client monitor for 10.###.###.##:80 -> 10.2##.###.7:0

lvsprimary nanny[3151]: starting LVS client monitor for 10.###.###.##:80 -> 10.2##.###.5:0

lvsprimary pulse[3154]: gratuitous lvs arps finished

  • Are there any relevant messages in your logs ? – user9517 Feb 23 '17 at 06:59
  • @istheEnglishway not as such. when I run **service pulse restart**, the log messages ended with the message **gratuitous lvs arps finished** (which means the settings are normal) however, when I i used wireshark to trace the packets flow, I found that lvs router, it self is replying, unlike forwarding request to real servers as expected. – IAmSurajBobade Feb 23 '17 at 07:13

1 Answers1

0

You can see in the logs file, all the services are configured normally. As I mentioned in the one of the comments that, all configurations are normal but the problem is with packet forwading, even though ipvsadm rules are correcly stated.

PROBLEM

firewall rules are configured to default at the time of bootup

SOLUTION

run following command to flush all firewall rules

iptables -F

we can achieve this at bootup itself, just add this commands in the file /etc/rc.d/rc.local