Puppet

無法打開與外掛的 TCP 連接:8140

  • October 4, 2019

我正在使用開源 puppet 在 ganeti 中部署幾個 vm,當我在這個特定的主機上執行 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)之外,它們都被部署了,因此我/etc/facter/facts.d/的也是空的/var/lib/puppet/facts.d/

值得注意的是,這個宿主無法解析“傀儡”,而是傀儡大師。我正在為區域使用 srv 記錄,我可以從主機解決它。

有人可以幫忙嗎?您需要更多資訊嗎?提前致謝!

我可以解決問題!我的 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
........

這是一個新圖像,因此只有這個特定的主機受到影響。謝謝

引用自:https://unix.stackexchange.com/questions/316006