You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongod...@googlegroups.com
Hello!
I've been facing a problem with auto reconnect. I've set it to true but whenever I restart MongoDB my c++ app crashes with error:
Thu Mar 21 12:02:55.245 DBClientCursor::init call() failed
exception: DBClientBase::findN: transport error: 127.0.0.1:27017 ns: ..... query .......
I could just try-catch all query but that would be kinda insane, so... is there an easier solution for this?
Asya Kamsky
unread,
Mar 22, 2013, 12:09:27 AM3/22/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongod...@googlegroups.com
If you look at the code you will see that there are situations where an exception is thrown even when autoReconnect is set.
Can you check the server logs and see what is actually going on that is causing the connections to fail?
Asya
Carl Z.
unread,
Mar 22, 2013, 9:25:13 AM3/22/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongod...@googlegroups.com
Sadly there is nothing in the logs.
Carl Z.
unread,
Mar 22, 2013, 10:03:21 AM3/22/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongod...@googlegroups.com
Also if I catch the exception at the first query on the next one it reconnects to mongo. That doesn't really help though since I don't know when will mongo crash (or a simple restart, anything), so I still have to catch exception at every query.