Puppet代理无法连接到master

时间:2013-02-07 09:57:30

标签: ssl puppet

我现在正在签署Puppet-Agents 2天后一直在努力。问题如下:

在主人上我用

删除所有现有的签名
  

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

在代理上我用

删除整个ssl目录
  

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

在代理上运行以下命令之一后......

  

puppet证书生成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名称:“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
  •   

这是对的吗?

执行代理运行aferwards会导致以下错误:

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 个答案:

答案 0 :(得分:3)

我自己也遇到了同样的问题。最后问题是,puppetdb-terminus包的版本为1.1.0,而puppetdb本身仍为1.0.5

puppetdb-terminus降级为1.0.5后,一切正常运行。

答案 1 :(得分:1)

在puppet 3.4中,我注意到如果未设置主机名,则可能会抛出此错误。

例如;我有两个debian盒子;一个在hosts文件中被命名为debian1,另一个被命名为debian2。但是,他们的/etc/hostname设置debian;在我使用hostname更改其名称并在/etc/hostname中设置其名称后,他们的工作正常。

答案 2 :(得分:0)

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

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

答案 3 :(得分:0)

我在更改/ etc / puppet中的文件权限后出现此错误。 将它们改回'pe-puppet'(对于企业版)解决了它

答案 4 :(得分:-2)

完全重新安装puppetdb后,它终于正常工作......