“Connection reset by peer” error with Fastlane & Jenkins

About a week ago, my build machine with Jenkins stopped sending out builds. I went to investigate and found that Fastlane was failing during ‘sigh’ when it attempted to connect to Apple’s servers.

The error was:

Taking a look at Fastlane’s issue page on Github, I was able to see that many people were able to resolve the issue by updating Ruby to the latest version and then reinstalling Fastlane. So I tried that…

After running the commands, I kicked off a build, but it failed once again with the same error. Strange. I figured since it had the same error, it must have been a problem with the version of Ruby used by Jenkin’s “Execute Shell” step.

Everything looked fine to me. So why was it still showing the same error? I ended up re-reading the issue page on Github and noticed that someone mentioned that openssl was potentially the reason. So I checked mine and it turns out the version I was using was outdated. I ended up trying to update openssl  using homebrew.

This time I wanted to be sure that the build would succeed so I checked the versions before proceeding any further.

NO! That’s not the version that I just installed! Homebrew installed it to:  /usr/local/Cellar/openssl/1.0.2j .

So I naively attempted to link it:

Uh oh! Another error. Since openssl  is “keg-only”, I decided to create a symlink instead:

Nice! Now that everything looked like it was in order, I kicked off another build and it finally succeeded.

If you’ve encountered the same error, hopefully this helps you. I would also recommend checking your PATH  to ensure that /usr/local/bin  is before /usr/bin . If it’s not, you might be running a different version than expected.


Tagged , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *