3scale toolbox fails to connect to the destination when the endpoint certificate is self-signed.

Solution Verified - Updated -

Issue

  • When I run 3scale toolbox, it fails with SSLError.

    podman run --rm -w /opt/app-root/src registry.redhat.io/3scale-amp2/toolbox-rhel7:3scale2.9 env -u BUNDLE_GEMFILE 3scale copy service 3 --source=https://xxxxxx@3scale-admin.site1.example.com --destination=https://xxxxxx@3scale-admin.site2.example.com --target_system_name=sampleproduct
    {
      "code": "E_UNKNOWN",
      "message": "SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate)",
      "class": "OpenSSL::SSL::SSLError",
      "stacktrace": [
        "/opt/rh/rh-ruby25/root/usr/share/ruby/net/protocol.rb:44:in `connect_nonblock'",
        "/opt/rh/rh-ruby25/root/usr/share/ruby/net/protocol.rb:44:in `ssl_socket_connect'",
        "/opt/rh/rh-ruby25/root/usr/share/ruby/net/http.rb:985:in `connect'",
        "/opt/rh/rh-ruby25/root/usr/share/ruby/net/http.rb:920:in `do_start'",
        "/opt/rh/rh-ruby25/root/usr/share/ruby/net/http.rb:909:in `start'",
        "/opt/rh/rh-ruby25/root/usr/share/ruby/net/http.rb:1458:in `request'",
        "/opt/rh/rh-ruby25/root/usr/share/ruby/net/http.rb:1216:in `get'",
        "/opt/toolbox/vendor/bundle/ruby/2.5.0/gems/3scale-api-1.1.0/lib/3scale/api/http_client.rb:36:in `get'",
        "/opt/toolbox/vendor/bundle/ruby/2.5.0/gems/3scale-api-1.1.0/lib/3scale/api/client.rb:23:in `list_services'",
        "/opt/toolbox/lib/3scale_toolbox/entities/service.rb:32:in `find_by_system_name'",
        "/opt/toolbox/lib/3scale_toolbox/entities/service.rb:28:in `rescue in find'",
        "/opt/toolbox/lib/3scale_toolbox/entities/service.rb:25:in `find'",
        "/opt/toolbox/lib/3scale_toolbox/commands/service_command/copy_command/create_or_update_service_task.rb:9:in `call'",
        "/opt/toolbox/lib/3scale_toolbox/commands/service_command/copy_command.rb:67:in `each'",
        "/opt/toolbox/lib/3scale_toolbox/commands/service_command/copy_command.rb:67:in `run'",
        "/opt/toolbox/vendor/bundle/ruby/2.5.0/gems/cri-2.15.10/lib/cri/command_runner.rb:34:in `call'",
        "/opt/toolbox/vendor/bundle/ruby/2.5.0/gems/cri-2.15.10/lib/cri/command_dsl.rb:303:in `block in runner'",
        "/opt/toolbox/vendor/bundle/ruby/2.5.0/gems/cri-2.15.10/lib/cri/command.rb:360:in `run_this'",
        "/opt/toolbox/vendor/bundle/ruby/2.5.0/gems/cri-2.15.10/lib/cri/command.rb:296:in `run'",
        "/opt/toolbox/vendor/bundle/ruby/2.5.0/gems/cri-2.15.10/lib/cri/command.rb:314:in `run'",
        "/opt/toolbox/vendor/bundle/ruby/2.5.0/gems/cri-2.15.10/lib/cri/command.rb:314:in `run'",
        "/opt/toolbox/lib/3scale_toolbox/cli.rb:47:in `block in run'",
        "/opt/toolbox/lib/3scale_toolbox/cli/error_handler.rb:5:in `block in error_watchdog'",
        "/opt/toolbox/lib/3scale_toolbox/cli/error_handler.rb:11:in `error_watchdog'",
        "/opt/toolbox/lib/3scale_toolbox/cli/error_handler.rb:5:in `error_watchdog'",
        "/opt/toolbox/lib/3scale_toolbox/cli.rb:44:in `run'",
        "/opt/toolbox/exe/3scale:15:in `<top (required)>'",
        "/opt/toolbox/bin/3scale:29:in `load'",
        "/opt/toolbox/bin/3scale:29:in `<main>'"
      ]
    }
    

Environment

  • Red Hat 3scale API Management 2.9.0
    • 3scale toolbox

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content