我已经为puppet构build了一个testlab,但是它不起作用。 我在节点上启动puppet agent ,并等待证书。
root:~# puppet agent --server xxxx --waitforcert 60 --test warning: peer certificate won't be verified in this SSL session warning: peer certificate won't be verified in this SSL session warning: peer certificate won't be verified in this SSL session
在服务器上,现在发现挂起的证书请求:
root:~# puppet cert --list root:~#
在masterhttpd日志中:
root:~# tail /var/log/puppet/masterhttp.log [2012-01-06 09:19:17] xxx - - [06/Jan/2012:09:19:17 CET] "GET /production/certificate/xx HTTP/1.1" 404 30 [2012-01-06 09:19:17] - -> /production/certificate/pgw [2012-01-06 09:19:47] xxx - - [06/Jan/2012:09:19:47 CET] "GET /production/certificate/xx HTTP/1.1" 404 30 [2012-01-06 09:19:47] - -> /production/certificate/pgw [2012-01-06 09:19:47] xxx - - [06/Jan/2012:09:19:47 CET] "GET /production/certificate/xx HTTP/1.1" 404 30 [2012-01-06 09:19:47] - -> /production/certificate/pgw [2012-01-06 09:19:47] xxx - - [06/Jan/2012:09:19:47 CET] "GET /production/certificate/xx HTTP/1.1" 404 30 [2012-01-06 09:19:47] - -> /production/certificate/pgw
没有find证书文件。
我build议你开始傀儡代理
$ puppet agent --server=xxxx --test --debug
这个命令会给你更多细节为什么它失败。 此外,您可能需要更多的时间才能完成。
您也可以尝试从两边删除证书(分别在主人和代理人身上)
puppet --cert --clean your_machine_name rm -rf /etc/puppet/ssl
我刚开始使用Puppet的时候遇到了类似的问题。 –server选项没有被尊重。
尝试添加一个条目到你的HOSTS文件中,名字是“puppet”和你的主箱子的IP。
如果这样工作,以下语法运行良好(至less在版本2.7.5)
[main] logdir = /var/log/puppet rundir = /var/run/puppet ssldir = $vardir/ssl server = puppetmaster.yourdomain.org pluginsync = true [agent] classfile = $vardir/classes.txt localconfig = $vardir/localconfig server = puppetmaster.yourdomain.org listen = true
看起来你确认代理正在接近主人。 好的第一步。
接下来,如其他人所build议的那样,确authentication书没有被签名,并且您不会错过它:
sudo puppet cert --list --all
如果你没有看到它,我会清理一切,重新开始。
首先,确认两台服务器上的date和时间是同步的。 你可以强制NTP与ntpd -q -g同步,具体取决于你的发行版和NTP客户端。
然后,对木偶大师进行一次clean :
sudo puppet cert clean <agent hostname>
在代理上,清理所有的SSL文件:
sudo rm -rf /var/puppet/ssl /var/lib/puppet/ssl/ /var/puppet/ssl
最后,运行testing:
sudo puppet agent --debug --test --server <master hostname>
希望如果这不能解决这个问题,这应该让你看到一些线索。