PuppetDB:无法获得本地颁发者证书

我试图使用puppetdb,但我遇到了一些问题。

我有一个名为puppet的节点。 这是主人,以及我已经安装了puppetdb。 这也是木偶pipe理的一个节点。

当我在傀儡节点上运行puppet -t时,我得到:

 Warning: Unable to fetch my node definition, but the agent run will continue: Warning: Error 400 on SERVER: Could not retrieve facts for puppet.example.com: Failed to submit 'replace facts' command for puppet.example.com to PuppetDB at puppet:8081: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed: [unable to get local issuer certificate for /CN=puppet.example.com] 

我假设有一些错误的SSL / SSL,但我不知道要改变或去哪里看。

它看起来像PuppetDB(主)服务器上的主机名问题。 确保hostname -f输出地址可以从所有运行puppet agent节点parsing。

从错误日志看来,主机名似乎只是puppet

 Failed to submit 'replace facts' command for puppet.example.com to PuppetDB at puppet:8081 

然后移动旧的证书

  • 对于PuppetDB 2.x

     mv /etc/puppet/puppetdb/ssl/ /etc/puppet/puppetdb/ssl-old puppetdb-ssl-setup -f 
  • 对于PuppetDB 3.x和更新版本:

     mv /etc/puppetlabs/puppetdb/ssl/ /etc/puppetlabs/puppetdb/ssl-old puppetdb ssl-setup -f 

最后重启服务:

 service puppetdb restart