[SOLVED] Getting a WRONGTYPE Operation against a key holding the wrong kind of value



  • Hello everyone, I'm getting the following error while importing a redis database into my current installation

      2019-05-23T12:59:50.619Z [4567/22105] - info:Initializing NodeBB v1.12.2 http://localhost:4567
      2019-05-23T12:59:53.799Z [4567/22105] - error: WRONGTYPE Operation against a key holding the wrong kind of value {"command":"ZRANGE","args"["plugins:active",0,-1],"code":"WRONGTYPE"}                               
    

    This is the type of the key plugins:active:

    127.0.0.1:6379> type plugins:active
    set
    

    I'm using Fedora 30 with NodeBB version 1.7.2

    Any help will be very appreciated!


  • GNU/Linux Admin

    It looks like the version of NodeBB you're migrating to is too new. In the new installation, you'll want to git checkout to v1.7.2, and then try to start NodeBB again.

    When you're ready to upgrade to the newest version, git fetch && git reset --hard origin/master and ./nodebb upgrade



  • Hello, I just did git checkout v1.7.2 but I'm getting the same error.

    Thank you so much for the response by the way 🙂



  • Did ./nodebb reset -p to see if this has something to do with the plugins. However, after I run ./nodebb upgrade (I get a out of date schema error) I get the same error I mentioned in the first post

    Here's the log

    
    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).
    
    23/5 15:25:13 [17973] - info: Initializing NodeBB v1.7.2 http://127.0.0.1:4567
    23/5 15:25:15 [17973] - error: Your NodeBB schema is out-of-date. Please run the following command to bring your dataset up to spec:
    23/5 15:25:15 [17973] - error:     ./nodebb upgrade
    [cluster] Child Process (17973) has exited (code: 0, signal: null)
    
    

    Then after the creation of the Global moderators group, this occurs

    Error occurred
    Error occurred during upgrade
    
    /var/www/[redacted]/src/cli/upgrade.js:68
    			throw err;
    			^
    ReplyError: WRONGTYPE Operation against a key holding the wrong kind of value
    

  • GNU/Linux Admin

    node app --upgrade should also work to run the upgrade scripts. Give that a shot...



  • Strange error

    node app --upgrade
    23/5 15:54:06 [18375] - info: NodeBB v1.7.2 Copyright (C) 2013-2019 NodeBB Inc.
    23/5 15:54:06 [18375] - info: This program comes with ABSOLUTELY NO WARRANTY.
    23/5 15:54:06 [18375] - info: This is free software, and you are welcome to redistribute it under certain conditions.
    23/5 15:54:06 [18375] - info:  
    
    Updating NodeBB...
    /var/www/[redacted]/src/cli/upgrade.js:90
    		if (options.package || options.install ||
    		            ^
    
    TypeError: Cannot read property 'package' of undefined
        at Object.runUpgrade [as upgrade] (/var/www/[redacted]/src/cli/upgrade.js:90:15)
        at Object.<anonymous> (/var/www/[redacted]/app.js:68:31)
        at Module._compile (internal/modules/cjs/loader.js:701:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
        at Module.load (internal/modules/cjs/loader.js:600:32)
        at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
        at Function.Module._load (internal/modules/cjs/loader.js:531:3)
        at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
        at startup (internal/bootstrap/node.js:283:19)
        at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
    

    I checked and I have a package.json and a package-lock.json file in my home directory



  • This was due to a version mismatch. I was trying to use the database with a previous version of NodeBB by mistake. I'm marking this as solved


Log in to reply
 

Suggested Topics

| |