Welcome to Centmin Mod Community
Become a Member

Cannot open packages database after NGINX update froze

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Jon Snow, Feb 6, 2019.

  1. Jon Snow

    Jon Snow Active Member

    614
    108
    43
    Jun 30, 2017
    Ratings:
    +166
    Local Time:
    1:23 AM
    Nginx 1.13.9
    MariaDB 10.1.31
    Was updating NGINX today but it froze up.

    When I try to update again, I get:
    Code (Text):
    error: rpmdb: BDB0113 Thread/process 22369/140007812810816 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 openPackages database  in /var/lib/rpm
    error: rpmdb: BDB0113 Thread/process 22369/140007812810816 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

    Do I delete the rpm database (corrupted?) and rebuild like? :
    Code (Text):
    yum clean all
    rm -f /var/lib/rpm/__db*
    rpm --rebuilddb
    yum update
     
  2. eva2000

    eva2000 Administrator Staff Member

    46,488
    10,557
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,390
    Local Time:
    2:23 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    how much memory on server, low memory is a common reason for corrupting yum database i.e. CentOS 7 needs minimum 1GB memory.

    yes those commands will rebuild the database.
     
  3. Jon Snow

    Jon Snow Active Member

    614
    108
    43
    Jun 30, 2017
    Ratings:
    +166
    Local Time:
    1:23 AM
    Nginx 1.13.9
    MariaDB 10.1.31
    Linode. 1 GB RAM.
     
  4. eva2000

    eva2000 Administrator Staff Member

    46,488
    10,557
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,390
    Local Time:
    2:23 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    could be running close to free memory availability depending on what was running. CentOS 7 min is 1GB and recommended is 2GB :)
     
  5. Jon Snow

    Jon Snow Active Member

    614
    108
    43
    Jun 30, 2017
    Ratings:
    +166
    Local Time:
    1:23 AM
    Nginx 1.13.9
    MariaDB 10.1.31
    I think it's stuck again:
    [​IMG]

    I think it froze around this part last time too. I clearly remember "incubator pagespeed".
     
  6. eva2000

    eva2000 Administrator Staff Member

    46,488
    10,557
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,390
    Local Time:
    2:23 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    nginx pagespeed module seems to take longer to compile just wait it out or disable nginx pagespeed if you are not using it
     
  7. eva2000

    eva2000 Administrator Staff Member

    46,488
    10,557
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,390
    Local Time:
    2:23 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    nginx pagespeed module seems to take longer to compile just wait it out or disable nginx pagespeed if you are not using it
     
  8. Jon Snow

    Jon Snow Active Member

    614
    108
    43
    Jun 30, 2017
    Ratings:
    +166
    Local Time:
    1:23 AM
    Nginx 1.13.9
    MariaDB 10.1.31
    @eva2000 How would I go about getting this updated? It was excluded when I was updating everything.

    Code (Text):
    Following Updates are available:
    -------------------------------------------------------------
    python2-pip.noarch                       8.1.2-7.el7                        epel


    Code (Text):
    yum update --disableplugin=priorities --enablerepo=remi
    Loaded plugins: fastestmirror, versionlock
    Loading mirror speeds from cached hostfile
     * base: mirrors.linode.com
     * epel: mirror.compevo.com
     * extras: mirrors.linode.com
     * remi: repo1.dal.innoscale.net
     * rpmforge: mirror.lstn.net
     * updates: mirrors.linode.com
    Excluding 1 update due to versionlock (use "yum versionlock status" to show it)
    No packages marked for update


    Code (Text):
    yum versionlock status
    Loaded plugins: fastestmirror, priorities, versionlock
    Loading mirror speeds from cached hostfile
     * base: mirrors.linode.com
     * epel: mirror.compevo.com
     * extras: mirrors.linode.com
     * rpmforge: mirror.lstn.net
     * updates: mirrors.linode.com
    284 packages excluded due to repository priority protections
    0:python2-pip-8.1.2-7.el7.*
    versionlock status done
     
  9. eva2000

    eva2000 Administrator Staff Member

    46,488
    10,557
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,390
    Local Time:
    2:23 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    123.09beta01 latest code no longer uses python2-pip so it's locked to prevent conflict with new method of updating pip which is automatically done when you run centmin.sh