Puppet Agent 偶尔会失败,出现超时或“无法找到类”错误

Puppet Agent 偶尔会失败,出现超时或“无法找到类”错误

我已经puppet master在 Xen dom0 上运行,并且有 3 个 domU 通过每小时 crontab 与其同步puppet agent --test

大约 80% 的时间会puppet agent --test成功完成:

info: Retrieving plugin
info: Caching catalog for test3
info: Applying configuration version '1333319732'
notice: Finished catalog run in 5.08 seconds

其余 20% 的时间,它会中途失败,出现以下错误:

err: Could not retrieve catalog from remote server: Error 400 on SERVER:
     Could not find class iptables for test1 at /etc/puppet/manifests/site.pp:1 on node test1
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run

或者

info: Retrieving plugin
info: Caching catalog for test2
info: Applying configuration version '1333319732'
notice: Finished catalog run in 24.73 seconds
err: Could not send report: Error 500 on SERVER: 

Internal Server Error

private method `gsub' called for WEBrick::HTTPStatus::RequestTimeout:Class

 WEBrick/1.3.1 (Ruby/1.8.5/2006-08-25) OpenSSL/0.9.8e-rhel5 at
 puppet:8140

或者

info: Retrieving plugin
err: Could not retrieve catalog from remote server: execution expired
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run

或者

info: Retrieving plugin
info: Caching catalog for test3
info: Applying configuration version '1333319732'
notice: Finished catalog run in 9.47 seconds
err: Could not send report: Error 408 on SERVER: Request Timeout 

在此期间,我没有对 Puppet 配置进行任何更改 - 它只是偶尔出现故障。

我在 CentOS 上运行 puppet-2.7.12,并按照http://docs.puppetlabs.com/learning/agent_master_basic.html

关于如何解决这个问题,您有什么想法吗?

答案1

几周前,我将虚拟机运行的内存分配增加了puppet master几百兆字节,从那以后就再也没有出现任何故障。

(这是一种表示内存不足的奇怪方式......)

答案2

Webrick 是单线程的,性能很差。超过 20 台服务器,配置项数量相对较少(大约 200 个),您必须更改为其他配置。使用 Puppet Rack — 它要好得多。

相关内容