-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"no SNI name sent" when connecting to a Mongo Atlas M0 Cluster #236
Comments
It happens only with shared clusters: we tried on an m2 cluster (shared as well) and had the same issue. https://docs.atlas.mongodb.com/reference/free-shared-limitations/ However after upgrading to a dedicated cluster (M10) the connection works fine. I still think it would be great to have a fix for this to be able to connect to Mongo Atlas shared clusters. |
Unfortunately I have no setup at hand on which I would be able to try, but I believe that you can specify server name like this: from twisted.internet import ssl
ConnectionPool(url, ssl_context_factory=ssl.optionsForClientTLS('your.atlas.server.name')) |
@IlyaSkriblovsky Thanks, that solved the issue ! I still think it might be good to handle this error to show more information to the user:
|
Specifying the hostname via But I suppose it does not work all the time. For a shared cluster (SNI required) with multiple nodes like Atlas, the hostnames of those nodes are given in the SRV record as well as updated from the So I think it is still meaningful to let txmongo handles SNI itself instead. |
I am trying to connect to an Atlas M0 (Free Tier) Cluster with txmongo.
Following the instructions here: #203 I created the connection pool with:
db = yield ConnectionPool(url, ssl_context_factory=ssl.ClientContextFactory())
But I get the following error in the logs when trying to start my app:
Here is more info about actual error (as seen in
txmongo/connection.py l105
):config = {'ok': 0, 'errmsg': 'no SNI name sent, make sure using a MongoDB 3.4+ driver/shell.', 'code': 8000, 'codeName': 'AtlasError'}
Do you know how I can solve this ?
Thank you for your time.
The text was updated successfully, but these errors were encountered: