sudo apt-get update 更改 puppet 的配置文件?

sudo apt-get update 更改 puppet 的配置文件?

我在 linuxmint 中启动了 3 个虚拟机。1 个 puppetmaster 和 2 个 puppet。2 天前,我可以毫无问题地在两个客户端中运行“sudo puppet agent --test”。今天,我在我的一个 puppet 中安装了 Meteor。之后“sudo puppet agent --test”不再起作用。我对这种现象感到非常困惑。那是因为我在过去几天没有碰过任何 .conf 或 .pp。事实上,我只是将虚拟机关闭了 2 天,今天才将其打开。我无法诊断导致此错误的问题。如果有人能给我一个解释并告诉我如何修复它,我将不胜感激。

错误日志:

Warning: Unable to fetch my node definition, but the agent run will continue:
Warning: Server hostname 'puppetmaster' did not match server certificate; expected one of puppetmaster.localdomain, DNS:puppet, DNS:puppet.localdomain, DNS:puppetmaster.localdomain
Info: Retrieving plugin
Error: /File[/var/lib/puppet/lib]: Failed to generate additional resources using 'eval_generate': Server hostname 'puppetmaster' did not match server certificate; expected one of puppetmaster.localdomain, DNS:puppet, DNS:puppet.localdomain, DNS:puppetmaster.localdomain
Error: /File[/var/lib/puppet/lib]: Could not evaluate: Server hostname 'puppetmaster' did not match server certificate; expected one of puppetmaster.localdomain, DNS:puppet, DNS:puppet.localdomain, DNS:puppetmaster.localdomain Could not retrieve file metadata for puppet://puppetmaster/plugins: Server hostname 'puppetmaster' did not match server certificate; expected one of puppetmaster.localdomain, DNS:puppet, DNS:puppet.localdomain, DNS:puppetmaster.localdomain
Error: Could not retrieve catalog from remote server: Server hostname 'puppetmaster' did not match server certificate; expected one of puppetmaster.localdomain, DNS:puppet, DNS:puppet.localdomain, DNS:puppetmaster.localdomain
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
Error: Could not send report: Server hostname 'puppetmaster' did not match server certificate; expected one of puppetmaster.localdomain, DNS:puppet, DNS:puppet.localdomain, DNS:puppetmaster.localdomain

答案1

您可以通过将以下行添加到您的/etc/puppet/puppet.conf

[master]:
certname=puppetmaster

答案2

根据你在评论中所说的,你可能需要添加一个明确的

x.x.x.x puppetmaster 记录到您的/etc/hosts文件中。

因为您有search local domain/etc/resolv.conf所以如果其中没有明确的记录,/etc/hosts它会尝试解析puppetmaster.local不是您所拥有的证书中的域。

相关内容