err: Could not request certificate: getaddrinfo: Name or service not known
解决办法:服务器端没有配置hosts域名绑定,在hosts中添加。
连接master的时候出现如下报错:
warning: peer certificate won't be verified in this SSL session
解决办法:服务端还没有返回签发证书,使用puppet cert --list查看
连接master的时候出现如下报错:
err: Could not retrieve catalog from remote server: certificate verify failed
解决办法:客户端和服务器端时间不同步,SSL连接需要依赖主机上的时间是否正确。执行更新时间的命令:/sbin/ntpdate asia.pool.ntp.org
puppet agent --server=puppet.zhang.com --no-daemonize --verbose
info: Creating a new SSL key for node1.zhang.com
info: Caching certificate for ca
#申请证书
info: Creating a new SSL certificate request for node1.zhang.com
info: Certificate Request fingerprint (md5): 54:11:FB:75:87:94:AF:6B:D1:6B:AD:6B:44:3E:74:A0
#等待证书签发
warning: peer certificate won't be verified in this SSL session
#2分钟检查一次,如果没有签发就显示如下信息
notice: Did not receive certificate
#证书签发成功后,顺利建立连接
info: Caching certificate for node1.zhang.com
notice: Starting Puppet client version 2.6.16
info: Caching certificate_revocation_list for ca
info: Caching catalog for node1.zhang.com
info: Applying configuration version '1344943902'
notice: Finished catalog run in 0.11 seconds
类似于上面的就是去申请证书了。当master签发证书以后就可以顺利建立连接了。