首页 > 解决方案 > Puppet : Did not receive certificate

问题描述

I have a bare minimum, default puppet master/slave configuration on a newer version (6) of puppet which I'm attempting to initiate in virtualbox VMs for a prototype. However, the agent doesnt seem to be able to properly connect to the master.

10.0.2.2 - - [14/Apr/2019:18:22:14 +0000] "GET /production/certificate/localhost? HTTP/1.1" 404 36 "-" "Ruby" 3
10.0.2.2 - - [14/Apr/2019:18:22:14 +0000] "GET /production/certificate/ca?fail_on_404=true HTTP/1.1" 200 1939 "-" "Ruby" 3
10.0.2.2 - - [14/Apr/2019:18:22:14 +0000] "GET /production/certificate/localhost? HTTP/1.1" 404 36 "-" "Ruby" 2
10.0.2.2 - - [14/Apr/2019:18:22:14 +0000] "GET /production/certificate/localhost? HTTP/1.1" 404 36 "-" "Ruby" 3
10.0.2.2 - - [14/Apr/2019:18:22:14 +0000] "GET /production/certificate/localhost? HTTP/1.1" 404 36 "-" "Ruby" 2

On my master, I only 2 certs, so clearly the request is getting through:

 "localhost" (SHA256) 1C:E7:D0:FF:35:A3:5B:CA:37:02:13:CC:75:20:B5:54:42:BA:AA:C9:61:9D:02:22:B3:28:E3:C3:4D:FE:5F:CC
  "slave1"    (SHA256) 35:A8:C5:E8:8A:1D:58:F6:DA:EC:8A:4D:9F:30:53:3E:F8:A1:01:27:F4:D7:62:5F:82:1C:E0:6B:37:82:A8:A2

My agent is able to connect just fine to the master, however, it seems to never get back a healthy cert:

Nothing to do
waiting to run puppet....
Info: Creating a new SSL key for localhost
Info: Caching certificate for ca
Info: csr_attributes file loading from /etc/puppet/csr_attributes.yaml
Info: Creating a new SSL certificate request for localhost
Info: Certificate Request fingerprint (SHA256): 1C:E7:D0:FF:35:A3:5B:CA:37:02:13:CC:75:20:B5:54:42:BA:AA:C9:61:9D:02:22:B3:28:E3:C3:4D:FE:5F:CC
Info: Caching certificate for ca

Notice: Did not receive certificate
Notice: Did not receive certificate

How can I determine why these 404 errors are occuring?

标签: sslpuppet

解决方案


如前所述,您必须签署证书。对于 Puppet 版本 6 将是

puppetserver ca sign --certname slave1

对于 Puppet 版本 < 6

puppet cert sign slave1

推荐阅读