我在使用puppetdb查询的木偶运行中遇到了一个错误:
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: undefined method `server_urls' for #<Puppet::Util::Puppetdb::Config:0x00000003cd66c8> at /etc/puppet/local-modules/monitoring/manifests/init.pp:14 on node hostname.goes.here
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run通过使用--verbose运行傀儡大师,我得到了警告,它看起来很有用:
Warning: It looks like you are using a PuppetDB version < 3.0.
This version of puppetdbquery requires at least PuppetDB 3.0 to work.
Downgrade to puppetdbquery 1.x to use it with PuppetDB 2.x.PuppetDB 3.0在这台机器上是不可用的,所以我想降低puppetdbquery的等级。但是,我找不到它的安装位置/方式。到目前为止,我已经检查了dpkg (我正在运行Debian )、gem和librarian-puppet,但它们似乎都没有安装puppetdbquery。
有没有找到它的来源和如何降低它的评级?
发布于 2016-01-13 00:05:55
为了跟踪该文件(感谢ssm的回答提供了源代码链接),我做到了:
find / -name connection.rb然后,我为那些包含“看起来您使用的是PuppetDB版本<3.0”的结果进行了汇总,最后得到了一个文件:
/var/lib/gems/2.1.0/gems/ruby-puppetdb-2.1.1/lib/puppetdb/connection.rb起初,这让我感到困惑,因为它没有提到傀儡查询,但是在仔细检查存储库时,我发现它包含了称为“ruby”的宝石,而不是傀儡查询。因此,修复程序将运行:
gem uninstall ruby-puppetdb --version 2.1.1我安装了较早版本的gem,因此系统转而使用这些版本。
总结:当作为宝石安装时,木偶puppetdb被称为ruby-puppetdb。
发布于 2016-01-12 14:33:56
傀儡查询是一个傀儡模块,即使它可能不在您的Puppetfile中,但它可以作为其他模块的依赖项安装。
查看您的傀儡主人的模块路径中列出的目录。
您引用的错误消息可以在该模块的lib/puppetdb/connection.rb中找到。
https://serverfault.com/questions/745294
复制相似问题