In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
The following brings you the experimental summary of the implementation of keepalived dual-master model lvs highly available cluster, hoping to bring some help to you in practical application. There are many things involved in load balancing, there are not many theories, and there are many books on the Internet. Today, we will use the accumulated experience in the industry to do an answer.
Implement keepalived dual master model lvs high availability cluster
I. Topology diagram
II. Environmental preparation
Two load balancer schedulers and two web CVMs.
Scheduler An environment:
VS: a network card
DIP:192.168.0.7/24
VIP (main): 192.168.0.200
VIP (standby): 192.168.0.201
Software package: yum install-y keepalived ipvsadm nginx (function: sorry-server service)
Scheduler B environment:
VS: a network card
DIP:192.168.0.8/24
VIP (main): 192.168.0.201
VIP (standby): 192.168.0.200
Software package: yum install-y keepalived ipvsadm nginx (function: sorry-server service)
Web Server An environment:
RS1:192.168.0.3
Lo:0:192.168.0.200
Lo:1:192.168.0.201
Software package: yum install-y httpd
Web Server B environment:
RS1:192.168.0.4
Lo:0:192.168.0.200
Lo:1:192.168.0.201
Software package: yum install-y httpd
III. Configuration
Scheduler A configuration
Main operations: ip configuration, time synchronization, hosts file changes, modification of hostname (to ensure that master and slave nodes can communicate), keepalived.conf configuration file changes, notification script configuration (two scripts), ipvsadm rule view
Ip configuration
[root@node1keepalived] # ip a1: lo: mtu 65536 qdisc noqueue state UNKNOWN qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6:: 1/128 scope host valid_lft forever preferred_lft forever2: ens33: mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:0c:29:0c:d2: 06 brd ff:ff:ff:ff:ff:ff inet 192.168.0.7/24 brd 192.168.0.255 scope global ens33 valid_lft forever preferred_lft forever inet 192.168.0.200/24 scope global secondary ens33:1 valid_lft forever preferred_lft forever inet6 fe80::20c:29ff:fe0c:d206/64 scope link valid_lft forever preferred_lft forever
Time synchronization
Ntpdate ntp-server-ip # ip of the time server
Hosts file
[root@node1 keepalived] # cat / etc/hosts127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 node1::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 node1192.168.0.8 node2192.168.0.7 node1
Hostname modification
Hostnamectl set-hostname node1
Keepalived.conf profile Chan
[root@localhost keepalived] # cat keepalived.conf! Configuration File for keepalivedglobal_defs {notification_email {root@localhost} notification_email_from keepalived@localhost smtp_server 127.0.0.1 smtp_connect_timeout 10 router_id node1vrrp_mcast_group4 224.0.0.223} vrrp_instance VI_1 {state MASTER interface ens33 virtual_router_id 51 priority 110 advert_int 1 authentication {auth_type PASS auth_pass JzvnmfkY} virtual_ipaddress { 192.168.0.200 etc/keepalived/notify1.sh master 24 dev ens33 label ens33:1} notify_master "/ etc/keepalived/notify1.sh master" notify_backup "/ etc/keepalived/notify1.sh backup" notify_fault "/ etc/keepalived/notify1.sh fault"} virtual_server 192.168.0.200 80 {delay_loop 3 lb_algo wrr lb_kind DR protocol TCP sorry_server 127.0.0.1 80 real_server 192.168.0.3 80 { Weight 2 HTTP_GET {url {path / status_code 200} connect_timeout 3 nb_get_retry 3 delay_before_retry 3}} real_server 192.168.0.4 80 {weight 1 HTTP_GET { Url {path / status_code 200} connect_timeout 3 nb_get_retry 3 delay_before_retry 3} vrrp_instance VI_2 {state BACKUP interface ens33 virtual_router_id 52 priority 90 advert_int 1 authentication {auth_type PASS auth_pass JzvnmfkY} Virtual_ipaddress {192.168.0.201 dev ens33 label ens33:2 24 dev ens33 label ens33:2} notify_master "/ etc/keepalived/notify2.sh master" notify_backup "/ etc/keepalived/notify2.sh backup" notify_fault "/ etc/keepalived/notify2.sh fault"} virtual_server 192.168.0.201 80 {delay_loop 3 lb_algo wrr lb_kind DR protocol TCP sorry_server 127.0.0.1 80 real_server 192.168 . 0.3 80 {weight 1 HTTP_GET {url {path / status_code 200} connect_timeout 3 nb_get_retry 3 delay_before_retry 3}} real_server 192.168.0.4 80 {weight 2 HTTP_GET {url {path / status_code 200} connect_timeout 3 nb_get_retry 3 delay_before_retry 3}
Notification script configuration
Script 1
[root@node1 keepalived] # cat notify1.sh #! / bin/bash#description: An example of notify script#vip=192.168.0.200contact='root@localhost'notify () {local mailsubject= "$(hostname) to be $1:$vip floating" local mailbody= "$(date +'% F% T'): vrrp1 transition,$ (hostname) changed to be $1" echo "$mailbody" | mail-s "$mailsubject" $contact} case $1 inmaster) notify backup;;fault) notify fault *) echo "Usage:$ (basename $0) {master | backup | fault}" exit 1 position ESAC
Script 2
[root@node1 keepalived] # cat notify2.sh #! / bin/bash#description: An example of notify script#vip=192.168.0.201contact='root@localhost'notify () {local mailsubject= "$(hostname) to be $1:$vip floating" local mailbody= "$(date +'% F% T'): vrrp2 transition,$ (hostname) changed to be $1" echo "$mailbody" | mail-s "$mailsubject" $contact} case $1 inmaster) notify backup;;fault) notify fault *) echo "Usage:$ (basename $0) {master | backup | fault}" exit 1 position ESAC
Ipvsadm rule view
[root@node1 keepalived] # ipvsadm-lnIP Virtual Server version 1.2.1 (size=4096) Prot LocalAddress:Port Scheduler Flags-> RemoteAddress:Port Forward Weight ActiveConn InActConnTCP 192.168.0.200 wrr 80 wrr-> 192.168.0.3 root@node1 keepalived 80 Route 200-> 192.168.0.4 lnIP Virtual Server version 80 Route 1 00 TCP 192.168.0.201 Route 80 wrr-> 192.168.0.3 Route 80 Route 100-> 192.168.0.4 Route 20 0
Scheduler B configuration
Main operations: ip configuration, time synchronization, hosts file changes, modification of hostname (to ensure that master and slave nodes can communicate), keepalived.conf configuration file changes, notification script configuration (two scripts), ipvsadm rule view
Ip configuration
[root@node2 keepalived] # ip a1: lo: mtu 65536 qdisc noqueue state UNKNOWN qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6:: 1/128 scope host valid_lft forever preferred_lft forever2: ens33: mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:0c:29:3f:e3 : 9e brd ff:ff:ff:ff:ff:ff inet 192.168.0.8/24 brd 192.168.0.255 scope global ens33 valid_lft forever preferred_lft forever inet 192.168.0.201/24 scope global secondary ens33:2 valid_lft forever preferred_lft forever inet6 fe80::20c:29ff:fe3f:e39e/64 scope link valid_lft forever preferred_lft forever
Time synchronization
Ntpdate ntp-server-ip
Hosts file change
[root@node2 keepalived] # cat / etc/hosts127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 node2::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 node2192.168.0.7 node1192.168.0.8 node2
Hostname modification
Hostnamectl set-hostname node2
Keepalived.conf profile Chan
[root@localhost keepalived] # cat keepalived.conf! Configuration File for keepalivedglobal_defs {notification_email {root@localhost} notification_email_from keepalived@localhost smtp_server 127.0.0.1 smtp_connect_timeout 10 router_id node2vrrp_mcast_group4 224.0.0.223} vrrp_instance VI_1 {state BACKUP interface ens33 virtual_router_id 51 priority 100 advert_int 1 authentication {auth_type PASS auth_pass JzvnmfkY} virtual_ipaddress { 192.168.0.200 dev ens33 label ens33:1 24 dev ens33 label ens33:1} notify_master "/ etc/keepalived/notify1.sh master" notify_backup "/ etc/keepalived/notify1.sh backup" notify_fault "/ etc/keepalived/notify1.sh fault"} virtual_server 192.168.0.200 80 {delay_loop 3 lb_algo wrr lb_kind DR protocol TCPsorry_server 127.0.0.1 80 real_ Server 192.168.0.3 80 {weight 2 HTTP_GET {url {path / status_code 200} connect_timeout 3 nb_get_retry 3 delay_before_retry 3}} real_server 192.168.0.4 80 {weight 1 HTTP_GET {url {path / status_code 200} connect_timeout 3 nb_get_retry 3 delay_before_retry 3} vrrp_instance VI_2 {state MASTER interface ens33 virtual_router_id 52 priority 100 advert_int 1 authentication {auth_type PASS Auth_pass JzvnmfkY} virtual_ipaddress {192.168.0.201 delay_loop 24 dev ens33 label ens33:2} notify_master "/ etc/keepalived/notify2.sh master" notify_backup "/ etc/keepalived/notify2.sh backup" notify_fault "/ etc/keepalived/notify2.sh fault"} virtual_server 192.168.0.201 80 {delay_loop 3 lb_algo wrr lb_kind DR Protocol TCPsorry_server 127.0.0.1 80 real_server 192.168.0.3 80 {weight 1 HTTP_GET {url {path / status_code 200} status_code 200} connect_timeout 3 nb_get_retry 3 delay_ Before_retry 3}} real_server 192.168.0.4 80 {weight 2 HTTP_GET {url {path / status_code 200} connect_timeout 3 nb_get_retry 3 delay_before_retry 3}
Notify script configuration (same as Scheduler A's script)
Script 1
[root@node2 keepalived] # cat notify1.sh #! / bin/bash#description: An example of notify script#vip=192.168.0.200contact='root@localhost'notify () {local mailsubject= "$(hostname) to be $1:$vip floating" local mailbody= "$(date +'% F% T'): vrrp1 transition,$ (hostname) changed to be $1" echo "$mailbody" | mail-s "$mailsubject" $contact} case $1 inmaster) notify backup;;fault) notify fault *) echo "Usage:$ (basename $0) {master | backup | fault}" exit 1 position ESAC
Script 2
[root@node2 keepalived] # cat notify2.sh #! / bin/bash#description: An example of notify script#vip=192.168.0.201contact='root@localhost'notify () {local mailsubject= "$(hostname) to be $1:$vip floating" local mailbody= "$(date +'% F% T'): vrrp2 transition,$ (hostname) changed to be $1" echo "$mailbody" | mail-s "$mailsubject" $contact} case $1 inmaster) notify backup;;fault) notify fault *) echo "Usage:$ (basename $0) {master | backup | fault}" exit 1 position ESAC
Web Server A configuration
Ip configuration
1: lo: mtu 65536 qdisc noqueue state UNKNOWN qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet 192.168.0.201/32 brd 192.168.0.201 scope global lo:1 valid_lft forever preferred_lft forever inet 192.168.0.200/32 brd 192.168.0.200 scope Global lo:0 valid_lft forever preferred_lft forever inet6:: 1/128 scope host valid_lft forever preferred_lft forever2: ens33: mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:0c:29:ab:50:14 brd ff:ff:ff:ff:ff:ff inet 192.168.0.4/24 brd 192.168.0.255 scope global ens33 valid_lft forever preferred_lft forever inet6 fe80::20c:29ff:feab: 5014/64 scope link valid_lft forever preferred_lft forever
Lvs-dr- preconfiguration script
Script 1
[root@localhost ~] # cat vip200-setrs.sh #! / bin/bash#vip=192.168.0.200mask='255.255.255.255'case $1 instart) echo 1 > / proc/sys/net/ipv4/conf/all/arp_ignoreecho 1 > / proc/sys/net/ipv4/conf/lo/arp_ignoreecho 2 > / proc/sys/net/ipv4/conf/all/arp_announceecho 2 > / proc/sys/net/ipv4/conf/lo/arp_announceifconfig lo:0$ vip netmask $mask broadcast $vip uproute add-host $vip dev lo:0 Stop) ifconfig lo:0 downecho 0 > / proc/sys/net/ipv4/conf/all/arp_ignoreecho 0 > / proc/sys/net/ipv4/conf/lo/arp_ignoreecho 0 > / proc/sys/net/ipv4/conf/all/arp_announceecho 0 > / proc/sys/net/ipv4/conf/lo/arp_announce;;*) echo "Usage $(basename $0) start | stop" exit 1
Script 2
[root@localhost ~] # cat vip201-setrs.sh #! / bin/bash#vip=192.168.0.201mask='255.255.255.255'case $1 instart) echo 1 > / proc/sys/net/ipv4/conf/all/arp_ignoreecho 1 > / proc/sys/net/ipv4/conf/lo/arp_ignoreecho 2 > / proc/sys/net/ipv4/conf/all/arp_announceecho 2 > / proc/sys/net/ipv4/conf/lo/arp_announceifconfig lo:1$ vip netmask $mask broadcast $vip uproute add-host $vip dev lo:1 Stop) ifconfig lo:1 downecho 0 > / proc/sys/net/ipv4/conf/all/arp_ignoreecho 0 > / proc/sys/net/ipv4/conf/lo/arp_ignoreecho 0 > / proc/sys/net/ipv4/conf/all/arp_announceecho 0 > / proc/sys/net/ipv4/conf/lo/arp_announce;;*) echo "Usage $(basename $0) start | stop" exit 1
Web Server B configuration
Ip configuration
[root@localhost ~] # ip A1: lo: mtu 65536 qdisc noqueue state UNKNOWN qlen 1 link/loopback 00VL 00VL 00VO 00VO 00VO 00VOO 00VO 00GUBE 0000 inet 127.0.0.1 brd 8 scope host lo valid_lft forever preferred_lft forever inet 192.168.0.201 brd 192.168.0.201 scope global lo:1 valid_lft forever preferred_lft forever inet 192.168.0.200 32 brd 192.168.0.200 scope global lo:0 valid_lft forever preferred_lft forever inet6:: 1/128 scope host valid_lft forever preferred_lft forever2: ens33: mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:0c:29:ab:50:14 brd ff:ff:ff:ff:ff:ff inet 192.168.0.4/24 brd 192.168.0.255 scope global ens33 valid_lft forever preferred_lft forever inet6 fe80 :: 20c:29ff:feab:5014/64 scope link valid_lft forever preferred_lft forever
Lvs-dr- preset script
The content of the script is the same as that of web Service A, and you can copy it.
Vip200-setrs.sh vip201-setrs.sh
Client test
Ip configuration
[root@localhost ~] # ip a
1: lo: mtu 65536 qdisc noqueue state UNKNOWN qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6:: 1/128 scope host valid_lft forever preferred_lft forever2: ens33: mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:0c:29:d0:37:77 brd ff:ff:ff : ff:ff:ff inet 192.168.0.14/24 brd 192.168.0.255 scope global ens33 valid_lft forever preferred_lft forever inet6 fe80::20c:29ff:fed0:3777/64 scope link valid_lft forever preferred_lft forever
Curl test
[root@localhost ~] # for i in {1.. 10}; do curl http://192.168.0.200;donebackend server1backend server1backend server2backend server1backend server1backend server2backend server1backend server1backend server2backend server1 [root@localhost ~] # for i in {1... 10}; do curl http://192.168.0.201;donebackend server1backend server2backend server2backend server1backend server2backend server2backend server1backend server2backend server2backend server1
Fourth, health status check and troubleshooting reference mode
Method 1: view the switching process of keepalived
Systemctl status keepalived
View messages by 2:mail command
Method 3: view web server logs
Tail / var/log/httpd/access_log
Tail / var/log/httpd/error_log
Fifth, simulated failure
1. Analog scheduler B fault
Operation on scheduler B
Stop the keepalived service
Systemctl stop keepalived [root@node2 keepalived] # systemctl status keepalived # analyzes the following information, VIP2 has removed Jul 02 10:18:53 node2 systemd [1]: Stopping LVS and VRRP High Availability Monitor...Jul 02 10:18:53 node2 Keepalived_vrrp [50773]: VRRP_Instance (VI_2) sending 0 priorityJul 02 10:18:53 node2 Keepalived_vrrp [50773]: VRRP_Instance (VI_2) removing protocol VIPs.Jul 02 10:18:53 node2 systemd [1]: Stopped LVS and VRRP High Availability Monitor.
View ip
[root@node2 keepalived] # ip a # VIP2 remove 1: lo: mtu 65536 qdisc noqueue state UNKNOWN qlen 1 link/loopback 00 scope host valid_lft forever preferred_lft forever2: ens33: mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ Ether 00:0c:29:3f:e3:9e brd ff:ff:ff:ff:ff:ff inet 192.168.0.8/24 brd 192.168.0.255 scope global ens33 valid_lft forever preferred_lft forever inet6 fe80::20c:29ff:fe3f:e39e/64 scope link valid_lft forever preferred_lft forever
Dispatcher An operation
[root@node1 keepalived] # systemctl status keepalived # analyzes the following information and shows that VIP drifts to scheduling A ● keepalived.service-LVS and VRRP High Availability Monitor Loaded: loaded (/ usr/lib/systemd/system/keepalived.service; enabled; vendor preset: disabled) Active: active (running) since Sun 2017-07-02 10:07:36 CST 17min ago Process: 20019 ExecStart=/usr/sbin/keepalived $KEEPALIVED_OPTIONS (code=exited Status=0/SUCCESS) Main PID: 20020 (keepalived) CGroup: / system.slice/keepalived.service ├─ 20020 / usr/sbin/keepalived-D ├─ 20021 / usr/sbin/keepalived-D └─ 20022 / usr/sbin/keepalived-DJul 02 10:07:37 node1 Keepalived_vrrp [20022]: Opening script file / etc/keepalived/notify1.shJul 02 10:07:37 node1 Keepalived_healthcheckers [20021]: Netlink reflector reports IP 192.168.0. 200 addedJul 02 10:07:42 node1 Keepalived_vrrp [20022]: VRRP_Instance (VI_1) Sending gratuitous ARPs on ens33 for 192.168.0.200Jul 02 10:18:54 node1 Keepalived_vrrp [20022]: VRRP_Instance (VI_2) Transition to MASTER STATEJul 02 10:18:55 node1 Keepalived_vrrp [20022]: VRRP_Instance (VI_2) Entering MASTER STATEJul 02 10:18:55 node1 Keepalived_vrrp [20022]: VRRP_Instance (VI_2) setting protocol VIPs.Jul 02 10:18: 55 node1 Keepalived_vrrp [20022]: VRRP_Instance (VI_2) Sending gratuitous ARPs on ens33 for 192.168.0.201Jul 02 10:18:55 node1 Keepalived_vrrp [20022]: Opening script file / etc/keepalived/notify2.shJul 02 10:18:55 node1 Keepalived_healthcheckers [20021]: Netlink reflector reports IP 192.168.0.201 addedJul 02 10:19:00 node1 Keepalived_vrrp [20022]: VRRP_Instance (VI_2) Sending gratuitous ARPs on ens33 for 192.168.0.201
Check email
[root@node1 keepalived] # mail # node1 becomes the master node of VIP192.168.0.201 Heirloom Mail version 12.5 7-5-10. Type? For help. "/ var/spool/mail/root": 1 message > 1 root Sun Jul 2 10:18 19 lemon 702 "node1 to be master:192.168.0.201 floating" & 1 Message 1:From root@node1.localdomain Sun Jul 2 10:18:55 2017Return-Path: X-Original-To: root@localhostDelivered-To: root@localhost.localdomainDate: Sun 02 Jul 2017 10:18:55 + 0800To: root@localhost.localdomainSubject: node1 to be master:192.168.0.201 floatingUser-Agent: Heirloom mailx 12.5 7/5/10Content-Type: text/plain Charset=us-asciiFrom: root@node1.localdomain (root) Status: RO2017-07-02 10:18:55:vrrp2 transition,node1 changed to be master
two。 Simulate web Server A failure (RS1)
Operation on webA
[root@localhost ~] # systemctl stop httpd
Operation on dispatcher A
Check email
[root@node1 keepalived] # mail # analysis of the following information shows that RS1 downtime Heirloom Mail version 12.5 7-5-10. Type? For help. "/ var/spool/mail/root": 4 messages 2 new 1 root Sun Jul 2 10:18 19 node1 702 "node1 to be master:192.168.0.201 floating" 2 root Sun Jul 2 10:28 19x702 "node1 to be backup:192.168.0.201 floating" > N 3 keepalived@localhost Sun Jul 2 10:28 17amp642 "[node1] Realserver [192.168.0.3] : 80-DOWN "N 4 keepalived@localhost Sun Jul 2 10:28 17 keepalived@localhost Sun Jul 642" [node1] Realserver [192.168.0.3]: 80-DOWN "
The client requests to view
[root@localhost ~] # curl http://192.168.0.200 # can only access RS2backend server2
Operation on scheduler B
[root@node2 keepalived] # mail # analysis of the following information shows that RS1 downtime Heirloom Mail version 12.5 7-5-10. Type? For help. "/ var/spool/mail/root": 4 messages 2 new 1 root Sun Jul 2 10:28 19 node2 702 "node2 to be backup:192.168.0.200 floating" 2 root Sun Jul 2 10:28 19x702 "node2 to be master:192.168.0.201 floating" > N 3 keepalived@localhost Sun Jul 2 10:28 17amp642 "[node2] Realserver [192.168.0.3] : 80-DOWN "N 4 keepalived@localhost Sun Jul 2 10:28 17 keepalived@localhost Sun Jul 642" [node2] Realserver [192.168.0.3]: 80-DOWN "
3. Simulate the dual-machine failure of web service
RS1 and RS2 stop the web service
Operation on dispatcher A
Check email # analyze the following information, you can see that both computers are down
[root@node1 keepalived] # mailHeirloom Mail version 12.5 7-5-10. Type? For help. "/ var/spool/mail/root": 6 messages 2 new 1 root Sun Jul 2 10:18 19 messages 702 "node1 to be master:192.168.0.201 floating" 2 root Sun Jul 2 10:28 19 var/spool/mail/root 702 "node1 to be backup:192.168.0.201 floating" 3 keepalived@localhost Sun Jul 2 10:28 18max 653 "[node1] Realserver [192.168.0.3" ]: 80-DOWN "4 keepalived@localhost Sun Jul 2 10:28 18Realserver 653" [node1] Realserver [192.168.0.3]: 80-DOWN "> N 5 keepalived@localhost Sun Jul 2 10:36 17DOWN 642" [node1] Realserver [192.168.0.4]: 80-DOWN "N 6 keepalived@localhost Sun Jul 2 10:36 17x642" [node1] Realserver [192.168.0.4]: 80-DOWN "
View keepalived status
[root@node1 keepalived] # systemctl status keepalived # analyze the following information, dual machine outage, start the sorry server ● keepalived.service-LVS and VRRP High Availability Monitor Loaded: loaded (/ usr/lib/systemd/system/keepalived.service; enabled; vendor preset: disabled) Active: active (running) since Sun 2017-07-02 10:07:36 CST 30min ago Process: 20019 ExecStart=/usr/sbin/keepalived $KEEPALIVED_OPTIONS (code=exited Status=0/SUCCESS) Main PID: 20020 (keepalived) CGroup: / system.slice/keepalived.service ├─ 20020 / usr/sbin/keepalived-D ├─ 20021 / usr/sbin/keepalived-D └─ 20022 / usr/sbin/keepalived-DJul 02 10:36:31 node1 Keepalived_healthcheckers [20021]: Removing alive servers from the pool for VS [192.168.0.200]: 80Jul 02 10:36:31 node1 Keepalived_healthcheckers [20021]: Remote SMTP Server [127.0.0.1]: 25 connected.Jul 02 10:36:31 node1 Keepalived_healthcheckers [20021]: SMTP alert successfully sent.Jul 02 10:36:32 node1 Keepalived_healthcheckers [20021]: Error connecting server [192.168.0.4]: 80.Jul 02 10:36:32 node1 Keepalived_healthcheckers [20021]: Removing service [192.168.0.4]: 80 from VS [192.168.0.201]: 80Jul 02 10:36:32 node1 Keepalived_healthcheckers [20021]: Lost Quorum 1-031 > 0 for VS [192.168.0.201]: 80Jul 02 10:36:32 node1 Keepalived_healthcheckers [20021]: Adding sorry server [127.0.0.1]: 80 to VS [192.168.0.201]: 80Jul 02 10:36:32 node1 Keepalived_healthcheckers [20021]: Removing alive servers from the pool for VS [192.168.0.201]: 80Jul 02 10:36:32 node1 Keepalived_healthcheckers [20021]: Remote SMTP server [127.0.0.1]: 25 connected.Jul 02 10:36:32 node1 Keepalived_healthcheckers [20021]: SMTP alert successfully sent.
Client request
[root@localhost ~] # curl http://192.168.0.201 # request to the web page of the sorry server sorry server [root@localhost ~] # curl http://192.168.0.200sorry server
After reading the above experimental summary on the implementation of keepalived dual master model lvs high availability cluster, if there is anything else you need to know, you can find what you are interested in in the industry information or find our professional and technical engineers to answer, technical engineers have more than ten years of experience in the industry.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.