jortizcs / Pangia

Anomaly detection in buildings
greenpangia.com
Other
0 stars 0 forks source link

Problem with MongoDB on the rackspace server #28

Closed romain-fontugne closed 11 years ago

romain-fontugne commented 11 years ago

I tried on my computer the new credentials/users using MongoDB, it worked great! but when I'm trying to make new users on the rackspace server, I get this error:

node tools/gen-user.js 

/root/work/Pangia/node_modules/mongodb/lib/mongodb/db.js:202
  if(typeof databaseName !== 'string') throw new Error("database name must be 
                                         ^
Error: database name must be a string
    at validateDatabaseName     (/root/work/Pangia/node_modules/mongodb/lib/mongodb/db.js:202:46)
    at new Db (/root/work/Pangia/node_modules/mongodb/lib/mongodb/db.js:88:3)
    at Object.<anonymous> (/root/work/Pangia/db.js:15:10)
    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)
    at require (module.js:380:17)
    at Object.<anonymous> (/root/work/Pangia/tools/gen-user.js:8:10)
joelweinberger commented 11 years ago

I just checked this out. The config.json file had not been updated in a while. I've updated it so now "make server" works again on rackspace. Give it a whirl!

romain-fontugne commented 11 years ago

ahah thanks, I also realized that things where missing in the config file but now I get a different error:

node tools/gen-user.js 
new user: username:  root
new user: password:  

/root/work/Pangia/node_modules/mongodb/lib/mongodb/collection.js:494
    throw new Error("Cannot use a writeConcern without a provided callback");
          ^
Error: Cannot use a writeConcern without a provided callback
    at Collection.update (/root/work/Pangia/node_modules/mongodb/lib/mongodb/collection.js:494:11)
    at /root/work/Pangia/tools/gen-user.js:40:14
    at /root/work/Pangia/node_modules/prompt/lib/prompt.js:316:32
    at /root/work/Pangia/node_modules/prompt/node_modules/utile/node_modules/async/lib/async.js:116:25
    at assembler (/root/work/Pangia/node_modules/prompt/lib/prompt.js:313:9)
    at /root/work/Pangia/node_modules/prompt/lib/prompt.js:322:32
    at /root/work/Pangia/node_modules/prompt/lib/prompt.js:597:5
    at Interface.onLine (/root/work/Pangia/node_modules/prompt/node_modules/read/lib/read.js:110:5)
    at Interface.EventEmitter.emit (events.js:95:17)
    at Interface._onLine (readline.js:202:10)
romain-fontugne commented 11 years ago

It's fixed, just added a callback!