【发布时间】:2016-05-12 00:55:52
【问题描述】:
我在一个网络中设置了puppet master and puppet agent server。我已经从 puppet 主服务器签署了 puppet 代理的证书请求。我正在尝试从 Puppet Master 对 Puppet 代理服务器运行清单,但它失败了。两台 Puppet Master 服务器上的 newManifest.pp 通过其 FQDN 调用 Puppet 代理。两台服务器上的/etc/hosts 文件都包含两台服务器的 FQDN 条目及其 IP 地址。我可以从另一台 ping 每台服务器。我可以从每台服务器通过 SSH 连接到另一台。
两个网络中的所有这四台服务器都将CentOS 7 作为操作系统,并使用开源Puppet version 3.8.4。所有四台机器上的防火墙均已关闭。这些端口不会在任何中间路径上被阻止:Puppet Master 和 Puppet Agent 服务器之间的任一网络上的 22、443、8140 和 61610。
在网络一中,我希望清单能够编译。他们从来没有。
我尝试使用 sshd_config` 在 Puppet Master 和 Puppet 代理上使用端口 22、443、8140 和 61610。当我从木偶大师那里使用它时:
puppet agent -t newManifest.pp --server='foobar.acme.com'
我收到一个错误:
Unable to fetch my node definition, but the agent will continue: Warning: Connection refused - connect(2).
我再次尝试使用 sshdconfig 不专门使用任何端口。我回收了 sshdconfig 服务。我运行相同的命令:
puppet agent -t newManifest.pp --server='foobar.acme.com'
我得到一个不同的错误:
Unable to fetch my node definition, but the agent run will continue: connection refused - connect(2).
然后我尝试了这个命令(没有明确指定服务器):
puppet agent -t newManifest.pp
这一次,我得到了这个错误:
Unable to fetch my node definition, but the agent will continue: Network is unreachable.
在网络 2 中,我希望清单能够正常工作。他们从来没有。
我尝试使用 sshd_config 在 Puppet Master 和 Puppet 代理上使用端口 22、443、8140 和 61610。当我从木偶大师那里使用它时:
puppet agent -t newManifest.pp --server='foobar.acme.com'
我得到一个不同的错误:
Unable to fetch my node definition, but the agent run will continue: SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol.
我再次尝试使用 sshdconfig 不专门使用任何端口。我回收了 sshdconfig 服务。我运行相同的命令:
puppet agent -t newManifest.pp --server='foobar.acme.com'
我得到一个不同的错误:
Unable to fetch my node definition, but the agent run will continue: connection refused - connect(2).
然后我尝试了这个命令(没有明确指定服务器):
puppet agent -t newManifest.pp
这一次,我得到了这个错误:
Unable to fetch my node definition, but the agent will continue: No route to host - connect(2).
网络 1 和 2 之间的错误是不同的,除非 sshd_config 没有使用任何特定端口并且编译清单的命令显式设置了 FQDN。为什么是这样?怎么了?我试图设置 Puppet 两次只是为了修复第一个实例。我无法完全重现第一个网络中的具体问题。
如何让 Puppet Master 服务器编译清单?傀儡特工已经签署了证书。我不明白为什么清单的编译总是失败。
【问题讨论】:
-
这不会解决您的连接问题,但您不能指定使用
puppet agent -t运行的清单。主服务器将使用site.pp或 ENC 来确定要应用哪些清单。或者,您可以运行puppet apply并指定清单(如果您已将它们保存在本地)。
标签: ruby linux networking ssh puppet