我正在从Ubuntu 10.04运行Puppet版本0.25.4。 我跑的时候:
puppetd --test
在一台机器上,这是我得到的错误:
err: Could not run Puppet configuration client: Could not retrieve local facts: 404 Not Found
我能够从我的主人那里“签署”机器证书,但之后,仅此而已。 在具有相同配置的另一台机器上运行相同版本的Puppet,没有任何问题。
即使通过:
--debug --verbose
作为命令行参数不会给我更多线索。 有什么想法吗?
=更新以添加更多context =
这是我在所有机器上的puppet.conf文件:
[main]
logdir = /var/log/puppet
vardir = /var/lib/puppet
ssldir = /var/lib/puppet/ssl
rundir = /var/run/puppet
factpath = $vardir/lib/facter
pluginsync = false
templatedir = $confdir/templates
prerun_command = /etc/puppet/etckeeper-commit-pre
postrun_command = /etc/puppet/etckeeper-commit-post
[puppetd]
server = puppet
report = true
这是正在运行的输出
puppetd --debug --verbose --test
来自错误机器的:
debug: Failed to load library 'selinux' for feature 'selinux'
debug: Puppet::Type::User::ProviderPw: file pw does not exist
debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dscl does not exist
debug: Failed to load library 'ldap' for feature 'ldap'
debug: Puppet::Type::User::ProviderLdap: feature ldap is missing
debug: Puppet::Type::User::ProviderUser_role_add: file roleadd does not exist
debug: /File[/var/lib/puppet/ssl/private]: Autorequiring File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/client_yaml]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/ssl/private_keys]: Autorequiring File[/var/lib/puppet/ssl]
debug: /File[/var/run/puppet/puppetd.pid]: Autorequiring File[/var/run/puppet]
debug: /File[/var/lib/puppet/ssl/certs/ca.pem]: Autorequiring File[/var/lib/puppet/ssl/certs]
debug: /File[/etc/puppet/puppet.conf]: Autorequiring File[/etc/puppet]
debug: /File[/var/lib/puppet/clientbucket]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/facts]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/ssl]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/state/graphs]: Autorequiring File[/var/lib/puppet/state]
debug: /File[/var/lib/puppet/ssl/certs/HOSTNAME.pem]: Autorequiring File[/var/lib/puppet/ssl/certs]
debug: /File[/var/lib/puppet/ssl/public_keys]: Autorequiring File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/ssl/private_keys/HOSTNAME.pem]: Autorequiring File[/var/lib/puppet/ssl/private_keys]
debug: /File[/var/lib/puppet/ssl/public_keys/HOSTNAME.pem]: Autorequiring File[/var/lib/puppet/ssl/public_keys]
debug: /File[/var/lib/puppet/ssl/certificate_requests]: Autorequiring File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/ssl/certs]: Autorequiring File[/var/lib/puppet/ssl]
debug: Finishing transaction -613406248 with 0 changes
debug: Using cached certificate for ca, good until Tue Nov 22 13:59:42 UTC 2016
debug: Using cached certificate for HOSTNAME, good until Sat Nov 26 11:31:35 UTC 2016
debug: Executing '/etc/puppet/etckeeper-commit-pre'
debug: Executing '/etc/puppet/etckeeper-commit-post'
err: Could not run Puppet configuration client: Could not retrieve local facts: 404 Not Found
并且与其他机器基本相同,除了在执行etckeeper-commit-pre(并且未在任何机器中安装了etckeeper)之后不执行任何操作的事实。
答案 0 :(得分:0)
问题实际上是由于Facter尝试联系亚马逊云服务以获取正在运行的虚拟实例的事实而引起的。
显然你没有在云中运行,所以你不需要它。
删除以下文件:
/usr/lib/ruby/1.8/facter/ec2.rb
为了防止我需要,我将我的目标移出了该目录。重命名文件将无法完成任务。
请注意,这在后来的Puppet版本中得到修复。
答案 1 :(得分:0)
我也遇到了这个问题。我多次尝试但没有工作。然后我使用:
which -a puppet
我发现安装了两个木偶版本! 我删除所有这些,然后使用deb包重新安装木偶,现在它可以工作。