NodeBB 1.4.0 Update Dies with MongoDB



  • Going from NodeBB 1.3 to NodeBB 1.4. Using the standard command for the update, here is the error that I get:

    # git fetch; git pull; ./nodebb stop; ./nodebb upgrade; npm i; ./nodebb start; ./nodebb log
    Already up-to-date.
    NodeBB is already stopped.
    1. Bringing base dependencies up to date... OK
    2. Checking installed plugins for updates... OK
    3. Updating NodeBB data store schema...
    3/12 20:21 [23436] - info: [database] Checking database indices.
    3/12 20:21 [23436] - error: Error creating index Index with name: _key_1_value_-1 already exists with different options
    3/12 20:21 [23436] - info: [database] Checking database indices done!
    3/12 20:21 [23436] - error: MongoError: Index with name: _key_1_value_-1 already exists with different options
        at Function.MongoError.create (/opt/gamrhaus-1.0/node_modules/mongodb-core/lib/error.js:31:11)
        at /opt/gamrhaus-1.0/node_modules/mongodb-core/lib/connection/pool.js:462:72
        at authenticateStragglers (/opt/gamrhaus-1.0/node_modules/mongodb-core/lib/connection/pool.js:410:16)
        at Connection.messageHandler (/opt/gamrhaus-1.0/node_modules/mongodb-core/lib/connection/pool.js:444:5)
        at Socket.<anonymous> (/opt/gamrhaus-1.0/node_modules/mongodb-core/lib/connection/connection.js:306:22)
        at emitOne (events.js:96:13)
        at Socket.emit (events.js:188:7)
        at readableAddChunk (_stream_readable.js:176:18)
        at Socket.Readable.push (_stream_readable.js:134:10)
        at TCP.onread (net.js:548:20)
    
    Error: undefined
    
    Starting NodeBB
      "./nodebb stop" to stop the NodeBB server
      "./nodebb log" to view server output
      "./nodebb restart" to restart NodeBB
    
    
    Hit Ctrl-C to exit
    
        at /opt/gamrhaus-1.0/node_modules/mongodb-core/lib/connection/pool.js:462:72
        at authenticateStragglers (/opt/gamrhaus-1.0/node_modules/mongodb-core/lib/connection/pool.js:410:16)
        at Connection.messageHandler (/opt/gamrhaus-1.0/node_modules/mongodb-core/lib/connection/pool.js:444:5)
        at Socket.<anonymous> (/opt/gamrhaus-1.0/node_modules/mongodb-core/lib/connection/connection.js:306:22)
        at emitOne (events.js:96:13)
        at Socket.emit (events.js:188:7)
        at readableAddChunk (_stream_readable.js:176:18)
        at Socket.Readable.push (_stream_readable.js:134:10)
        at TCP.onread (net.js:548:20)
    [cluster] Child Process (21375) has exited (code: 0, signal: null)
    
    NodeBB v1.4.0 Copyright (C) 2013-2014 NodeBB Inc.
    This program comes with ABSOLUTELY NO WARRANTY.
    This is free software, and you are welcome to redistribute it under certain conditions.
    For the full license, please visit: http://www.gnu.org/copyleft/gpl.html
    
    Clustering enabled: Spinning up 1 process(es).
    
    3/12 20:21 [23619] - info: Time: Sat Dec 03 2016 20:21:26 GMT+0000 (UTC)
    3/12 20:21 [23619] - info: Initializing NodeBB v1.4.0
    3/12 20:21 [23619] - info: [database] Checking database indices.
    3/12 20:21 [23619] - error: Error creating index Index with name: _key_1_value_-1 already exists with different options
    3/12 20:21 [23619] - info: [database] Checking database indices done!
    3/12 20:21 [23619] - error:  MongoError: Index with name: _key_1_value_-1 already exists with different options
        at Function.MongoError.create (/opt/gamrhaus-1.0/node_modules/mongodb-core/lib/error.js:31:11)
        at /opt/gamrhaus-1.0/node_modules/mongodb-core/lib/connection/pool.js:462:72
        at authenticateStragglers (/opt/gamrhaus-1.0/node_modules/mongodb-core/lib/connection/pool.js:410:16)
        at Connection.messageHandler (/opt/gamrhaus-1.0/node_modules/mongodb-core/lib/connection/pool.js:444:5)
        at Socket.<anonymous> (/opt/gamrhaus-1.0/node_modules/mongodb-core/lib/connection/connection.js:306:22)
        at emitOne (events.js:96:13)
        at Socket.emit (events.js:188:7)
        at readableAddChunk (_stream_readable.js:176:18)
        at Socket.Readable.push (_stream_readable.js:134:10)
        at TCP.onread (net.js:548:20)
    [cluster] Child Process (23619) has exited (code: 0, signal: null)
    

    Tagging @julian @psychobunny @baris



  • For those looking through the logs, this is the key entry to notice:

    error: Error creating index Index with name: _key_1_value_-1 already exists with different options