Heartbeat installation and pit

===The first step: installation summary heartbeat====================
Preparations:
groupadd haclient< br>useradd -g haclient hacluster
yum install libtool-ltdl-devel
yum install asciidoc

cd Reusable-Cluster-Components-glue–0a7add1d9996/
./ autogen.sh
./configure –prefix=/usr/local/heartbeat –with-daemon-user=hacluster –with-daemon-group=haclient –enable-fatal-warnings=no LIBS=’/ lib64/libuuid.so.1′
make && make install

cd ../resource-agents-3.9.6/
./autogen.sh
./ configure –prefix=/usr/local/heartbeat –with-daemon-user=hacluster –with-daemon-group=haclient –enable-fatal-warnings=no LIBS=’/lib64/libuuid.so.1′
make && make install

cd ../Heartbeat-3-0-958e11be8686/
./bootstrap
export CFLAGS=”$CFLAGS -I/usr/local /heartbeat/include -L/usr/local/heartbeat/lib”
./configure –prefix=/usr/local/heartbeat –with-daemon-user=hacluster –with-daemon-group=haclient- -enable-fatal-warnings=no LIBS=’/lib64/libuuid.so.1′
make && make install

c p doc/{ha.cf,haresources,authkeys} /usr/local/heartbeat/etc/ha.d/
chkconfig –add heartbeat
chkconfig heartbeat on
chmod 600 /usr/local/heartbeat /etc/ha.d/authkeys
mkdir -pv /usr/local/heartbeat/usr/lib/ocf/lib/heartbeat/
cp /usr/lib/ocf/lib/heartbeat/ocf-* / usr/local/heartbeat/usr/lib/ocf/lib/heartbeat/
ln -svf /usr/local/heartbeat/lib64/heartbeat/plugins/RAExec/* /usr/local/heartbeat/lib/heartbeat/plugins /RAExec/
ln -svf /usr/local/heartbeat/lib64/heartbeat/plugins/* /usr/local/heartbeat/lib/heartbeat/plugins/

systemctl stop firewalld.service
If you do not turn off the firewall, you need:
systemctl start firewalld.service
iptables -t filter -INPUT -p udp -s 192.168.1.30 -m udp –dport 694 -j ACCEPT

systemctl restart heartbeat
systemctl status heartbeat

——— —————————–Step 2: -Configuration ————— ——————————
245:
[[email protected] ha.d]# uname- n
one1-fst-hx
eno1: 192.168.1.245

cd /usr/local/heartbeat/etc/ha.d/
#vi ha.cnf

ucast eno1 192.168.1.30
auto_failback on //This can be set to off
node one1-fst-hx
node one2-fst-hx
ping 192.168.1.1

# vi authkeys
auth 1
1 crc
//选择别的认证方式也可以

# vi haresources
one2-fst-hx 192.168.1.177/24/eno1:0

———————————-
30:
eno1: 192.168.1.30
# uname -n
one2-fst-hx

cd /usr/local/heartbeat/etc/ha.d/
#vi ha.cnf
ucast eno1 192.168 .1.254
The rest is the same

# vi haresources
one1-fst-hx 192.168.1.177/24/eno1:0

—–Configuration Another set of heartbeat————————————

245
enp5s0: 182.168.1.245

30
eno2: 182.168.1.30

——– —-Step 3: Start ——————–
systemctl enable heartbeat
systemctl start heartbeat
systemctl status heartbeat
——————————–
————–> >>>>>>Summary of problems<<<<<<<<<<<<<<<<<-------------------
1,< br>[[email Protected] ha.d]# system ctl status heartbeat
July 04 15:26:13 one2-fst-hx heartbeat[4923]: Jul 04 15:26:13 one2-fst-hx heartbeat: [4923]: ERROR: Illegal directive [ping] in /usr/local/heartbeat/etc/ha.d//ha.cf
July 04 15:26:13 one2-fst-hx heartbeat[4923]: [4923]: ERROR: Illegal directive [ping] in /usr/local/heartbeat/etc/ha.d//ha.cf

Try to solve 1:
Remove ping 192.168.1.1

Solution on the network:< br>respawn hacluster /usr/local/heartbeat/libexec/heartbeat/ipfail

2, [6189]: ERROR: Illegal directive [ucast] in /usr/local/heartbeat/etc/ha.d/ /ha.cf
Solution:
# ln -svf /usr/local/heartbeat/lib64/heartbeat/plugins/RAExec/* /usr/local/heartbeat/lib/heartbeat/plugins/RAExec/
# ln -svf /usr/local/heartbeat/lib64/heartbeat/plugins/* /usr/local/heartbeat/lib/heartbeat/plugins/

3, if the neighbor cannot be established, and it prompts that the fifo is full The possible reason:
The firewall is not turned off

4. After all started, no VIP is assigned.
Reason 1: The configuration on the master node is mismatched, as follows:
one2-fst-hx 192.168.1.177/24/eno1:0
Change to:
one1-fst-hx 192.168.1.177/24/eno1:0

5, install Aspect:
1), resource-agents-3.9.6
ln: Unable to create symbolic link” /usr/lib/ocf/resource.d/heartbeat/.ocf-binaries”: File already exists
make uninstall
systemctl restart heartbeat

/usr/bin/ld: cannot find -lplumb
Solution:
#locate libplumb
# Found that there is
in the /usr/local/heartbeat/ directory, but because multiple directories have been copied and installed multiple times, there is a problem, delete Restart the computer

2) Install glue
cd Reusable-Cluster-Components-glue–0a7add1d9996/
/home/asmPackage/heartbeat/Reusable-Cluster-Components-glue–0a7add1d9996 /include”
gmake[1]: *** No rules
Solution: yum install libtool-ltdl-devel

gmake[2]: a2x: Command not found
Solution: yum install asciidoc

6, Question:
[20579]: ERROR: should_drop_message: attempted replay attack [one2-fst-hx]? [gen = 1562225811, curgen = 1562596375]

Solution 1:
rm -f /usr/local/heartbeat/var/lib/heartbeat/hb_generation
rm -f /usr/local/heartbeat/var/lib/heartbeat/hb_uuid
systemctl restart heartbeat

not work

userdel -rf hacluster

groupdel haclient
or
/etc/group

—————————-

Note: When configuring resources When
wxy 192.168.1.250/24/eno1:0
It may not be exactly the same. Its principle is to execute a local executable file, such as 192.168.1.250/24/eno1:0, corresponding to IpAddr
, which means that an auxiliary interface named xx:0 will be created for the local interface. So The configuration of this interface should be consistent with your local situation

In addition:
ucast eno1 192.168.1.254
means to use your own eno1 interface to access the 192.168.1.254 ip for heartbeat detection

>

mysqldump -hlocalhost -uroot -pwww.huanxing.com -d fstgz>./fstgz.sql

Leave a Comment

Your email address will not be published.