On Tue, 12 Nov 2013 13:51:14 GMT, Drasha wrote:

On Tue, 12 Nov 2013 10:50:18 GMT, Sönke Ludwig wrote:

Am 12.11.2013 08:18, schrieb Drasha:> On Mon, 11 Nov 2013 19:35:36 GMT, Sönke Ludwig wrote:

Can you try to insert a logInfo("getLastError: %s", reply.toJson().toString(); right after the query line in source/vibe/db/mongo/connection.d:262? The query itself looks OK so far, but maybe the reply reveals the issue.

This is what I get:

getLastError: {"documents":[{"errmsg":"no such cmd","ok":0,"bad cmd":{"getLastError":1}}],"cursor":0,"flags":0,"firstDocument":0}

That's really strange. What log entry is produced by the following when entered in the mongo shell?

use logins
db.getLastError()

For me it produces exactly the same ouput, except that it doesn't print "query", but "command" in the second row (and of course it's a different DB name):

Tue Nov 12 15:07:25 [conn16] run command vibenews.$cmd { getLastError: 1.0 }
Tue Nov 12 15:07:25 [conn16] command vibenews.$cmd command: { getLastError: 1.0 } ntoreturn:1 keyUpdates:0  reslen:67 0ms

But maybe it's just the really old version of the server (1.4), which doesn't yet support the command. Can you try to use their repository with the latest version? I'd personally recommend that as the pre 2.0 versions have been pretty unsable in my experience.

Btw... I had to write

serializeToJson(reply).toString()

your version did not work. I got the "Error: no property 'toJson' for type 'vibe.db.mongo.connection.Reply'". I have dmd 2.063.2 and vibe.d master;

Oh sorry, I sloppily assumed that reply was of type Bson.