Puppet代理无法连接到主控节点。

5

我已经费了两天劲儿来签发 Puppet-Agents,但问题如下:

在主机上,我使用以下命令删除所有现有的签名:

puppet cert clean esx-poc-1.xxx.de

在代理服务器上,我使用以下命令删除整个 ssl 目录:

rm -rf /var/lib/puppet/ssl/

在代理服务器上运行以下任一命令之后...

puppet certificate generate esx-poc-1.xxx.de --ca-location remote puppet agent --server puppetmaster.int.xxx.com --waitforcert 60 --test

...我可以通过以下命令在主机上列出证书:

puppet cert list --all

输出结果如下:

"esx-poc-1.xxx.de" (SHA256) 71:72:D8:3E:09:9E:B1:5C:DA:78:A8:B8:A1:2B:E4:09:B8:00:8A:AF:49:02:CC:B2:B5:C3:25:79:59:0D:A8:F5 + "puppetmaster.int.xxx.com" (SHA256) 7B:00:8C:4F:CE:B2:0D:2F:A1:BB:A7:C4:25:B0:11:01:2B:EC:90:46:D1:CB:BE:AA:AD:3F:B4:70:0C:83:3F:78 (alt names: "DNS:puppet", "DNS:puppet.xxx.de", "DNS:puppetmaster.int.xxx.com")

然后使用以下命令签发代理服务器:

puppet cert sign esx-poc-1.xxx.de

指纹与上面的不同:

  • "esx-poc-1.xxx.de" (SHA256) 49:F6:59:FD:3C:28:C6:54:7F:6E:A7:56:56:DB:64:9A:E2:08:10:90:11:83:7A:A6:0E:E1:CD:39:F0:E0:1C:25

这样做正确吗?

执行代理运行之后,会出现以下错误:

Warning: Unable to fetch my node definition, but the agent run will continue: Warning: Error 400 on SERVER: Could not retrieve facts for esx-poc-1.xxx.de: Failed to submit 'replace facts' command for esx-poc-1.xxx.de to PuppetDB at puppetmaster.int.xxx.com:8081: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed: [certificate signature failure for /CN=puppetmaster.int.xxx.com] Info: Retrieving plugin Info: Loading facts in /var/lib/puppet/lib/facter/last_run.rb Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb Info: Loading facts in /var/lib/puppet/lib/facter/puppi_projects.rb Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb Info: Loading facts in /var/lib/puppet/lib/facter/iptables.rb Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to submit 'replace facts' command for esx-poc-1.xxx.de to PuppetDB at puppetmaster.int.xxx.com:8081: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed: [certificate signature failure for /CN=puppetmaster.int.xxx.com] Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run

感谢您的帮助!
5个回答

3

我自己也遇到了完全相同的问题。问题最终是由于puppetdb-terminus包的版本为1.1.0,而puppetdb本身仍然是1.0.5

puppetdb-terminus降级到1.0.5后,一切都正常运作。


1
在Puppet 3.4中,我注意到如果主机名未设置,则可能会抛出此错误。
例如:我有两个debian盒子;一个命名为debian1,另一个命名为debian2,在hosts文件中。但是,它们的/etc/hostname设置都是debian;当我使用hostname更改它们的名称并在/etc/hostname中设置它们的名称后,它们正常工作。

0
这可能是一个愚蠢的问题,但是,你有这台机器的节点定义吗?即,

node 'esx-poc-1.xxx.de' {
    .....
}

0

在更改/etc/puppet中文件的权限后,我遇到了这个错误。 将它们改回“pe-puppet”(企业版)对我有帮助。


-2

在完全重新安装puppetdb之后,它终于可以工作了...


1
这并没有提供问题的答案。如果您想对作者进行批评或请求澄清,请在他们的帖子下留言。 - laurent
请使用问题上的编辑链接添加其他信息。Post Answer按钮仅用于完整回答问题。 - Stephane Rolland

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接