LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-02-2011, 01:14 AM   #1
sgm277
LQ Newbie
 
Registered: Apr 2008
Posts: 13

Rep: Reputation: 0
vrrp_script not working


hello, I set tup a sample HA system using keepalived vrrp_script,but I want the vrrp_script is not working when I shutdown the mysql process,and not log found in /var/log/message related to vrrp_script, the version of keepalived I used is 1.2.2 and I also try 1.2.1,but both failed.

I am googling for long time but still don'g get any solution.

Had anybody encounted the same issue with me?
Thanks in advance.
Below is my keepalived.cfg
keepalived.conf

vrrp_script check_mysqld {
script "killall -0 mysqld"
interval 2
weight 4
}
vrrp_instance VI_1 {
state MASTER
interface eth0
virtual_router_id 51
priority 100
advert_int 1
virtual_ipaddress {
192.168.100.100
}
track_script{
check_mysqld
}
 
Old 08-02-2011, 08:59 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650
What does the backup nodes config look like ?

<edit> found an example HA mysqld config, there is a lot more detail there than you may have thought of </edit>

Last edited by kbp; 08-02-2011 at 09:04 PM.
 
Old 08-03-2011, 05:29 AM   #3
sgm277
LQ Newbie
 
Registered: Apr 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Hello kbp,

mysql slave configure is:

vrrp_script check_mysqld {
script "killall -0 mysqld"
interval 2
weight 4
}
vrrp_instance VI_1 {
state MASTER
interface eth0
virtual_router_id 51
priority 99
advert_int 1
virtual_ipaddress {
192.168.100.100
}
track_script{
check_mysqld
}
 
Old 08-03-2011, 07:10 AM   #4
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650
I just noticed you're missing a closing '}' on both scripts at the end, if you lay it out with proper indentation it will be easier to notice these kinds of mistakes

Eg.
Code:
vrrp_script check_mysqld {
    script "killall -0 mysqld"
    interval 2
    weight 4
}
vrrp_instance VI_1 {
    state MASTER
    interface eth0
    virtual_router_id 51
    priority 99
    advert_int 1
    virtual_ipaddress {
        192.168.100.100
    }
    track_script{
        check_mysqld
    }
}
 
Old 08-04-2011, 05:13 AM   #5
sgm277
LQ Newbie
 
Registered: Apr 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Sorry I missed one }, this is not the root cause, I had successfully used the vrrp_script function on Ubuntu box,I don't know why it is not working on CentOs X86_64 system.
I used keepalived -f /usr/local/etc/keepalived.conf --dont-fork --log-console --log-detail to try to troubleshut the issue but unfortunately I got the same log as /var/log/message,no valuable information found.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu 8.04: Transparent proxy using squid working but block domain not working bleketux Linux - Networking 10 03-16-2009 07:41 AM
media problem with .avi --- audio only in vlc working rest amarock ,etc. not working fedex Linux - Newbie 1 12-22-2007 09:06 AM
SED - minor changes work - Larger doesn't (working and non working code included) Nimoy Programming 17 09-22-2007 05:34 PM
Fortemedia FM801 card not working under FC5 on Intel 845 but working with windows morningkiran Linux - Hardware 0 11-30-2006 08:57 AM
acpi nearly working IBM thinkpad R40e 2684HVG no Fn key working, throttling OK Emmanuel_uk Linux - Laptop and Netbook 2 05-31-2006 02:41 AM


All times are GMT -5. The time now is 07:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration