Junos OS

 View Only
last person joined: 2 days ago 

Ask questions and share experiences about Junos OS.

Could not open configuration database

  • 1.  Could not open configuration database

    Posted 04-04-2022 10:18
    Hi, community,

    I'm trying to recover a root password for an old MX5 with Junos 12.1 release 12.1R5.5, following this official guide Recover a Root Password. But after its starts, the recovery process type recovery on the console. I have an error related to "could not open the database".
    If the router is initiated in normal mode, no error appears and I have the normal prompt to login.
    Performing filesystem consistency checks ...
    /dev/da0s1a: FILE SYSTEM CLEAN; SKIPPING CHECKS
    /dev/da0s1a: clean, 395865 free (57 frags, 49476 blocks, 0.0% fragmentation)
    /dev/da0s1e: FILE SYSTEM CLEAN; SKIPPING CHECKS
    /dev/da0s1e: clean, 50271 free (15 frags, 6282 blocks, 0.0% fragmentation)
    
    Performing mount of main filesystems ...
    
    Performing filesystem consistency of secondary filesystems ...
    /dev/da1s1f: FILE SYSTEM CLEAN; SKIPPING CHECKS
    /dev/da1s1f: clean, 1346597 free (285 frags, 168289 blocks, 0.0% fragmentation)
    
    Performing mount of secondary filesystems ...
    Verified manifest signed by PackageProduction_12_1_0
    Verified jboot signed by PackageProduction_12_1_0
    Verified jbase-ppc-12.1R5.5 signed by PackageProduction_12_1_0
    Mounted jkernel package on /dev/md1...
    Verified manifest signed by PackageProduction_12_1_0
    Verified jkernel-ppc-12.1R5.5 signed by PackageProduction_12_1_0
    Mounted jpfe package on /dev/md2...
    Mounted jdocs package on /dev/md3...
    Verified manifest signed by PackageProduction_12_1_0
    Verified jdocs-12.1R5.5 signed by PackageProduction_12_1_0
    Mounted jroute package on /dev/md4...
    Verified manifest signed by PackageProduction_12_1_0
    Verified jroute-ppc-12.1R5.5 signed by PackageProduction_12_1_0
    machdep.bootsuccess: 1 -> 1
    
    Performing initialization of management services ...
    mgd: error: could not open database: /var/run/db/schema.db: No such file or directory
    mgd: error: Database open failed for file '/var/run/db/schema.db': No such file or directory
    mgd: error: could not open database schema: /var/run/db/schema.db
    mgd: error: could not open database schema
    mgd: error: database schema is out of date, rebuilding it
    mgd: error: could not open database: /var/run/db/juniper.data: No such file or directory
    mgd: error: Database open failed for file '/var/run/db/juniper.data': No such file or directory
    mgd: error: Cannot read configuration: Could not open configuration database
    Performing initialization of management services ...
    mgd: error: could not open database: /var/run/db/schema.db: No such file or directory
    mgd: error: Database open failed for file '/var/run/db/schema.db': No such file or directory
    mgd: error: could not open database schema: /var/run/db/schema.db
    mgd: error: could not open database schema
    mgd: error: database schema is out of date, rebuilding it
    mgd: error: could not open database: /var/run/db/juniper.data: No such file or directory
    mgd: error: Database open failed for file '/var/run/db/juniper.data': No such file or directory
    mgd: error: Cannot read configuration: Could not open configuration database
    
    
    Performing checkout of management services ...
    
    NOTE: Once in the CLI, you will need to enter configuration mode using
    NOTE: the 'configure' command to make any required changes. For example,
    NOTE: to reset the root password, type:
    NOTE:    configure
    NOTE:    set system root-authentication plain-text-password
    NOTE:    (enter the new password when asked)
    NOTE:    commit
    NOTE:    exit
    NOTE:    exit
    NOTE: When you exit the CLI, you will be asked if you want to reboot
    NOTE: the system
    
    Starting CLI ...
    ​

    After following the next step of changing the root password and typing commit through the CLI that appears after "Starting CLI ..." I can not commit and then the DB> prompt.
    If someone could give an idea of how to deal with this. I honestly will be so much relief.

    Best,

    Matias

    ------------------------------
    Matias Popo
    ------------------------------