An error occurred while loading Linux Dynamic Link Library
After the pacemakerrpm package is installed, startup failure occurs because the dynamic link library is loaded. The following is a detailed description.
Problem
Compile and generate an rpm package for pacemaker 1.1.15, and install the pacemaker rpm package on other machines.
[root@srdsdevapp73 ~]# service pacemaker startStarting Pacemaker Cluster Manager [FAILED]
Environment
Cause
Through strace, we found that pacemaker failed to start because libcoroipcc. so.4 failed to load the library.
[root@srdsdevapp73 ~]# strace -f service pacemaker start...[pid 19960] writev(2, [{"pacemakerd", 10}, {": ", 2}, {"error while loading shared libra"..., 36}, {": ", 2}, {"libcoroipcc.so.4", 16}, {": ", 2}, {"cannot open shared object file", 30}, {": ...
Check pacemakerd with ldd and find that three databases cannot be found.
[root@srdsdevapp73 ~]# ldd /usr/sbin/pacemakerd linux-vdso.so.1 => (0x00007fffc4c9f000) libcrmcluster.so.4 => /usr/lib/libcrmcluster.so.4 (0x0000003cbac00000) libstonithd.so.2 => /usr/lib/libstonithd.so.2 (0x0000003cba400000) libcrmcommon.so.3 => /usr/lib/libcrmcommon.so.3 (0x0000003cb4c00000) libm.so.6 => /lib64/libm.so.6 (0x0000003cb3c00000) libcpg.so.4 => /usr/lib64/libcpg.so.4 (0x00007f3f72199000) libcfg.so.6 => /usr/lib64/libcfg.so.6 (0x00007f3f71f95000) libcmap.so.4 => /usr/lib64/libcmap.so.4 (0x00007f3f71d8f000) libquorum.so.5 => /usr/lib64/libquorum.so.5 (0x00007f3f71b8b000) libgnutls.so.26 => /usr/lib64/libgnutls.so.26 (0x0000003cb8800000) libcorosync_common.so.4 => /usr/lib64/libcorosync_common.so.4 (0x00007f3f71988000) libplumb.so.2 => /usr/lib64/libplumb.so.2 (0x00007f3f71754000) libpils.so.2 => /usr/lib64/libpils.so.2 (0x00007f3f7154b000) libqb.so.0 => /usr/lib64/libqb.so.0 (0x00007f3f712e6000) libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003cb2c00000) libbz2.so.1 => /lib64/libbz2.so.1 (0x0000003cb7000000) libxslt.so.1 => /usr/lib64/libxslt.so.1 (0x0000003cb4800000) libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x0000003cb6000000) libc.so.6 => /lib64/libc.so.6 (0x0000003cb2400000) libuuid.so.1 => /lib64/libuuid.so.1 (0x0000003cb5000000) libpam.so.0 => /lib64/libpam.so.0 (0x0000003cb6c00000) librt.so.1 => /lib64/librt.so.1 (0x0000003cb3000000) libdl.so.2 => /lib64/libdl.so.2 (0x0000003cb2800000) libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x0000003cb3800000) libltdl.so.7 => /usr/lib64/libltdl.so.7 (0x0000003cb8400000) libcoroipcc.so.4 => not found libcfg.so.4 => not found libconfdb.so.4 => not found libtasn1.so.3 => /usr/lib64/libtasn1.so.3 (0x0000003cb7800000) libz.so.1 => /lib64/libz.so.1 (0x0000003cb3400000) libgcrypt.so.11 => /lib64/libgcrypt.so.11 (0x0000003cb7400000) /lib64/ld-linux-x86-64.so.2 (0x0000003cb2000000) libaudit.so.1 => /lib64/libaudit.so.1 (0x0000003cb6400000) libcrypt.so.1 => /lib64/libcrypt.so.1 (0x0000003cb5c00000) libgpg-error.so.0 => /lib64/libgpg-error.so.0 (0x0000003cb6800000) libfreebl3.so => /lib64/libfreebl3.so (0x0000003cb5800000)
There is a piece of "/usr/lib/libcrmcluster. so.4" on it, which is strange. After confirmation, the file is incorrect. It is a previously installed version (it is not clear how it was installed ). The correct library location should be "/usr/lib64/libcrmcluster. so.4 ". After the old version of pacemaker is deleted, everything is normal.
[root@srdsdevapp73 ~]# rm -f /usr/lib/libcrm*[root@srdsdevapp73 ~]# rm -f /usr/lib/libstonithd.*[root@srdsdevapp73 ~]# ldd /usr/sbin/pacemakerd linux-vdso.so.1 => (0x00007fff9a3ff000) libcrmcluster.so.4 => /usr/lib64/libcrmcluster.so.4 (0x00007f849a1fc000) libstonithd.so.2 => /usr/lib64/libstonithd.so.2 (0x00007f8499fea000) libcrmcommon.so.3 => /usr/lib64/libcrmcommon.so.3 (0x00007f8499d93000) libm.so.6 => /lib64/libm.so.6 (0x0000003cb3c00000) libcpg.so.4 => /usr/lib64/libcpg.so.4 (0x00007f8499b8c000) libcfg.so.6 => /usr/lib64/libcfg.so.6 (0x00007f8499988000) libcmap.so.4 => /usr/lib64/libcmap.so.4 (0x00007f8499782000) libquorum.so.5 => /usr/lib64/libquorum.so.5 (0x00007f849957e000) libgnutls.so.26 => /usr/lib64/libgnutls.so.26 (0x0000003cb8800000) libcorosync_common.so.4 => /usr/lib64/libcorosync_common.so.4 (0x00007f849937b000) libplumb.so.2 => /usr/lib64/libplumb.so.2 (0x00007f8499147000) libpils.so.2 => /usr/lib64/libpils.so.2 (0x00007f8498f3e000) libqb.so.0 => /usr/lib64/libqb.so.0 (0x00007f8498cd9000) libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003cb2c00000) libbz2.so.1 => /lib64/libbz2.so.1 (0x0000003cb7000000) libxslt.so.1 => /usr/lib64/libxslt.so.1 (0x0000003cb4800000) libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x0000003cb6000000) libc.so.6 => /lib64/libc.so.6 (0x0000003cb2400000) libuuid.so.1 => /lib64/libuuid.so.1 (0x0000003cb5000000) libpam.so.0 => /lib64/libpam.so.0 (0x0000003cb6c00000) librt.so.1 => /lib64/librt.so.1 (0x0000003cb3000000) libdl.so.2 => /lib64/libdl.so.2 (0x0000003cb2800000) libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x0000003cb3800000) libltdl.so.7 => /usr/lib64/libltdl.so.7 (0x0000003cb8400000) libtasn1.so.3 => /usr/lib64/libtasn1.so.3 (0x0000003cb7800000) libz.so.1 => /lib64/libz.so.1 (0x0000003cb3400000) libgcrypt.so.11 => /lib64/libgcrypt.so.11 (0x0000003cb7400000) /lib64/ld-linux-x86-64.so.2 (0x0000003cb2000000) libaudit.so.1 => /lib64/libaudit.so.1 (0x0000003cb6400000) libcrypt.so.1 => /lib64/libcrypt.so.1 (0x0000003cb5c00000) libgpg-error.so.0 => /lib64/libgpg-error.so.0 (0x0000003cb6800000) libfreebl3.so => /lib64/libfreebl3.so (0x0000003cb5800000)[root@srdsdevapp73 ~]# service pacemaker startStarting Pacemaker Cluster Manager [ OK ]
Summary
In Linux, find the default path of the dynamic link library (not in/etc/ld. so. set in conf. When the dynamic link library is loaded, it will first find/etc/ld. so. the cache Library) order is as follows. If a library file with the same name is in front of the file, the dynamic link library loading may fail.
- /Lib
- /Usr/lib
- /Lib64
- /Usr/lib64