我们有一个运行的Puppet服务器,可以为数百个Windows服务器提供服务。已安装的Puppet代理为6.x。在几乎所有服务器上,'puppet agent -t'都可以正常工作,只有少数例外出现相同的问题。
当我开始清理时,Puppet代理与服务器连接,接收证书并下载所有事实,而不下载所有事实。这可行。然后,代理加载事实,一段时间后,我收到一条错误消息:
C:\>puppet agent -t
Info: Using configured environment 'windows'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Loading facts
Error: Failed to apply catalog: Could not render to json: source sequence is illegal/malformed utf-8
C:\>
如果我在调试模式下运行Puppet代理,尽管我可能会因为输出很多而错过了它,但它显示的只是事实正在解决,然后出现上述消息,并且代理运行停止。正在解决的最后一个事实(根据调试输出)始终是:
Debug: Facter: resolving processor facts.
Debug: Facter: fact "hardwareisa" has resolved to "x64".
Debug: Facter: fact "processorcount" has resolved to 2.
Debug: Facter: fact "physicalprocessorcount" has resolved to 1.
Debug: Facter: fact "processor0" has resolved to "Intel(R) Xeon(R) CPU E5-2643 v2 @ 3.50GHz".
Debug: Facter: fact "processors" has resolved to {
count => 2,
isa => "x64",
models => [
"Intel(R) Xeon(R) CPU E5-2643 v2 @ 3.50GHz"
],
physicalcount => 1
}.
Error: Failed to apply catalog: Could not render to json: source sequence is illegal/malformed utf-8
但是,我怀疑那是罪魁祸首,因为IIRC Puppet并没有真正按顺序运行。
我不理解同一件事如何在一台服务器上运行,但即使在具有相同代理版本的情况下也无法在另一台服务器上运行。如何找出错误消息的来源?
答案 0 :(得分:0)
我知道这是一个古老的话题,但就我而言,解决方案是确认每个自定义事实均以UTF-8编码。我们发现单个事实文件的编码方式有所不同,并在UTF-8解决了我们的问题后重新编码。