I Have my own AWS DocumentDB and I'm trying to connect to it in R using Mongolite Package
I tried to do this with mongolite ssl_options
with this code:
mong <- mongo(collection = "test", db = "test"
,url ='*******************.docdb.amazonaws.com:27017'
,verbose = TRUE
,options = ssl_options(ca= 'rds-combined-ca-bundle.pem',weak_cert_validation = T)
)
But I get this Error :
> Error: No suitable servers found (`serverSelectionTryOnce` set):
> [socket timeout calling ismaster on
> '***********************-central-1.docdb.amazonaws.com:27017']
so i need someone how can solve this problem.
You can connect to Amazon DocumentDB using TLS and the Mongolite package (https://jeroen.github.io/mongolite/index.html) using the following example connection string:
j <- mongo(url = "mongodb://<yourUsername>:<yourPassword>@docdb-2019-02-21-02-57-28.cluster-ccuszbx3pn5e.us-east-1.docdb.amazonaws.com:27017/?ssl=true", options = ssl_options(weak_cert_validation = T, key = "rds-combined-ca-bundle.pem"))
The error you are seeing typically occurs when 1/the URL for the host (Amazon DocumentDB cluster) in the connection string is incorrect or does not match that of the cluster you are trying to connect to or 2/your client machine that you are issuing the connection from is in a different region or VPC than your Amazon DocumentDB cluster.
For additional troubleshooting: https://docs.aws.amazon.com/documentdb/latest/developerguide/troubleshooting.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With