1

I'm using apache as a load balancer, I try to use heartbeat with it. To do this I have 2 load balancers with different IP adresses. This is my configuration :

In the file /etc/ha.d/ha.cf :

logfile /var/log/ha-log
bcast eth0
keepalive 2
warntime 10
deadtime 30
initdead 120
udpport 694
auto_failback yes
node apache-balance-1
node apache-balance-2
uuidfrom nodename
respawn hacluster /usr/lib/heartbeat/ipfail

In /etc/ha.d/haresources : (I'm not sure about this IP address, does it need to be real or virtual?)

apache-balance-1 192.168.1.51 apache2

In /etc/ha.d/authkeys :

auth 2
2 crc

Then I configure apache to listen on the vip. edit /etc/apache2/ports.conf on both load balancers: Listen 192.168.1.51:80 -> when I put this line on the file, apache do'nt want to start again.

Does everything ok? To test it I shutdown the IP address of the balance-1 but nothing work anymore, do you know why? The configuration or the test?

Thank you

Tom O'Connor
  • 27,480
  • 10
  • 73
  • 148
tranen
  • 41
  • 1
  • 2
  • What did you get in your log files `/var/log/messages/`, `/var/log/sys/log`? If you configured heartbeat on the two machines, one machine should automatically get the VIP. – Khaled Mar 07 '11 at 16:07
  • I have nothing on these files – tranen Mar 08 '11 at 04:27
  • When I do the ps auxef on the terminal I can see this on both of the servers. Does it mean that my configuration is wrong because they are both master? heartbeat: master control process \_ heartbeat: FIFO reader \_ heartbeat: write: bcast eth0 \_ heartbeat: read: bcast eth0 \_ /usr/lib/heartbeat/ipfail – tranen Mar 09 '11 at 07:51
  • Do you have any firewall between the two machines or on them? If so, you may need to allow heartbeat traffic. Also, try to stop heartbeat service and then start it on both machines. – Khaled Mar 09 '11 at 11:14

0 Answers0