Update from v0.7.0 to v1.4.0
-
with node app.js I get this
12/12 15:49 [16474] - info: NodeBB v0.7.3 Copyright (C) 2013-2014 NodeBB Inc. 12/12 15:49 [16474] - info: This program comes with ABSOLUTELY NO WARRANTY. 12/12 15:49 [16474] - info: This is free software, and you are welcome to redistribute it under certain conditions. 12/12 15:49 [16474] - info: 12/12 15:49 [16474] - info: Time: Mon Dec 12 2016 15:49:31 GMT-0500 (EST) 12/12 15:49 [16474] - info: Initializing NodeBB v0.7.3 12/12 15:49 [16474] - info: [database] Checking database indices. Segmentation fault
Any ideas by any chance?
-
If I run a ./nodebb setup I end up with this
make: Entering directory `/root/nodebb/node_modules/mongodb/node_modules/kerberos/build' CXX(target) Release/obj.target/kerberos/lib/kerberos.o In file included from ../lib/kerberos.cc:1:0: ../lib/kerberos.h:5:27: fatal error: gssapi/gssapi.h: No such file or directory #include <gssapi/gssapi.h> ^ compilation terminated. make: *** [Release/obj.target/kerberos/lib/kerberos.o] Error 1 make: Leaving directory `/root/nodebb/node_modules/mongodb/node_modules/kerberos/build' gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/root/nodebb/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23) gyp ERR! stack at emitTwo (events.js:87:13) gyp ERR! stack at ChildProcess.emit (events.js:172:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) gyp ERR! System Linux 3.10.0-123.8.1.el7.x86_64 gyp ERR! command "/root/.nvm/versions/node/v4.0.0/bin/node" "/root/nodebb/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /root/nodebb/node_modules/mongodb/node_modules/kerberos gyp ERR! node -v v4.0.0 gyp ERR! node-gyp -v v2.0.2 gyp ERR! not ok npm WARN unmet dependency /root/nodebb/node_modules/prompt requires winston@'0.8.x' but will load npm WARN unmet dependency /root/nodebb/node_modules/winston, npm WARN unmet dependency which is version 0.9.0
-
Thanks Julian for the follow-up! Much appreciated.
I did manage to upgrade to 0.7.3
By upgrading to 0.6.1, sending nodebb v0.7.3 per FTP, then run a ./nodebb upgrade, then a npm install of colors, minimist and touch that were required.
Then finally the ./nodebb upgrade went through, but I was never able to get nodebb to start. The Mongo database was not connecting it seems.I'm giving it another try tonight and I'll try your idea and keep you posted if I succeed... and if I don't well I be back here begging for any idea.
-
Unfortunately, even after killing node_modules/ with rimraf and running npm install --production, I have the same error with Kerberos.
My plan F was to update to v0.6.1, then to v0.7.0.
I can't uprade since I have the famous "Mongo DB not installed, run setup" and when I run set up I have the Kerberos error...
But then I manage to checkout v0.7.x
and when I run the ./nodebb upgrade I have this1. Bringing base dependencies up to date... OK 2. Updating NodeBB data store schema. /root/nodebb/node_modules/connect-mongo/src/index.js:4 const Promise = require('bluebird'); ^^^^^ 15/12 20:19 [8562] - error: Unable to initialize MongoDB! Is MongoDB installed? Error :Use of const in strict mode. 15/12 20:19 [8562] - error: SyntaxError: Use of const in strict mode. at Module._compile (module.js:439:25) 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) at require (module.js:380:17) at Object.<anonymous> (/root/nodebb/node_modules/connect-mongo/index.js:1:80) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) 3. Storing upgrade date in "package.json"... OK NodeBB Upgrade Complete!
-
Even though I have this
[root@writers nodebb]# git describe --tags v0.7.3-6-g6856a5e
And ./nodebb dev gives me this
Clustering enabled: Spinning up 1 process(es). 15/12 20:23 [8578] - info: Time: Thu Dec 15 2016 20:23:07 GMT-0500 (EST) 15/12 20:23 [8578] - info: Initializing NodeBB v0.7.3 15/12 20:23 [8578] - verbose: * using configuration stored in: /root/nodebb/config.json 15/12 20:23 [8578] - verbose: * using mongo store at 127.0.0.1:27017 15/12 20:23 [8578] - verbose: * using themes stored in: /root/nodebb/node_modules /root/nodebb/node_modules/connect-mongo/src/index.js:4 const Promise = require('bluebird'); ^^^^^ 15/12 20:23 [8578] - error: Unable to initialize MongoDB! Is MongoDB installed? Error :Use of const in strict mode. 15/12 20:23 [8578] - error: SyntaxError: Use of const in strict mode. at Module._compile (module.js:439:25) 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) at require (module.js:380:17) at Object.<anonymous> (/root/nodebb/node_modules/connect-mongo/index.js:1:80) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) [cluster] Child Process (8578) has exited (code: 0, signal: null)
-
In the end, I edited the index.js file in /root/..../node_modules/connect-mongo
and changed
module.exports = require('./src');
to
module.exports = require('connect-mongo/es5');
Solution found here. I've now managed to upgrade to v0.8.x and keep going tomorrow.
https://github.com/jdesboeufs/connect-mongo/issues/209
Thanks for your help Julian!
-
Hehe thanks Julian.
I actually tried all the way different versions of Node.js thanks to nvm.
I was at the start v0.10.36, I upgraded to 0.10.38 but that didn't work out.I tried with v0.11.x versions, v0.12.x, v4.0.x and even v7.2.1 but I usually got stuck with Kerberos or mmmagic errors when I tried changing node.js's version.
I'm actually stuck now, jumping from v0.9.x to v1.x.x with an
_key_1_value_-1 already exists
error16/12 04:42 [10620] - error: Error creating index Index with name: _key_1_value_ -1 already exists with different options 16/12 04:42 [10620] - info: [database] Checking database indices done! 16/12 04:42 [10620] - error: MongoError: Index with name: _key_1_value_-1 alread y exists with different options at Function.MongoError.create (/root/nodebb/node_modules/mongodb/node_module s/mongodb-core/lib/error.js:31:11) at /root/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/connectio n/pool.js:462:72 at authenticateStragglers (/root/nodebb/node_modules/mongodb/node_modules/mo ngodb-core/lib/connection/pool.js:410:16) at null.messageHandler (/root/nodebb/node_modules/mongodb/node_modules/mongo db-core/lib/connection/pool.js:444:5) at Socket.<anonymous> (/root/nodebb/node_modules/mongodb/node_modules/mongod b-core/lib/connection/connection.js:306:22) at Socket.emit (events.js:95:17) at Socket.<anonymous> (_stream_readable.js:765:14) at Socket.emit (events.js:92:17) at emitReadable_ (_stream_readable.js:427:10) at emitReadable (_stream_readable.js:423:5) at readableAddChunk (_stream_readable.js:166:9) at Socket.Readable.push (_stream_readable.js:128:10) at TCP.onread (net.js:529:21)
I've checked out the following topics
https://github.com/NodeBB/NodeBB/issues/5265
and
https://community.nodebb.org/topic/9939/index-with-name-key_1_value-1-already-exists-with-different-optionsBut er.. in layman's terms what would that be? Because droping the database doesn't work for me.
I type mongo, then use name of the database and then trydb.objects.getIndexes()
but I get this error2016-12-16T05:09:50.021-0500 error: { "$err" : "not authorized for query on wotw.system.indexes", "code" : 13 } at src/mongo/shell/query.js:131
I must be doing something wrong...
-
Finally made it from v0.6.0 to v1.4.1
This was my upgrade route (hosted on DigitalOcean and with a mongo database - shell 2.6.7, node v0.10.38)
*v0.6 to v0.6.1 git fetch git reset --hard origin/v0.6.x git describe --tags ./nodebb upgrade *v0.6.1 to v0.7.0 git checkout v0.7.0 ./nodebb upgrade npm install touch npm install minimist npm install colors *v0.7.0 to v0.7.3 git reset --hard origin/v0.7.x git describe --tags ./nodebb upgrade node app --upgrade *install nvm curl https://raw.githubusercontent.com/creationix/nvm/v0.11.1/install.sh | bash *Restart terminal nvm install v0.10.39 * Change index.js in /root/"yourfoldername"/node_modules/connect-mongo from *module.exports = require('./src'); *to *module.exports = require('connect-mongo/es5'); *edit /etc/mongod.conf, to uncomment auth = true line service mongod restart mongo use admin db.createUser({user: "adminname", pwd: "yourpassword", roles: ["readWrite"]}) use *name of the db where nodebb is installed* db.updateUser( "adminname", { roles : [ { role : "dbAdmin", db : "*name of the db where nodebb is installed*" }, { role : "readWrite", db : "*name of the db where nodebb is installed*" } ] } ) ./nodebb upgrade ./nodebb start ./nodebb stop *v0.7.3 to v0.8.x git checkout v0.8.x git pull ./nodebb upgrade ./nodebb start ./nodebb stop *v0.8.2 to v0.9.x git checkout v0.9.x git pull ./nodebb upgrade ./nodebb start ./nodebb stop *v0.9.4 to v1.4.1 git checkout v1.x.x git pull nvm install v6.2.1 nvm use v6.2.1 ./nodebb upgrade *edit /etc/mongod.conf, to uncomment noauth=true line
This should help to avoid any issue with mmmagic, kerberos, bluebird and the
key_1_value_-1 already exist
error.Et voilà !
Thanks again for your help Julian !