2016-09-21 57 views
0

当我在代理上做傀儡代理时,我看到以下内容。它最近突然发生了。几件事情要提到: 1.木偶大师和代理商全部投入运行。 2.证书已成功签名。 木偶主版本4.3.1 木偶代理版本3.8.4 OS RedHat,主人6人,某些代理人7人。Puppet上的连接问题

Warning: Unable to fetch my node definition, but the agent run will continue: 
Warning: Connection refused - connect(2) 
Info: Retrieving pluginfacts 
Error: /File[/var/lib/puppet/facts.d]: Failed to generate additional resources using 'eval_generate': Connection refused - connect(2) 
Error: /File[/var/lib/puppet/facts.d]: Could not evaluate: Could not retrieve file metadata for puppet://vengcjn501.mmm.com/pluginfacts: Connection refused - connect(2) 
Info: Retrieving plugin 
Error: /File[/var/lib/puppet/lib]: Failed to generate additional resources using 'eval_generate': Connection refused - connect(2) 
Error: /File[/var/lib/puppet/lib]: Could not evaluate: Could not retrieve file metadata for puppet://vengcjn501.mmm.com/plugins: Connection refused - connect(2) 
Info: Loading facts 
Error: Could not retrieve catalog from remote server: Connection refused - connect(2) 
Warning: Not using cache on failed catalog 
Error: Could not retrieve catalog; skipping run 
Error: Could not send report: Connection refused - connect(2) 
+1

如果主服务器正在运行,但代理程序收到“连接被拒绝”消息,则很可能连接在防火墙处被阻塞 - 可能在主服务器端,但可能位于代理端。显然,如果防火墙配置发生变化,这可能会突然发生。 –

回答

0

connection refused消息指示主机可以访问,但其端口未打开。

步骤来调试问题:

  1. 在代理计算机,运行

    puppet agent --configprint server 
    

    这应该打印主控机器的有效FQDN。

  2. 在代理机器上Ping此FQDN。记下被ping的IP地址。

  3. 检查主机是否拥有该地址。

  4. 使用netstat -tlnp确保puppetserver正在监听端口8140(所有地址或前面标识的特定IP)。

  5. 确保代理机器上的puppet agent --configprint masterport返回8140(或puppetserver使用的任何其他端口)。

随着您遇到的问题,至少其中一个步骤会失败。

+0

谢谢,我逐个检查了所有步骤。除了第4步以外,一切看起来都很好。当我在主服务器上执行netstat -tlnp时,我看不到列出的程序(PID)。当我运行以下我得到︰puppet resource service puppetserver enable = true service {'puppetserver': ensure =>'stopped', enable =>'true', } – James

+0

@James好,那么'puppetserver看来,服务并没有运行。 –