Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby on Rails - Faraday SSLError wrong version number

I have an exception coming up on my production server when signing up using Devise. Everything was working fine before and no code has changed. The server is on Heroku. Here is the exception :

"exception":["Faraday::SSLError","SSL_
connect returned=1 errno=0 state=SSLv3/TLS write client hello: wrong version number"],"exception_object":"SSL_connect returned=1 errno=0 state=SSLv3/TLS write client hello: wrong version number"

It seems that the version used by Faraday is not matching anymore.

What could have caused this change and how to fix it ?

like image 273
Henry Boisgibault Avatar asked May 25 '19 13:05

Henry Boisgibault


1 Answers

The error comes from elasticsearch.

I contacted Bonsai Elasticsearch and they gave me the solution :

We believe that a recent change to the elasticsearch-ruby client is causing the client to attempt to communicate on port 9200 rather than the HTTPS default of 443. As a workaround, you could update your BONSAI_URL config variable to explicitly specify :443, eg, https://key:[email protected]:443/

like image 142
Henry Boisgibault Avatar answered Sep 25 '22 02:09

Henry Boisgibault