user6558246
user6558246

Reputation:

chef SSL Validation failure connecting to host after Chef Development Kit installation

I ran knife bootstrap on a node with, chef client ran and everything works.

After I installed on the node Chef Development Kit:

wget https://packages.chef.io/stable/el/7/chefdk-0.15.16-1.el7.x86_64.rpm
sudo rpm -Uvh chefdk-0.15.16-1.el7.x86_64.rpm

Chef client versions:

Before the chefdk installation: starting Chef Client, version 11.8.2

After the chefdk installation: starting Chef Client, version 12.11.18

The error message:

ERROR: SSL Validation failure connecting to host: xxx.mychefserver.mydomain.com - SSL_connect returned=1 errno=0 state=error: certificate verify failed
================================================================================
Chef encountered an error attempting to load the node data for "xxx.mychefnode.mydomain.com"
================================================================================
Unexpected Error:
-----------------
OpenSSL::SSL::SSLError: SSL Error connecting to https://xxx.mychefserver.mydomain.int/nodes/xxx.mychefnode.mydomain.com - SSL_connect returned=1 errno=0 state=error: certificate verify failed

Any idea how to fix it ? Thanks!

Upvotes: 1

Views: 1262

Answers (1)

coderanger
coderanger

Reputation: 54181

By default Chef Server generates a self-signed certificate for HTTPS. You can add this to Chef's trust root by running knife ssl fetch. You can also install a "real" (i.e. public trust) certificate on the Chef Server. The latter is preferred when possible.

Upvotes: 1

Related Questions