I get the following error when I attempt a chef run from a linux server:
OpenSSL::SSL::SSLError
----------------------
SSL_connect returned=1 errno=0 state=error: certificate verify failed
if I run the following:
knife ssl fetch
I get the following output:
[engineering@SERVERNAME cookbook-relativity_scaled-automation]$ knife ssl fetch
WARNING: Certificates from chef.SERVERNAME.com will be fetched and placed in your trusted_cert
directory (/home/engineering/.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 *.SERVERNAME.com in /home/engineering/.chef/trusted_certs/wildcard_SERVERNAME_com.crt
Adding certificate for DigiCert High Assurance EV Root CA in /home/engineering/.chef/trusted_certs/DigiCert_High_Assurance_EV_Root_CA.crt
Adding certificate for DigiCert SHA2 High Assurance Server CA in /home/engineering/.chef/trusted_certs/DigiCert_SHA2_High_Assurance_Server_CA.crt
Looks promising, I can run
knife node list
knife client list
knife cookbook list
And all of them give me what I expect, I then run a:
knife ssl check
And I get the following output:
[engineering@SERVERNAME cookbook-relativity_scaled-automation]$ knife ssl check
Configuration Info:
OpenSSL Configuration:
* Version: OpenSSL 1.0.1t 3 May 2016
* Certificate file: /opt/chefdk/embedded/ssl/cert.pem
* Certificate directory: /opt/chefdk/embedded/ssl/certs
Chef SSL Configuration:
* ssl_ca_path: nil
* ssl_ca_file: nil
* trusted_certs_dir: "/home/engineering/.chef/trusted_certs"
WARNING: There are invalid certificates in your trusted_certs_dir.
OpenSSL will not use the following certificates when verifying SSL connections:
/home/engineering/.chef/trusted_certs/wildcard_consilio_com.crt: unable to get local issuer certificate
/home/engineering/.chef/trusted_certs/DigiCert_SHA2_High_Assurance_Server_CA.crt: unable to get local issuer certificate
/home/engineering/.chef/trusted_certs/wildcard_SERVERNAME.crt: unable to get local issuer certificate
TO FIX THESE WARNINGS:
We are working on documentation for resolving common issues uncovered here.
* If the certificate is generated by the server, you may try redownloading the
server's certificate. By default, the certificate is stored in the following
location on the host where your chef-server runs:
/var/opt/opscode/nginx/ca/SERVER_HOSTNAME.crt
Copy that file to your trusted_certs_dir (currently: /home/engineering/.chef/trusted_certs)
using SSH/SCP or some other secure method, then re-run this command to confirm
that the server's certificate is now trusted.
Connecting to host chef.SERVERNAME.com:443
Successfully verified certificates from `chef.SERVERNAME.com'
So, when I attempt to run my provisioning script, I get the Certificate Verify Failed Error.
Any assistance would be greatly appreciated!!
Thank You!