nodebb upgrade fails with Error: schema-out-of-date



  • Hello,

    I have a nodebb instance running 1.1.2 and it has started complaining about schema-out-of-date when I try to start it.

    To fix this, I am trying to run ./nodebb upgrade as several other threads here has suggested I should do. However it also fails. Here is the log:

    root@nodebb-develop-1:/nodebb-forum# ./nodebb upgrade                                                                                                       
    1. Bringing base dependencies up to date... OK                                                                                                                           
    2. Checking installed plugins for updates... OK                                                                                                                          
    3. Updating NodeBB data store schema...                                                                                                                                  
    31/10 15:58 [201] - info: NodeBB Setup Triggered via Command Line                                                                                                        
                                                                                                                                                                             
    Welcome to NodeBB!                                                                                                                                                       
                                                                                                                                                                             
    This looks like a new installation, so you'll have to answer a few questions about your environment before we can proceed.                                               
    Press enter to accept the default setting (shown in brackets).                                                                                                           
                                                                                                                                                                             
    31/10 15:58 [201] - info: Now configuring mongo database:                                                                                                                
    Configuration Saved OK                                                                                                                                                   
    31/10 15:58 [201] - warn: You have no mongo password setup!                                                                                                              
    31/10 15:58 [201] - info: [database] Checking database indices.                                                                                                          
    31/10 15:58 [201] - info: [database] Checking database indices done!                                                                                                     
    Populating database with default configs, if not already set...                                                                                                          
    Previous theme detected, skipping enabling default theme                                                                                                                 
    Categories OK. Found 8 categories.                                                                                                                                       
    Administrator found, skipping Admin setup                                                                                                                                
    31/10 15:58 [201] - info: Global Moderators group found, skipping creation!                                                                                              
    Enabling default plugins                                                                                                                                                 
    31/10 15:58 [201] - info: [install/defaultPlugins] customDefaults undefined                                                                                              
    31/10 15:58 [201] - info: [install/enableDefaultPlugins] activating default plugins 0=nodebb-plugin-composer-default, 1=nodebb-plugin-markdown, 2=nodebb-plugin-mentions,
     3=nodebb-widget-essentials, 4=nodebb-rewards-essentials, 5=nodebb-plugin-soundpack-default, 6=nodebb-plugin-emoji-extended, 7=nodebb-plugin-emoji-one                   
    31/10 15:58 [201] - warn: NodeBB Setup Aborted.                                                                                                                          
     Error: schema-out-of-date                                                                                                                                               
        at /nodebb-forum/src/upgrade.js:32:25                                                                                                                                
        at /nodebb-forum/src/database/mongo/hash.js:69:4                                                                                                                     
        at handleCallback (/nodebb-forum/node_modules/mongodb/lib/utils.js:96:12)                                                                                            
        at /nodebb-forum/node_modules/mongodb/lib/collection.js:1403:5                                                                                                       
        at handleCallback (/nodebb-forum/node_modules/mongodb/lib/utils.js:96:12)                                                                                            
        at /nodebb-forum/node_modules/mongodb/lib/cursor.js:675:5                                                                                                            
        at handleCallback (/nodebb-forum/node_modules/mongodb-core/lib/cursor.js:172:5)                                                                                      
        at nextFunction (/nodebb-forum/node_modules/mongodb-core/lib/cursor.js:682:5)                                                                                        
        at /nodebb-forum/node_modules/mongodb-core/lib/cursor.js:593:7                                                                                                       
        at queryCallback (/nodebb-forum/node_modules/mongodb-core/lib/cursor.js:233:18)                                                                                      
        at /nodebb-forum/node_modules/mongodb-core/lib/connection/pool.js:436:18                                                                                             
        at _combinedTickCallback (internal/process/next_tick.js:67:7)                                                                                                        
        at process._tickCallback (internal/process/next_tick.js:98:9)                                                                                                        
    OK                                                                                                                                                                       
                                                                                                                                                                             
      NodeBB Upgrade Complete!
    

    Does anyone have any ideas?


  • Global Moderator

    have you tried just running it? does it still give you that error? what version of nodebb? what commit?


  • Admin

    Seems like the upgrade script is actually triggering the NodeBB setup script instead... are you missing a config.json?



  • @PitaJ yes I have, when I try running NodeBB it stops with the same message. I am using v1.2.1 (from that tag in GitHub)

    @julian you have a point, the output of ./nodebb upgrade looks similar to the output when I am trying to start nodebb. There is a config.json present that was generated and used when the NodeBB installation was working.

    Thank you for the replies. I will keep digging now and see if I can find out anything more.


  • Admin

    What does node app --upgrade net you?


Log in to reply
 

Looks like your connection to NodeBB was lost, please wait while we try to reconnect.