ERROR: SSL Validation failure connecting to host: myhost-vm - SSL_connect returned=1 errno=0 state=error: certificate verify failed



  • The full error is below. A rather scary message after configuring your chef workstation and trying to use knife for the first time, the workstation just need to obtain the SSL certificate from the server, in the error it tells you what to run to resolve the issue.

    ERROR: SSL Validation failure connecting to host: myhost-vm - SSL_connect returned=1 errno=0 state=error: certificate verify failed
    ERROR: Could not establish a secure connection to the server.
    Use knife ssl check to troubleshoot your SSL configuration.
    If your Chef Server uses a self-signed certificate, you can use
    knife ssl fetch to make knife trust the server's certificates.

    Original Exception: OpenSSL::SSL::SSLError: SSL Error connecting to https://myhost-vm/organizations/bigflowers/users - SSL_connect returned=1 errno=0 state=error: certificate verify failed

    $ knife ssl fetch
    WARNING: Certificates from myhost-vm will be fetched and placed in your trusted_cert
    directory (/home/trainer/chef-repo/.chef/trusted_certs).
    
    Knife has no means to verify these are the correct certificates. You should
    verify the authenticity of these certificates after downloading.
    
    Adding certificate for myhost-vm in /home/trainer/chef-repo/.chef/trusted_certs/myhost-vm.crt
    

Log in to reply
 

© Lightnetics 2019