ssl connect: TLS connection is closed on Mongo Atlas
Hi I am using this driver with elixir 1.6.x and OTP 19 and it is working fine. (With all TLS 1.0,1.1,1.2)
Whenever I am using with elixir 1.7.x and OTP 21 I am getting following error.
[error] Mongo.Protocol (#PID<0.1791.0>) failed to connect: ** (Mongo.Error) ssl connect: TLS connection is closed - :closed
Mongo Atlas DB Cluster(4.0.2), I am using seeds.
Please have a look into this.
I believe there were some changes to the ssl module cipher list in OTP 21. I will look a little deeper into it and get back to this.
I am also facing the same issue :(
I faced the same problem and solved it thanks to an advise from the Elixir Forum. To sum up the cipher used by MongoDB Atlas is disabled by default in the OTP 21 so you need to specify it manually in your mongoDB connection options. You must have this in your MongoDB options :
ssl: true,
ssl_opts: [
ciphers: ['AES256-GCM-SHA384'],
versions: [:"tlsv1.2"]
]
Note that the option uses simple quotes and it does not work with double quotes !
Original post here : https://elixirforum.com/t/mongodb-and-ssl-ciphers-failed-to-connect/16928
Thanks a lot @norman-forti. it has been fixed now.