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 have a simple heartbeat setup that watches my 2 servers and transfers the ip public to another server in case of a crash

/etc/heartbeat/haresources

server1 192.168.1.203 nginx

However I would like nginx to be active on both servers (192.168.1.201 and 192.168.1.202) so that I can balance the backsteam load (why not, server is up anyway !)

unfortunately nginx takes over startup and shutdown of niginx leaving nginx not started on one server.

What is the best way to deal with this ?

Thx !

share|improve this question

1 Answer 1

You can simply remove the word nginx from /etc/heartbeat/haresources. So, the line will read:

server1 192.168.1.203

Don't forget to make sure nginx is started automatically during system startup.

share|improve this answer
    
thx, but please correct me if im wrong (and I probably am) but adding nginx to the line make heartbeat monitor nginx right ? So in case the server is up but nginx is down this wouldn't cause the ip to switch ? –  Floortje Sep 20 '12 at 13:57
    
@Floortje: heartbeat does not monitor services by default unless you combine it with some other tool like pacemaker. You can try to use monit if you don't want to go into the complications of adding service monitoring to heartbeat. –  Khaled Sep 20 '12 at 14:03
    
Ok thx ! Great awnser I will go and study more !! –  Floortje Sep 20 '12 at 14:05

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.