kontena / mortar

The manifest shooter for Kubernetes
Apache License 2.0
145 stars 14 forks source link

mortar gives random excon error when kubectl does not work #35

Open matti opened 6 years ago

matti commented 6 years ago
$ kubectl get pod
Unable to connect to the server: x509: certificate signed by unknown authority
$ mortar deploy asdf asdf
...
..gems/excon-0.62.0/lib/excon/ssl_socket.rb:118:in `connect_nonblock': SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate) (OpenSSL::SSL::SSLError) Unable to verify certificate. This may be an issue with the remote host or with Excon. Excon has certificates bundled, but these can be customized: (Excon::Error::Certificate)

            `Excon.defaults[:ssl_ca_path] = path_to_certs`
            `ENV['SSL_CERT_DIR'] = path_to_certs`
            `Excon.defaults[:ssl_ca_file] = path_to_file`
            `ENV['SSL_CERT_FILE'] = path_to_file`
            `Excon.defaults[:ssl_verify_callback] = callback`
                (see OpenSSL::SSL::SSLContext#verify_callback)
or:
            `Excon.defaults[:ssl_verify_peer] = false` (less secure).
kke commented 6 years ago

Both errors tell the same thing, SSL verification failed. Mortar doesn't use kubectl.

The error message could be more concise or descriptive though.

matti commented 6 years ago

naturally the "error message must be more descriptive" was my point here