Build failing: Unable to download data from https://rubygems.org/ - SSL_connect returned=1

michael's Avatar

michael

02 May, 2017 10:00 PM

Hi there,

We are getting an error from our build:

gem install xml-simple
ERROR: Could not find a valid gem 'xml-simple' (>= 0), here is why:
          Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: tlsv1 alert protocol version (https://api.rubygems.org/specs.4.8.gz)

https://ci.appveyor.com/project/open-systems-pharmacology-ci/pk-sim/build/7.1.0.44

Any idea what might be going on? I tried to download the gem locally and it works great. The build also worked yesterday.

Cheers,
Michael

  1. Support Staff 1 Posted by Ilya Finkelshte... on 02 May, 2017 10:27 PM

    Ilya Finkelshteyn's Avatar

    Just checked this project build history and it seems that problem is gone. I wonder if it was some temporary certificate issue on the server side...

  2. 2 Posted by michael on 02 May, 2017 11:52 PM

    michael's Avatar

    Oh yes indeed. Sorry I thought it had crashed twice in a row.

    Thanks for your feedback,
    Cheers
    Michael

  3. 3 Posted by andrew on 01 Jun, 2017 02:33 PM

    andrew's Avatar

    For reference I have been seeing a lot of this lately and I think it has something to do with TLS 1.1 support being switched off on various sites. It usually gets switched back on when people realise that there are still lotf of TLS 1.1 connections.

    Windows uses TLS 1.1 by default, I fix this in all cases by adding this:

    install:
      - ps: |
          [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

    Andrew.

  4. Support Staff 4 Posted by Ilya Finkelshte... on 01 Jun, 2017 04:42 PM

    Ilya Finkelshteyn's Avatar

    Ah I see, I remember similar issue with another customer, and we fixed it with workaround below. I believe this change the whole .NET http client behavior not only current PowerShell:

    Set-ItemProperty -Path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\.NetFramework\v4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -Type DWord
    Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\.NetFramework\v4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -Type DWord
    

    Additional information is here https://blogs.technet.microsoft.com/keithab/2015/06/22/error-while-... and here http://www.johnlouros.com/blog/enabling-strong-cryptography-for-all....

  5. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:17 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac