1

I have two main applications(say App1, App2) sitting in different physical boxes. Each having their own microservices on their respective boxes. Now I am making a call from App1 to an API belonging to one of the microservices present for App2 on the other box. It is a POST API which takes File and some other data as input. I am randomly facing the following issue

SSL_write:: shutdown while in init

Although if the two Apps are present in the same box this issue is never faced.

The OpenSSL version is

OpenSSL 1.0.2k-fips

And the Call that I am making is through

Faraday Gem (0.9.1)

App1 is built on

Ruby 1.8.7 with Rails 2.3.2

This site tells that this is a bug on OpenSSL which was introduced with version 1.0.2b and is solved on 1.0.2n. Although I am on 6 and I do not have the 1.0.2n version available for update on it. The highest version available is 1.0.2k.

Is there any way that I can upgrade it, or is there any other way In which I can solve this issue.

Richa Sinha
  • 1,406
  • 15
  • 29
  • so you say that you have versions of the gem available till 1.0.2k, how did you verify that? did you manually changed the version in the gemfile and found out? – gates Dec 15 '17 at 11:21
  • I am talking about the OpenSSL library. I got the availibility with - yum list openssl* – Richa Sinha Dec 15 '17 at 11:41
  • https://syslint.com/blog/tutorial/how-to-upgrade-openssl-on-centos-7-or-rhel-7/ I think you need to just download it via wget https://www.openssl.org/source/openssl-1.0.2-latest.tar.gz and try following the instructions there – gates Dec 15 '17 at 11:58

1 Answers1

0

I saw the pattern of failure. The failure was happening when all of the following were true:

  • Client being ruby 1.8.7
  • Open SSL version 1.0.2k
  • The Client and server being in two different boxes

If either of the above were not true, the issue was not showing up.

The ideal fix for this would have been OpenSSL upgrade( which was not available for the OS that I am on- RHEL7) or upgrade the Ruby version(not feasible) or bring the two application on the same box(again not feasible). So the remaining fix was to change the client.

The fix that I used for this issue is to use Curl instead of making the call through the Faraday Gem.

Richa Sinha
  • 1,406
  • 15
  • 29