65210: Acronis Cyber Infrastructure: Check for updates fails with "Cannot open Packages database in /var/lib/rpm"

use Google Translate

Last update: Thu, 2020-06-25 12:22

Symptoms

You get this error message on attempt to check cluster updates or start updates via WebCP -> Settings -> Updates:

Failed to start update check
Yum repository is inaccessible on <node_name>

Yum repository is accessible from the affected node, however, the log /var/log/vstorage-ui-agent/software-updates.log contains the following messages:

DEBUG 2020-06-24 09:24:10,824 r-8bb31a50aafa4c26 agent/business/models/runner.py:31:CmdRunner._internal_checked_execute command "['/usr/bin/check-hci-updates']" failed (c: 1, o: , e: error: rpmdb: BDB0113 Thread/process 22088/140233762031424 failed: BDB1507 Thread died in Berkeley DB library
error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db5 -  (-30973)
error: cannot open Packages database in /var/lib/rpm
error: rpmdb: BDB0113 Thread/process 22088/140233762031424 failed: BDB1507 Thread died in Berkeley DB library
error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages database in /var/lib/rpm
Traceback (most recent call last):
...
yum.Errors.YumBaseError: Error: rpmdb open failed

You see the same error when you check rpm commands manually:

[root@node01 ~]# rpm -qa
error: rpmdb: BDB0113 Thread/process 22088/140233762031424 failed: BDB1507 Thread died in Berkeley DB library
error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db5 -  (-30973)
error: cannot open Packages database in /var/lib/rpm
error: rpmdb: BDB0113 Thread/process 22088/140233762031424 failed: BDB1507 Thread died in Berkeley DB library
error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages database in /var/lib/rpm

Cause

RPM database on the node is corrupted. There are a number of factors that can lead to the RPM database corruption, such as incomplete previous transactions, installation of certain third-party software, removing specific packages.

Solution

Fix the issue by rebuilding RPM DB:

[root@node01~]# mkdir /tmp/bak
[root@node01 ~]# mv /var/lib/rpm/__db* /tmp/bak/
[root@node01 ~]# rpmdb --rebuilddb
[root@node01 ~]# rpm -qa | grep vstorage | head -n1
vstorage-ui-4.2.6-1.as7.x86_64

Re-try check for new updates from WebCP or via CLI:

[root@node01 ~]# vinfra software-updates check-for-updates
+---------+--------------------------------------+
| Field   | Value                                |
+---------+--------------------------------------+
| task_id | 69b78b39-f1f0-42d0-86b3-3b146fe8d822 |
+---------+--------------------------------------+
[root@node01 ~]# vinfra task show 69b78b39-f1f0-42d0-86b3-3b146fe8d822
+---------+------------------------------------------------------------------------+
| Field   | Value                                                                  |
+---------+------------------------------------------------------------------------+
| details |                                                                        |
| name    | backend.business.models.software_updates.tasks.CheckSoftwareUpdateTask |
| result  |                                                                        |
| state   | success                                                                |
| task_id | 69b78b39-f1f0-42d0-86b3-3b146fe8d822                                   |
+---------+------------------------------------------------------------------------+

More information

If the issue still persists, contact Acronis support for assistance.

 

Tags: