Closed SteveH-US closed 3 years ago
Verified and it worked.
keyhole -info "mongodb+srv://${user}:${password}@cluster0.jgtm2.mongodb.net/test"
MongoDB v4.2.12 enterprise atlas-uzozci-shard-00-01.jgtm2.mongodb.net (CentOS Linux release 7.9.2009 (Core)) mongod replica 2 cores 1799 mem
If you use special characters in your password, use HTML encode or leave the password out and it'll prompt you for a password, for example
keyhole -simonly "mongodb+srv://${user}@cluster0.jgtm2.mongodb.net/test"
There are no special characters in the password.
This test was done in GCP using peering. Did you test in that scenario?
The error that keyhole produces is:
$ ./keyhole --info $atlas_uri
2021/02/05 14:49:01 error parsing uri: lookup
There appears to be something wrong with how keyhole resolves DNS, at least in GCP using a peering connection between client and cluster.
It appears that "keyhole" has trouble connecting to an Atlas cluster
Given a MDB URI:
where UN and PW are set to the username and password respectively
keyhole fails to connect
Yet the mongo shell connects just fine
The keyhole version is