Can't restore nodebb

Technical Support
  • i have installed nodebb on a new machine,

    I have copied my previous working .rdb file back into /var/lib/redis/dump.rdb

    but when i run sudo ./nodebb upgrade ... i get the following error:

    error: [upgrade] Errors were encountered while updating the NodeBB schema: ERR value is not a valid float

    and when i Run nodebb dev i get

    warn: Your NodeBB schema is out-of-date. Please run the following command to bring your dataset up to spec:
    12/8 12:05 [14923] - warn: ./nodebb upgrade

    Please help!

    Thanks

  • Hi there,

    Can you please provide the following information to help us debug?

    1. Server or client operating system (if applicable)
    2. NodeBB version and hash
      • To get the hash, run git rev-parse HEAD from the root of your NodeBB folder

    Thanks!

  • I got it kind of working on 0.6x but only by after resetting all plugins... i then upgraded to 0.7x, tried resetting all plugins and still doesn't work, i deleted the node_modules folder and tried npm update/install again and still get this error Ahhhhhhhh!!!!

    1. Bringing base dependencies up to date

    2. Updating NodeBB data store schema
      12/8 14:58 [23035] - info: Beginning database schema update
      12/8 14:58 [23035] - info: [2015/02/08] Clearing reset tokens skipped
      12/8 14:58 [23035] - info: [2015/02/17] renaming home.tpl to categories.tpl skipped
      12/8 14:58 [23035] - info: [2015/2/23] Activating NodeBB Essential Rewards - skipped
      12/8 14:58 [23035] - info: [2015/02/24] Upgrading plugins:active to sorted set skipped
      12/8 14:58 [23035] - info: [2015/02/24] Upgrading privilege groups to system groups skipped
      12/8 14:58 [23035] - info: [2015/02/25] Upgrading menu items to dynamic navigation system skipped
      12/8 14:58 [23035] - info: [2015/05/07] Upgrading uid mappings to sorted set skipped
      12/8 14:58 [23035] - info: [2015/05/08] Fixing emails skipped
      12/8 14:58 [23035] - info: [2015/05/11] Updating widgets to tjs 0.2x skipped
      12/8 14:58 [23035] - info: [2015/05/20] Adding username:sorted and email:sorted skipped
      12/8 14:58 [23035] - info: [2015/06/02] Creating group sorted sets
      12/8 14:58 [23035] - error: [upgrade] Errors were encountered while updating the NodeBB schema: ERR value is not a valid float

    3. Storing upgrade date in "package.json"

                     NodeBB Upgrade Complete!
      
  • @julian said:

    git rev-parse HEAD

    also

    1. Ubuntu Server
    2. 4bcf7792f826a42e21df08847926feb75da1f2c5
  • Hm, okay... can you paste the lines around it, so I can see which upgrade script caused the error?

  • Like this ?

    chas@vps192892:~/nodebb$ ./nodebb upgrade

    1. Bringing base dependencies up to date

    2. Updating NodeBB data store schema
      12/8 14:59 [1987] - info: Beginning database schema update
      12/8 14:59 [1987] - info: [2015/02/08] Clearing reset tokens skipped
      12/8 14:59 [1987] - info: [2015/02/17] renaming home.tpl to categories.tpl skipped
      12/8 14:59 [1987] - info: [2015/2/23] Activating NodeBB Essential Rewards - skipped
      12/8 14:59 [1987] - info: [2015/02/24] Upgrading plugins:active to sorted set skipped
      12/8 14:59 [1987] - info: [2015/02/24] Upgrading privilege groups to system groups skipped
      12/8 14:59 [1987] - info: [2015/02/25] Upgrading menu items to dynamic navigation system skipped
      12/8 14:59 [1987] - info: [2015/05/07] Upgrading uid mappings to sorted set skipped
      12/8 14:59 [1987] - info: [2015/05/08] Fixing emails skipped
      12/8 14:59 [1987] - info: [2015/05/11] Updating widgets to tjs 0.2x skipped
      12/8 14:59 [1987] - info: [2015/05/20] Adding username:sorted and email:sorted skipped
      12/8 14:59 [1987] - info: [2015/06/02] Creating group sorted sets
      12/8 14:59 [1987] - error: [upgrade] Errors were encountered while updating the NodeBB schema: ERR value is not a valid float

    3. Storing upgrade date in "package.json"

                     NodeBB Upgrade Complete!
      

    chas@vps192892:~/nodebb$

    Also while i try do a nodebb Setup

    12/8 15:00 [1994] - info: Now configuring redis database:
    Host IP or address of your Redis instance (127.0.0.1)
    Host port of your Redis instance (6379)
    Password of your Redis database
    Which database to use (0..n) (0)
    Configuration Saved OK
    [email protected] node_modules/redis

    [email protected] node_modules/connect-redis
    ā””ā”€ā”€ [email protected] ([email protected])
    Populating database with default configs, if not already set...
    Previous theme detected, skipping enabling default theme
    Categories OK. Found 27 categories.
    Administrator found, skipping Admin setup
    Enabling default plugins
    12/8 15:00 [1994] - warn: NodeBB Setup Aborted.
    Error: schema-out-of-date
    at /home/chas/nodebb/src/upgrade.js:43:29
    at try_callback (/home/chas/nodebb/node_modules/redis/index.js:573:9)
    at RedisClient.return_reply (/home/chas/nodebb/node_modules/redis/index.js:661:13)
    at ReplyParser.<anonymous> (/home/chas/nodebb/node_modules/redis/index.js:309:14)
    at ReplyParser.EventEmitter.emit (events.js:95:17)
    at ReplyParser.send_reply (/home/chas/nodebb/node_modules/redis/lib/parser/javascript.js:300:10)
    at ReplyParser.execute (/home/chas/nodebb/node_modules/redis/lib/parser/javascript.js:203:22)
    at RedisClient.on_data (/home/chas/nodebb/node_modules/redis/index.js:534:27)
    at Socket.<anonymous> (/home/chas/nodebb/node_modules/redis/index.js:91:14)
    at Socket.EventEmitter.emit (events.js:95:17)
    chas@vps192892:~/nodebb$

  • Would it help if i send you my rdb file? or do you think this could be fixable via the script? I dont really want to have to downgrade to 0.6.x

  • Does this help?

    127.0.0.1:6379> get schemaDate
    "1432080000000"

    127.0.0.1:6379> zrange categories:cid 0 -1

    1. "1"
    2. "2"
    3. "3"
    4. "13"
    5. "14"
    6. "4"
    7. "25"
    8. "16"
    9. "5"
    10. "6"
    11. "17"
    12. "7"
    13. "9"
    14. "10"
    15. "18"
    16. "8"
    17. "11"
    18. "19"
    19. "12"
    20. "20"
    21. "26"
    22. "21"
    23. "22"
    24. "23"
    25. "24"
    26. "27"
    27. "28"
  • I fixed it using https://github.com/NodeBB/NodeBB/issues/1163

    and setting to todays date, so now it says "Schema is up-to-date" and all works perfectly.

    I hope its ok now? xD


Suggested Topics


  • Move MongoDB to clean NodeBB

    Solved Technical Support
    1
    0 Votes
    1 Posts
    314 Views

    Hello, I'm hosting my NodeBB on Digital Ocean and I want to move everything to an other database. We use MongoDB and we have a few problems. We don't know the MongoDB admin password/username.

    Do you know a way to do this or is there a plugin that makes this easier to do?
    Any help/advice is welcome and are there things we should do and don't do?

  • 0 Votes
    4 Posts
    3k Views

    The common causes for a session mismatch error are usually one of the following:

    1. Mis-configured URL parameter in your config.json file

    If you have a misconfigured url value in your config.json file, the cookie may be saved incorrectly (or not at all), causing a session mismatch error. Please ensure that the link you are accessing your site with and the url defined match.

    2. Improper/malformed cookieDomain set in ACP

    Sometimes admins set this value without realising that they probably don't need to set it at all. The default is perfectly fine. This is what the config looks like:

    Cookie Domain setting

    If this is set, you'll want to revert the setting by editing your database directly:

    Redis: hdel config cookieDomain
    MongoDB: db.objects.update({ _key: "config" }, { $set: "cookieDomain": "" });

    3. Missing X-Forwarded-Proto header from nginx/apache

    If you are using a reverse proxy, you will need to have nginx pass a header through to NodeBB so it correctly determines the correct cookie secure property.

    In nginx, you will need to add the directive like so:

    location / { ... proxy_set_header X-Forwarded-Proto $scheme; ... }
  • 0 Votes
    8 Posts
    3k Views

    Yeah, the nginx config for subfolder installs is a bit tricky šŸ˜„ Glad you got it working!

  • Install NodeBB on VestaCP

    Technical Support
    16
    0 Votes
    16 Posts
    5k Views

    @felirami I have it almost working properly on Digital Ocean, see if it works for you https://github.com/doppioslash/docker-builds

    My problem is, it's not answering on port 80 from my custom domain, even though it's exposed.

  • 0 Votes
    6 Posts
    3k Views

    It is taking me some time - mostly because I'm not familiar enough with NodeJS / NodeBB.

    Some observations:

    Took a while to get the ./nodebb setup routine to work - had to do it first for MongoDB and then for Redis and then combine the two files and restart (redis / mongodb nodejs files do not get installed on the npm install command).

    Then got stuck with launching multiple processes on reboot with systemd. Gave up on that and just used a crontab @ reboot line to run a shell script. Need to figure out how to restart / reload processes seamlessly.

    Found some issues with socket.io and spdy - did not investigate, disabled spdy on nginx.

    Found some issues with the 0.7.0 branch and upgraded to master 0.7.1 and found that much more stable. But these were plugin related - sections, adsense - dropped them both.

    Made the mistake of setting the production flag in the environment variable NODE_ENV. šŸ™‚

    As of now, have a test site running persona, notifications plugins on a distributed setup - NFS / REDIS / MONGO DB on one server and a barebones NODEJS + NGINX/SSL on another.

    Seems stable for now on a test setup on https://devlib.org will give it a day or two while I play around with the templates / plugins and watch memory usage, before I go through another effort to set the autoscale / loadbalancer up.

    @baris @julian @psychobunny - I really like what I see so far. Well done. If all goes well with the setup / eval, I will be dropping you guys an email to see if I can fund some development. šŸ™‚