[CXX-456] Why can't driver connect? Created: 22/Dec/14 Updated: 11/Sep/19 Resolved: 16/Jan/15 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | None |
| Affects Version/s: | legacy-1.0.0-rc3 |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Alex Hultman | Assignee: | Unassigned |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | legacy-cxx | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Linux (Fedora 21) |
||
| Description |
|
Hi.
This code, and my fails to connect and throws this exception:
I tried resetting to rc2 and that revision actually connects without exceptions and I can download a BSONObject, however - this version just returns EOO for fields that actually exists (I can see them in Robomongo and the whole program works with Fedora's libmongoclient). I'm compiling with: And I'm cloning with: |
| Comments |
| Comment by Andrew Morrow (Inactive) [ 16/Jan/15 ] | ||||||||||||||||||||||||||||||
|
Hi Alex - I'm closing this ticket since I haven't heard back from you. Please feel free to re-open it if you are still having difficulties. Thanks, | ||||||||||||||||||||||||||||||
| Comment by Andrew Morrow (Inactive) [ 14/Jan/15 ] | ||||||||||||||||||||||||||||||
|
Hi alexhultman - I wanted to check in with you on the status of this ticket. Were you able to gather any more information that might help us reproduce this issue? Thanks, | ||||||||||||||||||||||||||||||
| Comment by Andrew Morrow (Inactive) [ 03/Jan/15 ] | ||||||||||||||||||||||||||||||
|
Hi Alex - OK, please let us know what you find out when you are back at work. As I mentioned earlier the GA is coming up (around the end of the month), so of course we are interested in ensuring that the current RC works correctly on Fedora 21. We appreciate your help testing the RCs. Thanks, | ||||||||||||||||||||||||||||||
| Comment by Alex Hultman [ 03/Jan/15 ] | ||||||||||||||||||||||||||||||
|
Hi. Sorry for the delays. New year and stuff. Work begins jan 7 again. But you are probably right, there can be something with my install path. I get that I need to compile the app with the same headers that I compiled the driver with but I thought existing headers if any would be overwritten. I'll experiment more when I get back. 0.9.0 works for me right now though. | ||||||||||||||||||||||||||||||
| Comment by Andrew Morrow (Inactive) [ 02/Jan/15 ] | ||||||||||||||||||||||||||||||
|
Hi Alex - Were you able to make any progress on your side with this issue? Without some additional information leading to a local reproduction it is difficult to make much progress. Thanks, | ||||||||||||||||||||||||||||||
| Comment by Andrew Morrow (Inactive) [ 30/Dec/14 ] | ||||||||||||||||||||||||||||||
|
Hi Alex - To add to the above, I'm running mongod 2.6.6 installed from the official mongodb repository:
Note that I do not have any of the libmongodb packages installed. I have mongod running as a service:
Please note that in Fedora 21 the SELinux aspect of Fedora now defaults to 'Enforcing' mode, so this machine has been reconfigured to allow mongod to run in such an environment. | ||||||||||||||||||||||||||||||
| Comment by Andrew Morrow (Inactive) [ 30/Dec/14 ] | ||||||||||||||||||||||||||||||
|
Hi Alex - I cannot reproduce your issue on a Fedora 21 machine. I compiled -rc3 from source and installed to $HOME/opt:
I then built your example against my installed copy of the library:
The program runs correctly. | ||||||||||||||||||||||||||||||
| Comment by Andrew Morrow (Inactive) [ 30/Dec/14 ] | ||||||||||||||||||||||||||||||
|
OK. Since we are hoping to issue a GA soon, we would like to understand why -rc3 doesn't work for you. One thing I notice is that you are installing with a prefix of /usr. Potentially, this could conflict with the existing mongo client driver package installation artifacts. Could you try uninstalling all mongo packages, and building the -rc3 driver to somewhere non-standard ($HOME/opt for instance). Then see if your program compiled and linked against those headers and libs works better. Obviously, you will need to have mongod not-from-packages running somewhere. Thanks, | ||||||||||||||||||||||||||||||
| Comment by Alex Hultman [ 29/Dec/14 ] | ||||||||||||||||||||||||||||||
|
Sorry for the ambiguity. libmongodb-devel installs libmongoclient.so, which works. When compiling rc3, rc2, rc1, rc0 I get various problems. However currently I have settled for 0.9.0 since that specific version works without any problems. I tried to download and run mongod 2.6.6 and it runs well, but doesnt change anything. I dont use any SSL. | ||||||||||||||||||||||||||||||
| Comment by Andrew Morrow (Inactive) [ 29/Dec/14 ] | ||||||||||||||||||||||||||||||
|
Hi Alex - It seems as if there are several versions of both the server and driver in play here, so it is somewhat unclear exactly what is going wrong. Can you clarify a few things for me:
Thanks, | ||||||||||||||||||||||||||||||
| Comment by Alex Hultman [ 23/Dec/14 ] | ||||||||||||||||||||||||||||||
|
Fedora 21 seems to come with MongoDB 2.4.9. mongod is run without SSL. My mongod doesn't support --sslMode Mongo shell works, Robomongo (GUI) lists everything correctly. I can't get the hello world to run with setSSLMode. What version of mongod do you use? Edit: Using mongo::client::Options::kSSLDisabled doesn't work either. I tried running mongod 2.6.6 downloaded from mongodb.org and it doesn't work. | ||||||||||||||||||||||||||||||
| Comment by Tyler Brock [ 22/Dec/14 ] | ||||||||||||||||||||||||||||||
|
Is the mongod you are trying to connect to started with SSL required? If so you need to enable SSL in the driver:
Also, if that does not work for you can you confirm that you can connect via the shell? I've had your test program run successfully using the latest driver by making the above modifications to your program and starting my mongod with the following command:
|