[SERVER-7594] xamples/tutorial.cpp throws assertion src/mongo/client/dbclientinterface.h:1105 Created: 08/Nov/12 Updated: 01/Apr/13 Resolved: 09/Nov/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Client |
| Affects Version/s: | 2.2.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Mathias Rohnstock | Assignee: | Eric Milkie |
| Resolution: | Done | Votes: | 0 |
| Labels: | connection | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Debian Squeeze x86_64 |
||
| Issue Links: |
|
||||||||
| Operating System: | Linux | ||||||||
| Participants: | |||||||||
| Description |
|
(already written this issue to drivers-project, but I think, it fits better here) cxx-driver installed with
installation and compilation works streight forward, but I can't get the examples/tutorial.cpp working as descripted here: http://www.mongodb.org/pages/viewpage.action?pageId=133415#C%2B%2BTutorial-Connecting
compilation returns no errors, too.
Don't know, what I can do against it?
|
| Comments |
| Comment by Eric Milkie [ 09/Nov/12 ] | ||||||||||
|
Thank you for discovering that! | ||||||||||
| Comment by Mathias Rohnstock [ 09/Nov/12 ] | ||||||||||
|
ha...! I found the issue... there was already an other libmongoclient.a in /usr/lib I've removed the libmongoclient.a from /usr/lib and recompiled the examples and everything works THANK YOU VERY MUCH FOR YOUR HELP! Don't know, how this library gots located there?... what ever... I'm happy now | ||||||||||
| Comment by Mathias Rohnstock [ 09/Nov/12 ] | ||||||||||
|
every example compiles without errors ./first:
./second:
./firstClient:
looks like, that the "second" example runs without errors? | ||||||||||
| Comment by Eric Milkie [ 09/Nov/12 ] | ||||||||||
|
Do "first", "second", and "clientTest" have the same assertion error? They are in the same directory as "tutorial". | ||||||||||
| Comment by Mathias Rohnstock [ 09/Nov/12 ] | ||||||||||
|
Hi, | ||||||||||
| Comment by Eric Milkie [ 09/Nov/12 ] | ||||||||||
|
Does the mongo shell connect okay when you run it, or does it give a similar error? | ||||||||||
| Comment by Mathias Rohnstock [ 09/Nov/12 ] | ||||||||||
|
Thanks Eric, I've given it a try, but ends in the same result | ||||||||||
| Comment by Eric Milkie [ 09/Nov/12 ] | ||||||||||
|
It sounds like you might be having trouble connecting to "localhost". Can you try changing the connection string on tutorial.cpp:36 to your computer's IP address? | ||||||||||
| Comment by Mathias Rohnstock [ 09/Nov/12 ] | ||||||||||
|
with "mongodb-linux-x86_64-v2.2-latest" the same happen. | ||||||||||
| Comment by Mathias Rohnstock [ 09/Nov/12 ] | ||||||||||
|
Hi, thanks for reply. I've removed the whole directory and tried to compile the example, which returned:
After reexecuting "sudo scons install" in mongodb-linux-x86_64-2.2.1 and recompile the example, none error returned.
| ||||||||||
| Comment by Eric Milkie [ 08/Nov/12 ] | ||||||||||
|
Are you sure you're using the headers from version 2.2.1? I don't see an assert on line 1105 of dbclientinterface.h; in fact there are not even executable lines there. |