Symptoms
-
Unable to log into Plesk with the following error in browser screen:
Internal error: Unable to read components configuration from the service node: error: Failed to initialize NSS library Fatal error: plesk::InternalRpmError(Internal RPM error: Failed to initialize NSS library
-
Any operation with
rpm
oryum
shows error like below:error: Failed to initialize NSS library There was a problem importing one of the Python modules required to run yum. The error leading to this problem was: cannot import name ts Please install a package which provides this module, or verify that the module is installed correctly.
-
Files from packages
nss
ornss-util
are outdated:# rpm -ql nss | grep lib /usr/lib64/libnss3.so /usr/lib64/libnssckbi.so /usr/lib64/libsmime3.so /usr/lib64/libssl3.so /usr/lib64/nss/libnssckbi.so # ls -l /usr/lib64/libssl3.so -rwxr-xr-x 1 root root 341024 Feb 16 22:20 /usr/lib64/libssl3.so
# rpm -ql nss-util /usr/lib64/libnssutil3.so # ls -l /usr/lib64/libnssutil3.so -rwxr-xr-x 1 root root 194944 Feb 16 06:48 /usr/lib64/libnssutil3.so
# ls -l /usr/lib64/libnspr4.so -rwxr-xr-x 1 root root 251832 May 16 16:46 /usr/lib64/libnspr4.so
Cause
This behavior is caused by a bug with ID 1477308 in CentOS.
Resolution
-
Connect to the server via SSH.
-
Download packages for the necessary OS version (as an example resolution for CentOS 7.5 is given):
# wget http://fr2.rpmfind.net/linux/centos/7.5.1804/os/x86_64/Packages/nss-3.34.0-4.el7.x86_64.rpm # wget http://fr2.rpmfind.net/linux/centos/7.5.1804/os/x86_64/Packages/nss-util-3.34.0-2.el7.x86_64.rpm
-
Unpack packages:
# rpm2cpio nss-3.34.0-4.el7.x86_64.rpm | cpio -idmv
# rpm2cpio nss-util-3.34.0-2.el7.x86_64.rpm | cpio -idmv -
Create backups of libraries:
# mkdir /root/pleskbackup/
# cp /usr/lib64/libnss3.so /root/pleskback/
# cp /usr/lib64/libsmime3.so /root/pleskback/
# cp /usr/lib64/libssl3.so /root/pleskback/
# cp /usr/lib64/nss/libnssckbi.so /root/pleskback/
# cp /usr/lib64/libnssutil3.so /root/pleskback -
Replace libraries:
# cp /root/plesktest/usr/lib64/libnss3.so /usr/lib64/libnss3.so
# cp /root/plesktest/usr/lib64/libsmime3.so /usr/lib64/libsmime3.so
# cp /root/plesktest/usr/lib64/libssl3.so /usr/lib64/libssl3.so
# cp /root/plesktest/usr/lib64/nss/libnssckbi.so /usr/lib64/nss/libnssckbi.so
# cp /root/plesktest/usr/lib64/libnssutil3.so /usr/lib64/libnssutil3.so -
Restart services:
# service sw-engine restart
# service sw-cp-server restart
# service httpd restart
# service nginx restart