jeroen / mongolite

Fast and Simple MongoDB Client for R
https://jeroen.github.io/mongolite/
284 stars 64 forks source link

"No suitable servers found" with version 2.4.0 #230

Closed fdetsch closed 2 years ago

fdetsch commented 2 years ago

I have a MongoDB sitting on a remote (corporate) server that I contact via mongo(). Until package version 2.3.1, everything worked as expected:

con = mongo(
  db = "test"
  , url = "mongodb://x.xxx.xx.xxx:5432/admin
)

con$count()
# 0

However, after updating to the newly released version 2.4.0, this suddenly fails with

Error: No suitable servers found (serverSelectionTryOnce set): [TLS handshake failed: error:00000000:lib(0):func(0):reason(0) calling hello on 'x.xxx.xx.xxx:5432']

Has anything changed in ssl_options() or in some other place that I now need to consider? Rolling back the package version to 2.3.1 fixes the problem, so I assume this must be somehow related to the latest update.

Let me know if you require additional details.

jeroen commented 2 years ago

Yes I am sorry I introduced a bug in the CRAN version. It should be fixed on github, can you try the dev version?

install.packages("mongolite", repos = "https://jeroen.r-universe.dev")

If that fixes the issue I'll try to get it out to CRAN soon.

fdetsch commented 2 years ago

Yeah, this fixes the issue. Thanks!

jeroen commented 2 years ago

mongolite 2.4.1 is now on cran. Sorry for the inconvenience