首页 > 代码库 > puppet 报错

puppet 报错

新服务器装完系统后,安装puppet后执行如下操作报错:

执行puppet agent -t的时候报错;

Aug 30 09:14:28 masterdb puppet-agent[66746]: Unable to fetch my node definition, but the agent run will continue:

Aug 30 09:14:28 masterdb puppet-agent[66746]: getaddrinfo: Name or service not known

Aug 30 09:14:28 masterdb puppet-agent[66746]: Retrieving pluginfacts

Aug 30 09:14:28 masterdb puppet-agent[66746]: (/File[/var/lib/puppet/facts.d]) Failed to generate additional resources using ‘eval_generate‘: getaddrinfo: Name or service not known

Aug 30 09:14:28 masterdb puppet-agent[66746]: (/File[/var/lib/puppet/facts.d]) Could not evaluate: Could not retrieve file metadata for puppet://puppet.sankuai.info99999999999999/pluginfacts: getaddrinfo: Name or service not known

Aug 30 09:14:28 masterdb puppet-agent[66746]: (/File[/var/lib/puppet/facts.d]) Wrapped exception:

Aug 30 09:14:28 masterdb puppet-agent[66746]: (/File[/var/lib/puppet/facts.d]) getaddrinfo: Name or service not known

Aug 30 09:14:28 masterdb puppet-agent[66746]: Retrieving plugin

Aug 30 09:14:28 masterdb puppet-agent[66746]: (/File[/var/lib/puppet/lib]) Failed to generate additional resources using ‘eval_generate‘: getaddrinfo: Name or service not known

Aug 30 09:14:28 masterdb puppet-agent[66746]: (/File[/var/lib/puppet/lib]) Could not evaluate: Could not retrieve file metadata for puppet://puppet.sankuai.info99999999999999/plugins: getaddrinfo: Name or service not known

Aug 30 09:14:28 masterdb puppet-agent[66746]: (/File[/var/lib/puppet/lib]) Wrapped exception:

Aug 30 09:14:28 masterdb puppet-agent[66746]: (/File[/var/lib/puppet/lib]) getaddrinfo: Name or service not known

Aug 30 09:14:28 masterdb puppet-agent[60701]: Config file /etc/puppet/puppet.conf changed; triggering re-parse of all config files.

Aug 30 09:14:29 masterdb puppet-agent[66746]: Could not retrieve catalog from remote server: getaddrinfo: Name or service not known

Aug 30 09:14:29 masterdb puppet-agent[66746]: Not using cache on failed catalog

Aug 30 09:14:29 masterdb puppet-agent[66746]: Could not retrieve catalog; skipping run

Aug 30 09:14:29 masterdb puppet-agent[66746]: Could not send report: getaddrinfo: Name or service not known

Aug 30 09:14:43 masterdb puppet-agent[60701]: Config file /etc/puppet/puppet.conf changed; triggering re-parse of all config files.

尝试用如下方法解决:

解决方法:

客户端删除现有ssl证书

find /var/lib/puppet -type f -print0 |xargs -0r rm

 

服务端进行客户端证书删除操作:

  puppet cert clean puppetclient1.com

客户端重新注册:

  rm -f /var/lib/puppet/ssl/certs/puppetclient1.com.pem

  puppet agent -t

服务端同意注册:

  puppet cert sign puppetclient1.com

确认注册成功:

  puppet agent -t


无效,

查了半天最后,搞明白了是时间未同步导致的~~~~!!!!!

ntpdate 同步时间后,这个puppet agent -t执行成功,哎,,手工装服务器还是有风险,如果用cobbler装最后执行了自定义脚步,脚步中自动同步了服务器时间就可以避免这个问题

puppet 报错