![无法打开与插件的 TCP 连接:8140](https://linux22.com/image/96328/%E6%97%A0%E6%B3%95%E6%89%93%E5%BC%80%E4%B8%8E%E6%8F%92%E4%BB%B6%E7%9A%84%20TCP%20%E8%BF%9E%E6%8E%A5%EF%BC%9A8140.png)
我正在使用开源 puppet 在 ganeti 中部署多个虚拟机,当我在此特定主机中运行 puppet 代理时,我不断收到此错误:
Info: Retrieving pluginfacts
Info: Retrieving plugin
Error: /File[/var/lib/puppet/lib]: Failed to generate additional resources using 'eval_generate': Failed to open TCP connection to plugins:8140 (getaddrinfo: Name or service not known)
Error: /File[/var/lib/puppet/lib]: Could not evaluate: Could not retrieve file metadata for puppet://plugins: Failed to open TCP connection to plugins:8140 (getaddrinfo: Name or service not known)
Info: Caching catalog for host.domain.net
Info: Applying configuration version '1476293845'
Notice: /Stage[main]/Apt::Update/Exec[apt_update]/returns: executed successfully
Notice: Finished catalog run in 6.57 seconds
我已经在该主机中包含了几个模块,有趣的是,除了一个模块(facts_module)之外,它们都是部署的,因此 my/etc/facter/facts.d/
是空的/var/lib/puppet/facts.d/
,.
值得注意的是,这个主机无法解析“puppet”,而是puppetmaster。我正在使用该区域的 srv 记录,我可以从主机解析它。
有人可以帮忙解决这个问题吗?您需要更多信息吗?先谢谢了!
答案1
我可以解决这个问题!我的 ganeti-os-image 中有一个拼写错误/etc/puppet/puppet.conf
,如下所示:
........
pluginsource = puppet://plugins <-- with only two forward slashes
pluginfactsource = puppet:///pluginfacts
........
代替:
........
pluginsource = puppet:///plugins <-- three forward slashes
pluginfactsource = puppet:///pluginfacts
........
这是一个新映像,因此只有该特定主机受到影响。谢谢