Closed goloroden closed 12 years ago
Hey, that's not good—hopefully it's just a configuration problem (0.1.16 does pass all the tests).
0.1.15 uses a new backend, but mongolian is still pretty experimental so...
What version of node.js are you using (node -v
)? Do you have mongolian's debug logging enabled? (it should log to console by default) That should print out the connection attempts/successes/failures.
As a sanity check, install 0.1.14 (I think you can do npm install mongolian@0.1.14
) and see if that resolves the problem.
If you want to help debug, install 0.1.16 again, and run npm test
from the mongolian folder (probably node_modules/monoglian
). This should run all the mongolian tests against a localhost:27017 server. Please do this on a development database you either have backed up or don't have important data on. Paste whatever test results do show up here.
I was running Node.js 0.6.2, but with 0.6.7 the problem arises as well.
I tried to run the tests, and it did not work. It's error message was:
sh: node_modules/.bin/nodeunit: not found
npm ERR! mongolian@0.1.16 test: node_modules/.bin/nodeunit test
npm ERR! sh "-c" "node_modules/.bin/nodeunit test"
failed with 127
It looks like you need to manually install the dev dependencies. npm install --dev
is supposed to work in the mongolian directory (or just manually npm install nodeunit
).
I'm experiencing the same issue when I deploy to heroku and try to connect to MongoHQ (mongouri with authentication).
On 0.4.7, Mongolian is completely broken against authenticated remote sources, although local connections (non-authenticated) seem to work.
Here's my connection setup that works locally and on 0.1.14, but not 0.1.16:
var Mongolian = require("mongolian");
var mongoHqUrl = process.env['MONGOHQ_URL'] || 'mongodb://localhost/wendler';
exports.db = new Mongolian(mongoHqUrl);
I've tracked down the problem. It is indeed a regression in the new buffalo-based code. I have some fix ideas and I'll post something today.
Awesome, good to hear. I was going a little nuts trying to setup Heroku with MongoHQ until I found this issue, ha.
Is this still happening on 0.1.18?
Authentication failed for `heroku` @ Mongolian[mongo://flame.mongohq.com:27086]/app5855169: Error: Server Error: { errmsg: 'auth fails', ok: 0 }
It's connecting OK, and I've double-checked that I'm passing in the db url as expected
Nevermind, it was a problem with heroku.
Good to know, thanks for following up!
Hi there,
yesterday, I've installed 0.1.16 into a small website of mine.
I connect to the db using the described shortcut which automatically authenticates you and returns a db instead of a server. This works.
I can get the name of the db, and if I run collection('foo'), I can also get the name and the information about this collection. But that's it.
I can not save. I can not query. I can not do anything, not even get the collections' names. I even copied the sample from the readme, adjusted it to point to the correct db, and it does not work.
When I access the same db using mongo from the console, everything is fine.
What I've found out is that the callbacks are NEVER called. But if you omit them, mongolian complaints about the callback not being a function, so obviously there must be a callback given. But as said, it is not triggered ever.
Is there something I am completely missing, or is there a severe bug in 0.1.16?
Cheerio,
Golo