Home > OS >  Keepalived track_script does not come into effect?
Keepalived track_script does not come into effect?

Time:11-01


Following the Keepalived Keepalived. Conf configuration has been not perform track_script for pick up???????

Configuration is as follows:
The master node 148:
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
! The Configuration File for keepalived

Global_defs {
Router_id 192.168.127.148
}
Vrrp_script chk_nginx {
The script "/etc/keepalived/nginx_check. Sh"
The interval of 2
Weight - 20
}

Vrrp_instance VI_1 {
State MASTER
Interface eth0
Virtual_router_id 51
McAst_src_ip 192.168.127.148
The priority of 100
Nopreempt
Advert_int 1
The authentication {
The auth_type PASS
Auth_pass 1111
}


Track_script {
Chk_nginx
}

Virtual_ipaddress {
192.168.127.222
}
}

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

The backup node 149:
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
! The Configuration File for keepalived

Global_defs {
Router_id 192.168.127.149
}

Vrrp_script chk_nginx {
The script "/etc/keepalived/nginx_check. Sh"
The interval of 2
Weight - 20
}
Vrrp_instance VI_1 {
The state BACKUP
Interface eth0
Virtual_router_id 51
McAst_src_ip 192.168.127.149
The priority of 90
Nopreempt
Advert_int 1
The authentication {
The auth_type PASS
Auth_pass 1111
}

Track_script {
Chk_nginx
}

Virtual_ipaddress {
192.168.127.222
}
}

CodePudding user response:

Vrrp_script chk_nginx among this method followed braces must be separated by a space, the next to you, separated by a try

CodePudding user response:

If not yet should be is a question of authority, you perform the chmod command to try
  • Related