terminate called after throwing an instance of 'mongocxx::v_noabi::bulk_write_exception'
what(): No suitable servers found (`serverSelectionTryOnce` set):
[Server closed connection. calling ismaster on 'localhost:27017']:
generic server error
Aborted (core dumped)
Answer: I am nearly certain we are using a properly signed certificate. Maybe I am looking at the wrong pem file. I don't know how to check remotely (i.e., by querying via tcp in an unprivileged way), I'm open to pointers.
What is strange to me is that the pymongo auth goes fine. I recall that I did have to fiddle a bit before discovering that I needed to say ssl_cert_reqs=ssl.CERT_NONE in the python connection request. I've been dragging me feet about downloading the pymongo source code to figure out what that translates to in terms of libmongoc...
On Monday, October 10, 2016 at 8:09:11 AM UTC-4, Jeff Abrahamson wrote:Answer: I am nearly certain we are using a properly signed certificate. Maybe I am looking at the wrong pem file. I don't know how to check remotely (i.e., by querying via tcp in an unprivileged way), I'm open to pointers.You could try the approach in "How to verify SSL certificate from a shell prompt".
What is strange to me is that the pymongo auth goes fine. I recall that I did have to fiddle a bit before discovering that I needed to say ssl_cert_reqs=ssl.CERT_NONE in the python connection request. I've been dragging me feet about downloading the pymongo source code to figure out what that translates to in terms of libmongoc...That's a good hint that it's a cert verification problem. See the Pymongo TLS docs. Setting the same for mongocxx should be pretty straightforward. Try something like this (with your actual connection URI of course, including ssl=true):auto uri = mongocxx::uri{"mongodb://localhost:27017?ssl=true"};auto opts_ssl = mongocxx::options::ssl{};opts_ssl.allow_invalid_certificates(true);auto opts_client = mongocxx::options::client{};opts_client.ssl_opts(opts_ssl);auto client = mongocxx::client(uri, opts_client);