銀河麒麟系統安裝mongodb副本集故障處理

chenoracle發表於2023-03-02

啟動資料庫

mongo@CJC-DB-001:/home/mongo$mongod -config /mongodb/38017/conf/mongodb.conf
mongod: error while loading shared libraries: libcrypto.so.10: cannot open shared object file: No such file or directory

檢查依賴包

root@CJC-DB-001:/root#ldd /mongodb/38017/dbms/bin/mongod
        linux-vdso.so.1 (0x00007ffce0edc000)
        libcurl.so.4 => /lib64/libcurl.so.4 (0x00007efe2d25f000)
        libresolv.so.2 => /lib64/libresolv.so.2 (0x00007efe2d247000)
        libcrypto.so.10 => not found
        libssl.so.10 => not found
        libdl.so.2 => /lib64/libdl.so.2 (0x00007efe2d242000)
        librt.so.1 => /lib64/librt.so.1 (0x00007efe2d237000)
        libm.so.6 => /lib64/libm.so.6 (0x00007efe2d0b2000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007efe2d099000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007efe2d078000)
        libc.so.6 => /lib64/libc.so.6 (0x00007efe2ceb7000)
        /lib64/ld-linux-x86-64.so.2 (0x00007efe3105d000)
        libnghttp2.so.14 => /lib64/libnghttp2.so.14 (0x00007efe2ce8d000)
        libidn2.so.0 => /lib64/libidn2.so.0 (0x00007efe2ce6d000)
        libssh.so.4 => /lib64/libssh.so.4 (0x00007efe2cdfd000)
        libpsl.so.5 => /lib64/libpsl.so.5 (0x00007efe2cdea000)
        libssl.so.1.1 => /lib64/libssl.so.1.1 (0x00007efe2cd56000)
        libcrypto.so.1.1 => /lib64/libcrypto.so.1.1 (0x00007efe2ca6e000)
        libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007efe2ca18000)
        libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007efe2c932000)
        libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007efe2c917000)
        libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007efe2c911000)
        libldap-2.4.so.2 => /lib64/libldap-2.4.so.2 (0x00007efe2c8c3000)
        liblber-2.4.so.2 => /lib64/liblber-2.4.so.2 (0x00007efe2c8b2000)
        libbrotlidec.so.1 => /lib64/libbrotlidec.so.1 (0x00007efe2c8a3000)
        libz.so.1 => /lib64/libz.so.1 (0x00007efe2c889000)
        libunistring.so.2 => /lib64/libunistring.so.2 (0x00007efe2c703000)
        libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007efe2c6f1000)
        libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007efe2c6eb000)
        libsasl2.so.3 => /lib64/libsasl2.so.3 (0x00007efe2c6cc000)
        libbrotlicommon.so.1 => /lib64/libbrotlicommon.so.1 (0x00007efe2c6a9000)
        libselinux.so.1 => /lib64/libselinux.so.1 (0x00007efe2c67b000)
        libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007efe2c640000)
        libsecurity.so.0 => /lib64/libsecurity.so.0 (0x00007efe2c63b000)
        libpcre2-8.so.0 => /lib64/libpcre2-8.so.0 (0x00007efe2c5a6000)

有兩個缺失的

libcrypto.so.10 => not found
libssl.so.10 => not found

檢查

root@CJC-DB-001:/soft/mongodb#rpm -qa|grep libcrypt

嘗試安裝compat-openssl10

root@CJC-DB-001:/soft/mongodb#yum install compat-openssl10
Error: There are no enabled repositories in "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".

手動下載並安裝compat-openssl10-1.0.2o-3.el8.x86_64.rpm

root@CJC-DB-001:/soft#ls -lrth compat-openssl10-1.0.2o-3.el8.x86_64.rpm 
-rw-r--r-- 1 root root 1.2M Feb 24 14:44 compat-openssl10-1.0.2o-3.el8.x86_64.rpm
root@CJC-DB-001:/soft#md5sum compat-openssl10-1.0.2o-3.el8.x86_64.rpm 
c8e09d89105874934683785ef539ac2c  compat-openssl10-1.0.2o-3.el8.x86_64.rpm
root@CJC-DB-001:/soft#rpm -ivh compat-openssl10-1.0.2o-3.el8.x86_64.rpm 
warning: compat-openssl10-1.0.2o-3.el8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 8483c65d: NOKEY
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:compat-openssl10-1:1.0.2o-3.el8  ################################# [100%]

再次啟動,恢復正常

mongo@CJC-DB-001:/home/mongo$mongod -config /mongodb/38017/conf/mongodb.conf
about to fork child process, waiting until server is ready for connections.
forked process: 1090166
child process started successfully, parent exiting



來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29785807/viewspace-2937748/,如需轉載,請註明出處,否則將追究法律責任。

相關文章