projectatomic / vagrant-service-manager

To provide the user a CLI to configure the ADB/CDK for different use cases and to provide glue between ADB/CDK and the user's developer environment.
GNU General Public License v2.0
18 stars 16 forks source link

Test failures due to SSL verification error #396

Closed hferentschik closed 8 years ago

hferentschik commented 8 years ago
# Running:

......................FEF............

Finished in 8.245352s, 4.4874 runs/s, 9.5812 assertions/s.

  1) Failure:
VagrantPlugins::ServiceManager::ADBKubernetesBinaryHandler#test_0004_should raise     error with invalid --cli-version [/Users/hardy/work/developer-platform/vagrant/    vagrant-service-manager/test/vagrant-service-manager/binary_handlers/    adb_kubernetes_binary_handler_test.rb:54]:
[VagrantPlugins::ServiceManager::URLValidationError] exception expected, not
Class: <OpenSSL::SSL::SSLError>
Message: <"SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B:     certificate verify failed">
---Backtrace---
/Users/hardy/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/net/http.rb:921:in `connect'
/Users/hardy/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/net/http.rb:921:in `block in     connect'
/Users/hardy/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/timeout.rb:52:in `timeout'
/Users/hardy/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/net/http.rb:921:in `connect'
/Users/hardy/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/net/http.rb:862:in `do_start'
/Users/hardy/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/net/http.rb:851:in `start'
/Users/hardy/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/net/http.rb:1373:in `request'
/Users/hardy/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/net/http.rb:1297:in     `request_head'
/Users/hardy/work/developer-platform/vagrant/vagrant-service-manager/lib/    vagrant-service-manager/binary_handlers/binary_handler.rb:139:in `validate_url'
/Users/hardy/work/developer-platform/vagrant/vagrant-service-manager/test/    vagrant-service-manager/binary_handlers/adb_kubernetes_binary_handler_test.rb:54:in     `block (3 levels) in <module:ServiceManager>'
---------------

  2) Error:
VagrantPlugins::ServiceManager::ADBKubernetesBinaryHandler#test_0003_should validate     download url:
OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server     certificate B: certificate verify failed
    /Users/hardy/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/net/http.rb:921:in     `connect'
    /Users/hardy/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/net/http.rb:921:in `block     in connect'
    /Users/hardy/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/timeout.rb:52:in `timeout'
    /Users/hardy/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/net/http.rb:921:in     `connect'
    /Users/hardy/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/net/http.rb:862:in     `do_start'
    /Users/hardy/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/net/http.rb:851:in `start'
    /Users/hardy/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/net/http.rb:1373:in     `request'
    /Users/hardy/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/net/http.rb:1297:in     `request_head'
    /Users/hardy/work/developer-platform/vagrant/vagrant-service-manager/lib/    vagrant-service-manager/binary_handlers/binary_handler.rb:139:in `validate_url'
    /Users/hardy/work/developer-platform/vagrant/vagrant-service-manager/test/    vagrant-service-manager/binary_handlers/    adb_kubernetes_binary_handler_test.rb:47:in `block (2 levels) in <    module:ServiceManager>'    

Not quite sure what to make of this one. Could have various reasons. Can anyone re-produce this. Unfortunately, CI is currently not a reliable source of reference either.

hferentschik commented 8 years ago

This turned to be out a issue with my Ruby installation. The web is full of tips on how to resolve this issue, eg

I tried the rvm osx-ssl-certs status all, but that did not report and issues, but still did not make a difference. I reinstalled the current ruby I had, without success. What did it for me was to install a new Ruby (via RVM). I used to have ruby-2.0.0-p643, now I have ruby-2.0.0-p648 and it works like a charm again.