Upgrading from v0.6.1 to v0.9.0
-
Perfect, so if the update script shows some missing dependencies, I will run "npm install"
Should be good to go now, will try to update tonight. -
Hey Julian,
Just want to understand something before I start the upgrade process.
Will the dump.rdb (redis database) be compatible with the newer version (0.9.0)? Has the database structure changed between version?I am now on 0.6.1, my upgrade plan is this:
EDIT :
updating the plan while I'm doing the update, I'm now on 0.7.3#Backup dump.rdb
#stop./nodebbv0.6.1 --> v0.7.3
$ git fetch
$ git checkout v0.7.x
$ npm install (needed before upgrade, missing dep.)
$ ./nodebb upgrade
#Start nodebb, test if changes worked
DONE!v0.7.3 --> v0.8.2
$ git fetch
$ git checkout v0.8.x
$ ./nodebb upgrade
DONE!, had to install some missing dependecy with npm, see under this post for detailsv0.8.2 --> v0.9.0
$ git fetch
$ git checkout v0.9.x
$ npm install (inside /nodebb directory)
$ ./nodebb upgradeI also made change to the code of a plugin I'm using Emailer (Postmark v 0.4.0), will the changes carry on or be overwritten by the upgrade process?
Let me know if something is not safe or missing in my upgrade plan, thanks a lot! -
Having a problem running ./nodebb upgrade from 0.7.x to 0.8.x
In file included from ../src/binding.cc:3:
../node_modules/nan/nan.h:316: error: ‘REPLACE_INVALID_UTF8’ is not a member of ‘v8::String’
make: *** [Release/obj.target/magic/src/binding.o] Error 1
gyp ERR! build error
gyp ERR! stack Error:make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Linux 2.6.32-573.1.1.el6.x86_64
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/maximur1/nodebb/node_modules/mmmagic
gyp ERR! node -v v0.10.36
gyp ERR! node-gyp -v v0.10.6
gyp ERR! not ok
npm ERR! weird error 1
npm ERR! not ok code 0inside :
npm http 200 https://registry.npmjs.org/nan/-/nan-2.0.9.tgzI tried npm install before but I get the same error.. investingating
-
Should I just go directly to 0.9.x and skip 0.8.x? Or is the update script mandatory to run between major version? Thanks
-
Unfortunately no, I think I have to fix the nan-2.0.9 issue first
Error while trying node app --upgrade
module.js:340
throw err;
^
Error: Cannot find module 'mmmagic'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/home/maximur1/nodebb/src/file.js:7:12)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17) -
Ok I got it to work but have this warning.. investigating
[email protected] [nodebb]# sudo ./nodebb upgrade
-
Bringing base dependencies up to date... OK
-
Updating NodeBB data store schema.
13/11 16:39 [5107] - error: Unable to initialize Redis! Is Redis installed? Error :Cannot find module 'redis' -
Storing upgrade date in "package.json"... OK
NodeBB Upgrade Complete!
-
-
I have Redis 2.8.19 installed
[email protected] [~]# sudo redis-server --version
Redis server v=2.8.19 sha=00000000:0 malloc=jemalloc-3.6.0 bits=64 build=8012391549b7b328Ok! will do!
Still getting the error after your command, should redis be up and running? it's running ATM.Note: I updated npm to solve the issue up there (REPLACE_INVALID_UTF8), now i'm on 3.4.0
[email protected] [nodebb]# sudo npm -v
3.4.0 -
Trying to do a "npm rebuild" on nodebb and getting this
1-
[email protected] [nodebb]# sudo npm rebuild
[email protected] install /home/maximur1/nodebb/node_modules/heapdump
node-gyp rebuild
gyp ERR! clean error
gyp ERR! stack Error: EACCES, unlink 'build/Makefile'
gyp ERR! System Linux 2.6.32-573.1.1.el6.x86_64
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/maximur1/nodebb/node_modules/heapdump
gyp ERR! node -v v0.10.36
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not oknpm ERR! Linux 2.6.32-573.1.1.el6.x86_64
npm ERR! argv "node" "/usr/bin/npm" "rebuild"
npm ERR! node v0.10.36
npm ERR! npm v3.4.0
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install:node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the heapdump package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls heapdump
npm ERR! There is likely additional logging output above.npm ERR! Please include the following file with any support request:
npm ERR! /home/maximur1/nodebb/npm-debug.log2-
Also, not sure why nodebb think I have redis 2.3.0 installed? I am on 2.8.19[email protected] [nodebb]# sudo npm install
- [email protected] node_modules/double-ended-queue
- [email protected] node_modules/redis
3-
[email protected] [nodebb]# sudo node app --upgrade
13/11 17:05 [5988] - info: NodeBB v0.8.2 Copyright (C) 2013-2014 NodeBB Inc.
13/11 17:05 [5988] - info: This program comes with ABSOLUTELY NO WARRANTY.
13/11 17:05 [5988] - info: This is free software, and you are welcome to redistribute it under certain conditions.
13/11 17:05 [5988] - info:
13/11 17:05 [5988] - error: Unable to initialize Redis! Is Redis installed? Error :Cannot find module 'redis' -
got it after running your command
npm install redis@~0.10.1 connect-redis@~2.0.013/11 17:07 [6021] - info: NodeBB v0.8.2 Copyright (C) 2013-2014 NodeBB Inc.
13/11 17:07 [6021] - info: This program comes with ABSOLUTELY NO WARRANTY.
13/11 17:07 [6021] - info: This is free software, and you are welcome to redistribute it under certain conditions.
13/11 17:07 [6021] - info:
13/11 17:07 [6021] - info: Beginning database schema update
13/11 17:07 [6021] - info: [2015/02/08] Clearing reset tokens skipped
13/11 17:07 [6021] - info: [2015/02/17] renaming home.tpl to categories.tpl skipped
13/11 17:07 [6021] - info: [2015/2/23] Activating NodeBB Essential Rewards - skipped
13/11 17:07 [6021] - info: [2015/02/24] Upgrading plugins:active to sorted set skipped
13/11 17:07 [6021] - info: [2015/02/24] Upgrading privilege groups to system groups skipped
13/11 17:07 [6021] - info: [2015/02/25] Upgrading menu items to dynamic navigation system skipped
13/11 17:07 [6021] - info: [2015/05/07] Upgrading uid mappings to sorted set skipped
13/11 17:07 [6021] - info: [2015/05/08] Fixing emails skipped
13/11 17:07 [6021] - info: [2015/05/11] Updating widgets to tjs 0.2x skipped
13/11 17:07 [6021] - info: [2015/05/20] Adding username:sorted and email:sorted skipped
13/11 17:07 [6021] - info: [2015/06/02] Creating group sorted sets skipped
13/11 17:07 [6021] - info: [2015/07/03] Enabling default composer plugin skipped
13/11 17:07 [6021] - info: [2015/08/18] Creating children category sorted sets
13/11 17:07 [6021] - info: [2015/08/18] Creating children category sorted sets done
13/11 17:07 [6021] - info: [upgrade] Schema update complete!How can I make sure it updated the correct dump.rdb file? I have a feeling it's not using my correct redis installation
[email protected] [nodebb]# sudo npm ls redis
[email protected] /home/maximur1/nodebb
├── [email protected]
└─┬ [email protected]
└── [email protected] -
Sounds good, it's the correct DB
{
"url": "http://forum.maximumtrainer.com:4567",
"secret": "removed",
"database": "redis",
"redis": {
"host": "127.0.0.1",
"port": "6379",
"password": "",
"database": "0"
}
}
~ -
Ok 0.8.x working, last update on the way!
Ok same error with 0.9.0
[email protected] [nodebb]# sudo ./nodebb upgrade
-
Bringing base dependencies up to date... OK
-
Updating NodeBB data store schema.
13/11 17:24 [7710] - error: Unable to initialize Redis! Is Redis installed? Error :Cannot find module 'redis'
OKNodeBB Upgrade Complete!
This time if I run your command:
npm install redis@~0.10.1 connect-redis@~2.0.0Still does not work after that.
-
-
This post is deleted!
-
Still stuck with redis.. now trying from 0.8.2 to 0.9.0 and I get this
[email protected] [nodebb]# sudo npm install
[email protected] [nodebb]# sudo ls -d node_modules/nodebb* | xargs -n1 basename | xargs npm update
[email protected] [nodebb]# sudo node app --upgrade
13/11 17:54 [8719] - info: NodeBB v0.9.0 Copyright (C) 2013-2014 NodeBB Inc.
13/11 17:54 [8719] - info: This program comes with ABSOLUTELY NO WARRANTY.
13/11 17:54 [8719] - info: This is free software, and you are welcome to redistribute it under certain conditions.
13/11 17:54 [8719] - info:
13/11 17:54 [8719] - error: Unable to initialize Redis! Is Redis installed? Error :Cannot find module 'redis'I have redis and redis-connect in /node_module (click for screenshot)
-
Got it
[email protected] [nodebb]# sudo node app --upgrade
13/11 18:11 [9409] - info: NodeBB v0.9.0 Copyright (C) 2013-2014 NodeBB Inc.
13/11 18:11 [9409] - info: This program comes with ABSOLUTELY NO WARRANTY.
13/11 18:11 [9409] - info: This is free software, and you are welcome to redistribute it under certain conditions.
13/11 18:11 [9409] - info:
13/11 18:11 [9409] - info: Beginning database schema update
13/11 18:11 [9409] - info: [2015/02/08] Clearing reset tokens skipped
13/11 18:11 [9409] - info: [2015/02/17] renaming home.tpl to categories.tpl skipped
13/11 18:11 [9409] - info: [2015/2/23] Activating NodeBB Essential Rewards - skipped
13/11 18:11 [9409] - info: [2015/02/24] Upgrading plugins:active to sorted set skipped
13/11 18:11 [9409] - info: [2015/02/24] Upgrading privilege groups to system groups skipped
13/11 18:11 [9409] - info: [2015/02/25] Upgrading menu items to dynamic navigation system skipped
13/11 18:11 [9409] - info: [2015/05/07] Upgrading uid mappings to sorted set skipped
13/11 18:11 [9409] - info: [2015/05/08] Fixing emails skipped
13/11 18:11 [9409] - info: [2015/05/11] Updating widgets to tjs 0.2x skipped
13/11 18:11 [9409] - info: [2015/05/20] Adding username:sorted and email:sorted skipped
13/11 18:11 [9409] - info: [2015/06/02] Creating group sorted sets skipped
13/11 18:11 [9409] - info: [2015/07/03] Enabling default composer plugin skipped
13/11 18:11 [9409] - info: [2015/08/18] Creating children category sorted sets skipped
13/11 18:11 [9409] - info: [2015/09/30] Converting default Gravatar image to default User Avatar
13/11 18:11 [9409] - info: [2015/09/30] Converting default Gravatar image to default User Avatar done
13/11 18:11 [9409] - info: [2015/11/06] Removing gravatar
13/11 18:11 [9409] - info: [2015/11/06] Gravatar pictures removed!
13/11 18:11 [9409] - info: [upgrade] Schema update complete!Solution
I had to add redis since it's not installed by default:
npm install
npm install redis
npm install connect-redis
npm install redis-server
ls -d node_modules/nodebb* | xargs -n1 basename | xargs npm update
node app --upgrade -
Crash on nodebb Start up, investigating..
NodeBB v0.9.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.htmlClustering enabled: Spinning up 1 process(es).
13/11 18:16 [9762] - info: Time: Fri Nov 13 2015 18:16:13 GMT+0000 (UTC)
13/11 18:16 [9762] - info: Initializing NodeBB v0.9.013/11 18:16 [9762] - warn: [plugins/load] The following plugins may not be compatible with your version of NodeBB. This may cause unintended behaviour or crashing. In the event of an unresponsive NodeBB caused by this plugin, run
./nodebb reset -p PLUGINNAME
to disable it.- nodebb-plugin-soundpack-default
- nodebb-plugin-dbsearch
- nodebb-rewards-essentials
- nodebb-plugin-markdown
- nodebb-widget-essentials
- nodebb-plugin-spam-be-gone
- nodebb-plugin-mentions
- nodebb-plugin-composer-default
13/11 18:16 [9762] - info: [plugins/spam-be-gone] Settings loaded
13/11 18:16 [9762] - info: NodeBB Ready
13/11 18:16 [9762] - info: NodeBB is now listening on: 0.0.0.0:4567
13/11 18:16 [9762] - error: TypeError: Object socket.io#TBk9hC has no method 'split'
at Redis.onmessage (/home/maximur1/nodebb/node_modules/socket.io-redis/index.js:92:26)
at RedisClient.emit (events.js:106:17)
at RedisClient.return_reply (/home/maximur1/nodebb/node_modules/redis/index.js:656:22)
at /home/maximur1/nodebb/node_modules/redis/index.js:307:18
at process._tickDomainCallback (node.js:486:13)
TypeError: Object socket.io#TBk9hC has no method 'split'
at Redis.onmessage (/home/maximur1/nodebb/node_modules/socket.io-redis/index.js:92:26)
at RedisClient.emit (events.js:106:17)
at RedisClient.return_reply (/home/maximur1/nodebb/node_modules/redis/index.js:656:22)
at /home/maximur1/nodebb/node_modules/redis/index.js:307:18
at process._tickDomainCallback (node.js:486:13)
13/11 18:16 [9762] - info: [app] Shutdown (SIGTERM/SIGINT) Initialised.
13/11 18:16 [9762] - info: [app] Database connection closed.
13/11 18:16 [9762] - info: [app] Web server closed to connections.
13/11 18:16 [9762] - info: [app] Shutdown complete.
[cluster] Child Process (9762) has exited (code: 1, signal: null)
[cluster] Spinning up another process...
13/11 18:16 [9785] - info: Time: Fri Nov 13 2015 18:16:21 GMT+0000 (UTC)
13/11 18:16 [9785] - info: Initializing NodeBB v0.9.03 restarts in 10 seconds, most likely an error on startup. Halting.