userman icon indicating copy to clipboard operation
userman copied to clipboard

Issue with MongoDB setup

Open cummerbund opened this issue 10 years ago • 7 comments

I am using this configuration:

https://github.com/cummerbund/testrepo/blob/master/source/app.d

I get the following error when running:

vibe.db.mongo.connection.MongoDriverException@../../../../home/dev/.dub/packages/vibe-d-0.7.23/source/vibe/db/mongo/connection.d(155): Failed to connect to MongoDB server at .:27017. object.Exception@../../../../home/dev/.dub/packages/vibe-d-0.7.23/source/vibe/core/drivers/libevent2.d(260): Failed to lookup host '.': non-recoverable failure in name resolution

I am using a clean install MongoDB on Ubuntu, DB established "test" - and ideas?

cummerbund avatar Apr 03 '15 20:04 cummerbund

You need to specify a host name in the URL (directly accessing mongo databases on the file system is not supported). In this case, "mongodb://127.0.0.1/testdb/" (or "localhost") is probably the right choice.

s-ludwig avatar Apr 03 '15 20:04 s-ludwig

Issue was with text editor.. not-intelligent mistake.

Now having an issue with the query

"MongoDB reply was longer than expected, skipping the rest: 94 vs. 36"

"Query failed"

Database created in the name of "test", on default setup.

cummerbund avatar Apr 04 '15 00:04 cummerbund

Which version of MongoDB do you have installed? I had some issues with 3.x, but didn't take a closer look yet.

s-ludwig avatar Apr 04 '15 07:04 s-ludwig

MongoDB shell version: 2.4.9

cummerbund avatar Apr 05 '15 01:04 cummerbund

Also issue with Redis

source/userman/db/redis.d(132): Error: function vibe.db.redis.idioms.RedisStripped!(User).RedisStripped.unstrip (ID!(User) _param_0, ID!(Group)[] _param_1, AuthInfo _param_2, Json[string] _param_3, ID!(Transaction)[] _param_4) is not callable using argument types (ID!(User), ID!(Group)[], RedisObject!(AuthInfo), Json[string])

cummerbund avatar Apr 05 '15 02:04 cummerbund

If your query includes '$or', '$and' or any of these operators that accept array of objects and you pass an object you'll get the error "MongoDB reply was longer than expected, skipping the rest: 89 vs. 36", you need to pass an array of objects instead.

AlQurashi avatar Nov 30 '16 08:11 AlQurashi

@AlQurashi Thanks! It work great!

notnotme avatar Dec 10 '16 09:12 notnotme