Open chupasaurus opened 9 years ago
Hello, have you turned on security in your mongodb? In this case you can try to replace at line 85 of /home/nikita/node_modules/amid/lib/rest.js:
db.authenticate(req.query.username, req.query.password, function callback(){
with:
db.authenticate(config.db.username, config.db.password, function callback(){
Tell me if this works
Had same issue, solved it by adding username and password (with empty strings as value) to config file...
Hi , do you have this issue using this conf in mongo.conf?
auth = true
Or in your configuration auth=false? What version of mongodb do you have?
Regards
just added it to the config.json file of amid using mongodb 3.0.5: "db": { "port": 27017, "host": "127.0.0.1", "username" : "", "password" : "" }
Your /etc/mongo.conf have this line? auth = true
I have only a mongod.conf and it doesn't contain any auth parameters (just systemLog, storage and net)
Ok, understood the problem. As soon as possibile i'll make a new release with the fix.
Regards
On Fri, Sep 11, 2015 at 3:36 PM, jschaeke notifications@github.com wrote:
I have only a mongod.conf and it doesn't contain any auth parameters (just systemLog, storage and net)
— Reply to this email directly or view it on GitHub https://github.com/mariano-fiorentino/amid/issues/6#issuecomment-139547852 .
Mongodb 3, mongodb node.js driver version 1.4.35 Call trace: /home/nikita/node_modules/amid/node_modules/mongodb/lib/mongodb/db.js:299 throw err; ^ TypeError: Cannot call method 'replace' of undefined at executeScram (/home/nikita/node_modules/amid/node_modules/mongodb/lib/mongodb/auth/mongodb_scram.js:34:27) at authenticate (/home/nikita/node_modules/amid/node_modules/mongodb/lib/mongodb/auth/mongodb_scram.js:184:5) at Db.authenticate (/home/nikita/node_modules/amid/node_modules/mongodb/lib/mongodb/db.js:756:7) at /home/nikita/node_modules/amid/lib/rest.js:85:16 at /home/nikita/node_modules/amid/node_modules/mongodb/lib/mongodb/db.js:296:11 at process._tickCallback (node.js:415:13)