heroku / legacy-cli

Heroku CLI
https://cli.heroku.com
MIT License
1.37k stars 381 forks source link

SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol (OpenSSL::SSL::SSLError) #1979

Open nrgized opened 8 years ago

nrgized commented 8 years ago

I get this error when trying to install Heroku CLI behind proxy:

SSLconnect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown proto col (OpenSSL::SSL::SSLError) C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/excon-0.51.0/lib/excon/ssl socket.rb:120:in connect_nonblock' C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/excon-0.51.0/lib/excon/ssl_ socket.rb:120:ininitialize' C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/excon-0.51.0/lib/excon/conn ection.rb:404:in new' C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/excon-0.51.0/lib/excon/conn ection.rb:404:insocket' C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/excon-0.51.0/lib/excon/conn ection.rb:106:in request_call' C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/excon-0.51.0/lib/excon/midd lewares/mock.rb:47:inrequest_call' C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/excon-0.51.0/lib/excon/midd lewares/instrumentor.rb:25:in request_call' C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/excon-0.51.0/lib/excon/midd lewares/base.rb:15:inrequest_call' C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/excon-0.51.0/lib/excon/midd lewares/base.rb:15:in request_call' C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/excon-0.51.0/lib/excon/midd lewares/base.rb:15:inrequest_call' C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/excon-0.51.0/lib/excon/conn ection.rb:250:in request' C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/excon-0.51.0/lib/excon.rb:2 38:inget' C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/heroku-3.43.5/lib/heroku/js plugin.rb:246:in manifest' C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/heroku-3.43.5/lib/heroku/js plugin.rb:259:inurl' C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/heroku-3.43.5/lib/heroku/js plugin.rb:149:in block (2 levels) in setup' C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/heroku-3.43.5/lib/heroku/js plugin.rb:137:inopen' C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/heroku-3.43.5/lib/heroku/js plugin.rb:137:in block in setup' C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/tmpdir.rb:88:inmktmpdir' C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/heroku-3.43.5/lib/heroku/js plugin.rb:135:in setup' C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/heroku-3.43.5/lib/heroku/cl i.rb:27:instart' C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/heroku-3.43.5/bin/heroku:24 :in <top (required)>' C:/RailsInstaller/Ruby2.2.0/bin/heroku:23:inload' C:/RailsInstaller/Ruby2.2.0/bin/heroku:23:in `

' ! Heroku client internal error. ! Search for help at: https://help.heroku.com ! Or report a bug at: https://github.com/heroku/heroku/issues/new

Error:       SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello

A: unknown protocol (OpenSSL::SSL::SSLError) (Excon::Error::Socket) Command: heroku login HTTP Proxy: http://10.15.34.4:8080 HTTPS Proxy: http://10.15.34.4:8080 Version: heroku-gem/3.43.5 (i386-mingw32) ruby/2.2.4

eguinosa commented 7 years ago

I have the same problem:

heroku-cli: Installing CLI... Error: SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol (OpenSSL::SSL::SSLError) /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/ssl_socket.rb:120:in connect_nonblock' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/ssl_socket.rb:120:ininitialize' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/connection.rb:404:in new' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/connection.rb:404:insocket' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/connection.rb:106:in request_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/middlewares/mock.rb:47:inrequest_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/middlewares/instrumentor.rb:25:in request_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/middlewares/base.rb:15:inrequest_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/middlewares/base.rb:15:in request_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/middlewares/base.rb:15:inrequest_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/connection.rb:250:in request' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon.rb:238:inget' /usr/local/heroku/lib/heroku/jsplugin.rb:255:in manifest' /usr/local/heroku/lib/heroku/jsplugin.rb:268:inurl' /usr/local/heroku/lib/heroku/jsplugin.rb:158:in block (2 levels) in setup' /usr/local/heroku/lib/heroku/jsplugin.rb:146:inopen' /usr/local/heroku/lib/heroku/jsplugin.rb:146:in block in setup' /home/eguinosa/.rvm/rubies/ruby-2.2.5/lib/ruby/2.2.0/tmpdir.rb:88:inmktmpdir' /usr/local/heroku/lib/heroku/jsplugin.rb:144:in setup' /usr/local/heroku/lib/heroku/cli.rb:27:instart' /usr/local/heroku/bin/heroku:25:in `

'

retrying...

Error: SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol (OpenSSL::SSL::SSLError) /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/ssl_socket.rb:120:in connect_nonblock' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/ssl_socket.rb:120:ininitialize' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/connection.rb:404:in new' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/connection.rb:404:insocket' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/connection.rb:106:in request_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/middlewares/mock.rb:47:inrequest_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/middlewares/instrumentor.rb:25:in request_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/middlewares/base.rb:15:inrequest_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/middlewares/base.rb:15:in request_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/middlewares/base.rb:15:inrequest_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/connection.rb:250:in request' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon.rb:238:inget' /usr/local/heroku/lib/heroku/jsplugin.rb:255:in manifest' /usr/local/heroku/lib/heroku/jsplugin.rb:268:inurl' /usr/local/heroku/lib/heroku/jsplugin.rb:158:in block (2 levels) in setup' /usr/local/heroku/lib/heroku/jsplugin.rb:146:inopen' /usr/local/heroku/lib/heroku/jsplugin.rb:146:in block in setup' /home/eguinosa/.rvm/rubies/ruby-2.2.5/lib/ruby/2.2.0/tmpdir.rb:88:inmktmpdir' /usr/local/heroku/lib/heroku/jsplugin.rb:144:in setup' /usr/local/heroku/lib/heroku/cli.rb:27:instart' /usr/local/heroku/bin/heroku:25:in `

'

retrying...

Error: SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol (OpenSSL::SSL::SSLError) /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/ssl_socket.rb:120:in connect_nonblock' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/ssl_socket.rb:120:ininitialize' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/connection.rb:404:in new' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/connection.rb:404:insocket' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/connection.rb:106:in request_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/middlewares/mock.rb:47:inrequest_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/middlewares/instrumentor.rb:25:in request_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/middlewares/base.rb:15:inrequest_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/middlewares/base.rb:15:in request_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/middlewares/base.rb:15:inrequest_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/connection.rb:250:in request' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon.rb:238:inget' /usr/local/heroku/lib/heroku/jsplugin.rb:255:in manifest' /usr/local/heroku/lib/heroku/jsplugin.rb:268:inurl' /usr/local/heroku/lib/heroku/jsplugin.rb:158:in block (2 levels) in setup' /usr/local/heroku/lib/heroku/jsplugin.rb:146:inopen' /usr/local/heroku/lib/heroku/jsplugin.rb:146:in block in setup' /home/eguinosa/.rvm/rubies/ruby-2.2.5/lib/ruby/2.2.0/tmpdir.rb:88:inmktmpdir' /usr/local/heroku/lib/heroku/jsplugin.rb:144:in setup' /usr/local/heroku/lib/heroku/cli.rb:27:instart' /usr/local/heroku/bin/heroku:25:in `

'

retrying...

Error: SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol (OpenSSL::SSL::SSLError) /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/ssl_socket.rb:120:in connect_nonblock' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/ssl_socket.rb:120:ininitialize' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/connection.rb:404:in new' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/connection.rb:404:insocket' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/connection.rb:106:in request_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/middlewares/mock.rb:47:inrequest_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/middlewares/instrumentor.rb:25:in request_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/middlewares/base.rb:15:inrequest_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/middlewares/base.rb:15:in request_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/middlewares/base.rb:15:inrequest_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/connection.rb:250:in request' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon.rb:238:inget' /usr/local/heroku/lib/heroku/jsplugin.rb:255:in manifest' /usr/local/heroku/lib/heroku/jsplugin.rb:268:inurl' /usr/local/heroku/lib/heroku/jsplugin.rb:158:in block (2 levels) in setup' /usr/local/heroku/lib/heroku/jsplugin.rb:146:inopen' /usr/local/heroku/lib/heroku/jsplugin.rb:146:in block in setup' /home/eguinosa/.rvm/rubies/ruby-2.2.5/lib/ruby/2.2.0/tmpdir.rb:88:inmktmpdir' /usr/local/heroku/lib/heroku/jsplugin.rb:144:in setup' /usr/local/heroku/lib/heroku/cli.rb:27:instart' /usr/local/heroku/bin/heroku:25:in `

'

retrying...

Error: SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol (OpenSSL::SSL::SSLError) /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/ssl_socket.rb:120:in connect_nonblock' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/ssl_socket.rb:120:ininitialize' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/connection.rb:404:in new' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/connection.rb:404:insocket' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/connection.rb:106:in request_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/middlewares/mock.rb:47:inrequest_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/middlewares/instrumentor.rb:25:in request_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/middlewares/base.rb:15:inrequest_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/middlewares/base.rb:15:in request_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/middlewares/base.rb:15:inrequest_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/connection.rb:250:in request' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon.rb:238:inget' /usr/local/heroku/lib/heroku/jsplugin.rb:255:in manifest' /usr/local/heroku/lib/heroku/jsplugin.rb:268:inurl' /usr/local/heroku/lib/heroku/jsplugin.rb:158:in block (2 levels) in setup' /usr/local/heroku/lib/heroku/jsplugin.rb:146:inopen' /usr/local/heroku/lib/heroku/jsplugin.rb:146:in block in setup' /home/eguinosa/.rvm/rubies/ruby-2.2.5/lib/ruby/2.2.0/tmpdir.rb:88:inmktmpdir' /usr/local/heroku/lib/heroku/jsplugin.rb:144:in setup' /usr/local/heroku/lib/heroku/cli.rb:27:instart' /usr/local/heroku/bin/heroku:25:in `

'

retrying... SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol (OpenSSL::SSL::SSLError) /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/ssl_socket.rb:120:in connect_nonblock' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/ssl_socket.rb:120:ininitialize' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/connection.rb:404:in new' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/connection.rb:404:insocket' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/connection.rb:106:in request_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/middlewares/mock.rb:47:inrequest_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/middlewares/instrumentor.rb:25:in request_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/middlewares/base.rb:15:inrequest_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/middlewares/base.rb:15:in request_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/middlewares/base.rb:15:inrequest_call' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon/connection.rb:250:in request' /usr/local/heroku/vendor/gems/excon-0.51.0/lib/excon.rb:238:inget' /usr/local/heroku/lib/heroku/jsplugin.rb:255:in manifest' /usr/local/heroku/lib/heroku/jsplugin.rb:268:inurl' /usr/local/heroku/lib/heroku/jsplugin.rb:158:in block (2 levels) in setup' /usr/local/heroku/lib/heroku/jsplugin.rb:146:inopen' /usr/local/heroku/lib/heroku/jsplugin.rb:146:in block in setup' /home/eguinosa/.rvm/rubies/ruby-2.2.5/lib/ruby/2.2.0/tmpdir.rb:88:inmktmpdir' /usr/local/heroku/lib/heroku/jsplugin.rb:144:in setup' /usr/local/heroku/lib/heroku/cli.rb:27:instart' /usr/local/heroku/bin/heroku:25:in `

' ! Heroku client internal error. ! Search for help at: https://help.heroku.com ! Or report a bug at: https://github.com/heroku/heroku/issues/new

Error:       SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol (OpenSSL::SSL::SSLError) (Excon::Error::Socket)
Command:     heroku --version
HTTP Proxy:  http://user:password@proxy:port
HTTPS Proxy: http://user:password@proxy:port
Version:     heroku-toolbelt/3.43.12 (x86_64-linux) ruby/2.2.5

More information in /home/eguinosa/.heroku/error.log
eguinosa commented 7 years ago

Somebody knows how to solve this?????????

ransombriggs commented 7 years ago

@eguinosa What exact version of linux are you running? I can try and set up a VM to try and recreate. Also any information you can give me about your network proxy would be useful, I have only tested with squid presently, and I can better match your environment that will help with debugging.

Also, it appears that you might be a ruby developer, would you feel comfortable just running the following as it may be an issue with the upstream library and I would have something simpler to submit as a bug report. (you may have to gem install excon first)

require 'excon' 

Excon.get("https://cli-assets.heroku.com/branches/stable/gz/manifest.json", expects: [200])
eguinosa commented 7 years ago

Hi,

Yes, I'm using Ubuntu 16.04 and I'm also a Ruby developer that's the reason so I use heroku.

The congirutation is for my school http proxy.

I hope my information can help.

On Thu, Sep 22, 2016 at 5:19 PM, Ransom Briggs notifications@github.com wrote:

@eguinosa https://github.com/eguinosa What exact version of linux are you running? I can try and set up a VM to try and recreate. Also any information you can give me about your network proxy would be useful, I have only tested with squid presently, and I can better match your environment that will help with debugging.

Also, it appears that you might be a ruby developer, would you feel comfortable just running the following as it may be an issue with the upstream library https://github.com/excon/excon/issues/478 and I would have something simpler to submit as a bug report. (you may have to gem install excon first)

require 'excon'

Excon.get("https://cli-assets.heroku.com/branches/stable/gz/manifest.json", expects: [200])

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/heroku/heroku/issues/1979#issuecomment-248901093, or mute the thread https://github.com/notifications/unsubscribe-auth/AQX1uo1nV_F_KbXnvv2B5m3VbHx4Zjl3ks5qsoBrgaJpZM4JMYrw .

ransombriggs commented 7 years ago

@eguinosa Could you run this bit of Ruby code and paste the output? I want to try and isolate what is causing the bug and it would help me remove a bunch of layers. (you may have to gem install excon first)

require 'excon' 
Excon.get("https://cli-assets.heroku.com/branches/stable/gz/manifest.json", expects: [200])
eguinosa commented 7 years ago

Here is the output:

eguinosa Documents $ cat code.rb require 'excon' Excon.get("https://cli-assets.heroku.com/branches/stable/gz/manifest.json", expects: [200]) eguinosa Documents $ ruby code.rb /home/eguinosa/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- excon (LoadError) from /home/eguinosa/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require' from code.rb:1:in `

' eguinosa Documents $

On Fri, Sep 23, 2016 at 7:36 PM, Ransom Briggs notifications@github.com wrote:

@eguinosa https://github.com/eguinosa Could you run this bit of Ruby code and paste the output? I want to try and isolate what is causing the bug and it would help me remove a bunch of layers. (you may have to gem install excon first)

require 'excon' Excon.get("https://cli-assets.heroku.com/branches/stable/gz/manifest.json", expects: [200])

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/heroku/heroku/issues/1979#issuecomment-249225922, or mute the thread https://github.com/notifications/unsubscribe-auth/AQX1ujHOEXHVaW47OX4j-v78_8g0iS0tks5qs_IKgaJpZM4JMYrw .

ransombriggs commented 7 years ago

@eguinosa that error comes from excon not being installed, you need to run gem install excon first before ruby code.rb