Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with MongoDB setup #6

Open
cummerbund opened this issue Apr 3, 2015 · 7 comments
Open

Issue with MongoDB setup #6

cummerbund opened this issue Apr 3, 2015 · 7 comments

Comments

@cummerbund
Copy link

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?

@s-ludwig
Copy link
Member

s-ludwig commented Apr 3, 2015

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.

@cummerbund
Copy link
Author

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.

@s-ludwig
Copy link
Member

s-ludwig commented Apr 4, 2015

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

@cummerbund
Copy link
Author

MongoDB shell version: 2.4.9

@cummerbund
Copy link
Author

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])

@AlQurashi
Copy link

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.

@notnotme
Copy link

@AlQurashi Thanks! It work great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants