-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Environment:OS: Fedora 31 X86_64
Rust: cargo 1.42.0-nightly (ad3dbe10e 2020-01-13)
rust mongodb: 0.9.0
Hello, I can not connect to AWS DocumentDB using the new rust mongo driver.
I fully understand that MongoDB does not make it a priority to be interoperable with AWS DocumentDB and that they are competitors, however I do not get to decide on the database backend we utilize and I have been tasked with working with AWS DocumentDB from rust.
I am able to connect to DocumentDB over an SSH tunnel using the Python driver without issue.
For example, in Python I have:
uri: str = mongodb://redacted:redacted@localhost:27017/?tls=true&tlsCAFile=/redacted/rds-ca-2019-root.pem&tlsInsecure=true client: pymongo.MongoClient = pymongo.MongoClient(uri) for db_name in client.list_database_names(): print(db_name)
And this works fine to display our databases.
However, in Rust, I have:
let uri: String = "mongodb://redacted:redacted@localhost:27017/?tls=true&tlsCAFile=/redacted/rds-ca-2019-root.pem&tlsInsecure=true".to_string(); let client = Client::with_uri_str(&uri).unwrap(); for db in client.list_database_names(None).unwrap() { println!("{}", db); }
This eventually fails with the error:
{{thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { kind: ServerSelectionError
{ message: "timed out while trying to select server" }}', src/main.rs:31:15}}
I've done a little big of digging, but haven't gotten very far. At a minimum, I can observe that select_server is not able to find any suitable servers. It appears that all servers have a description of "Unknown".
I am happy to submit a PR and do some digging if anyone has any ideas as to the cause of this issue and where I might look.
Your time is greatly appreciated and I look forward to working with you to resolve these issues. Please let me know if there is any other information I can provide. I have access to the rust mongo source and can debug from within it if needed.
- is related to
-
RUST-366 Support shorter SCRAM conversation
- Closed