Bug 677871 - rpmdb open failed with pirut
rpmdb open failed with pirut
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: pirut (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: James Antill
Red Hat Satellite QA List
Depends On:
  Show dependency treegraph
Reported: 2011-02-16 02:06 EST by shunji
Modified: 2013-01-10 05:50 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-03-02 11:24:00 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description shunji 2011-02-16 02:06:10 EST
Description of problem:

When I go Applications -> Add/Remove Software, a window come up to tell the error occurred below.

Component: pirut
Summary: TBd2ec4f0a config.py:877:_getsysver:TypeError: rpmdb open failed

Traceback (most recent call last):
  File "/usr/sbin/pirut", line 490, in ?
  File "/usr/sbin/pirut", line 483, in main
    pm = PackageManager(options.config, options.onlyrepo)
  File "/usr/sbin/pirut", line 67, in __init__
    GraphicalYumBase.__init__(self, False, config)
  File "/usr/lib/python2.4/site-packages/pirut/__init__.py", line 137, in __init__
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 170, in doConfigSetup
    return self.conf
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 664, in <lambda>
    conf = property(fget=lambda self: self._getConfig(),
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 239, in _getConfig
    self._conf = config.readMainConfig(startupconf)
  File "/usr/lib/python2.4/site-packages/yum/config.py", line 804, in readMainConfig
    yumvars['releasever'] = _getsysver(startupconf.installroot, startupconf.distroverpkg)
  File "/usr/lib/python2.4/site-packages/yum/config.py", line 877, in _getsysver
    idx = ts.dbMatch('provides', distroverpkg)
TypeError: rpmdb open failed

Local variables in innermost frame:
installroot: /
ts: <rpmUtils.transaction.TransactionWrapper instance at 0xa12ee2c>
distroverpkg: redhat-release

Version-Release number of selected component (if applicable):

How reproducible:
From RHEL GUI, go Applications -> Add/Remove Software.

Steps to Reproduce:
1. From RHEL GUI, go Applications -> Add/Remove Software.
2. Wait for a while.
3. A window come up and tell the error happened.
Actual results:
A window come up and tell the error happened.

Expected results:
Add/Remove Software window come up.

Additional info:
No additional info.
Comment 1 James Antill 2011-02-16 10:15:04 EST
Does this happen repeatably?

Assuming so...

If yum-updated or yum-cron running? If so can you turn it off?

Then you could run:

rm -f /var/lib/rpm/__db*
rpm --rebuilddb

...as root, which should fix it.
Comment 2 shunji 2011-03-02 02:28:07 EST
Thank you, James.

I killed yum-updated process and did what you said, then the problem disappeared.
Sorry for the late notice.

Comment 3 James Antill 2011-03-02 11:24:00 EST
Ok, thanks.

Note You need to log in before you can comment on or make changes to this bug.