{"id":1025,"date":"2017-04-27T09:35:02","date_gmt":"2017-04-27T08:35:02","guid":{"rendered":"http:\/\/www.haxed.me.uk\/?p=1025"},"modified":"2017-04-27T09:35:02","modified_gmt":"2017-04-27T08:35:02","slug":"recovering-corrupt-rpm-db","status":"publish","type":"post","link":"https:\/\/haxed.me.uk\/index.php\/2017\/04\/27\/recovering-corrupt-rpm-db\/","title":{"rendered":"Recovering Corrupt RPM DB"},"content":{"rendered":"<p>I had a support specialist today that had an open yum task they couldn&#8217;t kill gracefully, after kill -9, this was happening<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\t\r\n&#x5B;root@mybox home]# yum list | grep -i xml\r\nrpmdb: Thread\/process 31902\/140347322918656 failed: Thread died in Berkeley DB library\r\nerror: db3 error(-30974) from dbenv-&amp;gt;failchk: DB_RUNRECOVERY: Fatal error, run database recovery\r\nerror: cannot open Packages index using db3 -  (-30974)\r\nerror: cannot open Packages database in \/var\/lib\/rpm\r\nCRITICAL:yum.main:\r\nError: rpmdb open failed\r\n&#x5B;root@mybox home]#\r\n<\/pre>\n<p>The solution to fix this is to manually erase the yumdb and to manually rebuild it;<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n\r\n&#x5B;root@mybox home]# rm -f \/var\/lib\/rpm\/__*\r\n&#x5B;root@mybox home]# rpm --rebuilddb\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I had a support specialist today that had an open yum task they couldn&#8217;t kill gracefully, after kill -9, this was happening &#x5B;root@mybox home]# yum list | grep -i xml rpmdb: Thread\/process 31902\/140347322918656 failed: Thread died in Berkeley DB library &hellip; <a href=\"https:\/\/haxed.me.uk\/index.php\/2017\/04\/27\/recovering-corrupt-rpm-db\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,7,61,88],"tags":[],"class_list":["post-1025","post","type-post","status-publish","format-standard","hentry","category-linux","category-management-tools","category-rackspace","category-yum"],"_links":{"self":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/1025","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/comments?post=1025"}],"version-history":[{"count":1,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/1025\/revisions"}],"predecessor-version":[{"id":1026,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/1025\/revisions\/1026"}],"wp:attachment":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/media?parent=1025"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/categories?post=1025"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/tags?post=1025"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}