Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
    
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 7 '11 at 16:07
    
I have nothing on these files –  tranen Mar 8 '11 at 4: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 9 '11 at 7: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 9 '11 at 11:14
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.