Home > Back-end >  Keepalived do nginx cluster, binding virtual IP cannot be accessed
Keepalived do nginx cluster, binding virtual IP cannot be accessed

Time:04-17

On both servers have installed nginx and keepalived, installation is complete, with real IP can be normal nginx, but after into virtual IP can't visit,
Beg ace can help to analyze the cause of the problem,,,,,,,,,,
The host keepalived configuration:
 
Global_defs {
Router_id 114.67.22.189
}

Vrrp_script chk_nginx {
The script "/home/check_nginx/check_nginx. Sh"
The interval of 2
Weight - 5
Losing 3
Rise 2
}

Vrrp_instance VI_1 {
State MASTER
Interface eth0
McAst_src_ip 114.67.22.189
Virtual_router_id 51
The priority of 101
Advert_int 2
The authentication {
The auth_type PASS
Auth_pass 1111
}
Virtual_ipaddress {
114.67.22.122
}
Track_script {
Chk_nginx
}


The standby keepalived configuration:
 
Global_defs {
Router_id LVS_DEVEL
}

Vrrp_script chk_nginx {
The script "/home/check_nginx/check_nginx. Sh"
The interval of 2
Weight - 5
Losing 3
Rise 2
}

Vrrp_instance VI_1 {
The state BACKUP
Interface eth0
McAst_src_ip 114.67.22.212
Virtual_router_id 51
The priority of 100
Advert_int 2
The authentication {
The auth_type PASS
Auth_pass 1111
}
Virtual_ipaddress {
114.67.22.122
}
Track_script {
Chk_nginx
}
}

CodePudding user response:

Virtual IP to also want to have a server running, see which servers to the virtual IP

CodePudding user response:

reference 1st floor tianfang response:
virtual IP to also want to have a server running, see which got the virtual IP server


Didn't understand what you mean? Virtual IP need a separate server is running?

CodePudding user response:

https://www.cnblogs.com/kevingrace/p/6138185.html

CodePudding user response:

Remove the
the configuration fileVrrp_strict

Restart keeplived (may want to add to unicast way), I was also not line, can now ping
  • Related