• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

Error during upgrade

Scheduled Pinned Locked Moved Technical Support
4 Posts 2 Posters 578 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Eric Ladner
    wrote on last edited by
    #1

    Encountered this error during upgrade (1.9.x -> 1.10.0).

    Forums are down, so I don't have access to the admin console. Looks like it's permissions based. Is it safe to delete the offending duplicate (and my command line mongodb kung fu is weak so assistiance would be grealy appreciated).

    Updating NodeBB...
    
    1. Updating package.json file with defaults...  OK
    
    2. Bringing base dependencies up to date...  started
    npm WARN [email protected] requires a peer of bufferutil@^3.0.2 but none was installed.
    npm WARN [email protected] requires a peer of erlpack@hammerandchisel/erlpack but none was installed.
    npm WARN [email protected] requires a peer of node-opus@^0.2.6 but none was installed.
    npm WARN [email protected] requires a peer of opusscript@^0.0.3 but none was installed.
    npm WARN [email protected] requires a peer of sodium@^2.0.1 but none was installed.
    npm WARN [email protected] requires a peer of libsodium-wrappers@^0.5.4 but none was installed.
    npm WARN [email protected] requires a peer of uws@^0.14.5 but none was installed.
    
    3. Checking installed plugins for updates...  OK
    4. Updating NodeBB data store schema...
    Parsing upgrade scripts... 
    OK | 4 script(s) found, 53 skipped
      → [2017/6/22] Hash all IP addresses stored in Recent IPs zset... OK
      → [2018/5/28] Give global search privileges... OK
      → [2018/6/7] Give post history viewing privilege to registered-users on all categories... OK
      → [2018/6/8] Give deleted post viewing privilege to moderators on all categories...
    2018-11-09T16:07:00.294Z [31427] - error: [groups.join] Could not create new hidden group MongoError: E11000 duplicate key error collection: nodebb.objects index: _key_1_value_-1 dup key: { : "group:cid:166:privileges:posts:view_deleted", : null }
        at Function.MongoError.create (/opt/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/error.js:45:10)
        at toError (/opt/nodebb/node_modules/mongodb/lib/utils.js:149:22)
        at /opt/nodebb/node_modules/mongodb/lib/collection.js:1029:39
        at /opt/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/connection/pool.js:544:18
        at _combinedTickCallback (internal/process/next_tick.js:73:7)
        at process._tickCallback (internal/process/next_tick.js:104:9)
    Error occurred
    Error occurred during upgrade: MongoError: E11000 duplicate key error collection: nodebb.objects index: _key_1_value_-1 dup key: { : "group:cid:166:privileges:posts:view_deleted", : null }
        at Function.MongoError.create (/opt/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/error.js:45:10)
        at toError (/opt/nodebb/node_modules/mongodb/lib/utils.js:149:22)
        at /opt/nodebb/node_modules/mongodb/lib/collection.js:1029:39
        at /opt/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/connection/pool.js:544:18
        at _combinedTickCallback (internal/process/next_tick.js:73:7)
        at process._tickCallback (internal/process/next_tick.js:104:9)
    
    /opt/nodebb/node_modules/mongodb/lib/utils.js:132
          throw err;
          ^
    MongoError: E11000 duplicate key error collection: nodebb.objects index: _key_1_value_-1 dup key: { : "group:cid:166:privileges:posts:view_deleted", : null }
        at Function.MongoError.create (/opt/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/error.js:45:10)
        at toError (/opt/nodebb/node_modules/mongodb/lib/utils.js:149:22)
        at /opt/nodebb/node_modules/mongodb/lib/collection.js:1029:39
        at /opt/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/connection/pool.js:544:18
        at _combinedTickCallback (internal/process/next_tick.js:73:7)
        at process._tickCallback (internal/process/next_tick.js:104:9)
    
    1 Reply Last reply
    0
  • barisB Offline
    barisB Offline
    <baris> NodeBB
    wrote on last edited by
    #2

    Try running the same upgrade script with ./nodebb upgrade view_deleted_privilege alternatively you can apply this fix and run it again. https://github.com/NodeBB/NodeBB/commit/472490158856efa22cfe4a2bbb29ab6ddf90a1cc

    1 Reply Last reply
    1
  • E Offline
    E Offline
    Eric Ladner
    wrote on last edited by Eric Ladner
    #3

    In a fit of desperation, I ran the nodebb upgrade again and it finished with no errors. Should I be worried? (yes, I made a backup so I have a safety net if necessary).

    1 Reply Last reply
    0
  • barisB Offline
    barisB Offline
    <baris> NodeBB
    wrote on last edited by
    #4

    Nope that upgrade can be run multiple times without side effects.

    1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development