2014-10-07 37 views
0

(我是新来的傀儡 - 希望这是一个简单的修复)。启动远程代理时出现Puppet 400错误

我有一个木偶主服务器设置,以及两个木偶代理服务器。证书已签名,一切都顺利,直到我尝试启动两个木偶代理。

下面是我这两个代理服务器上运行的命令:

[email protected]:~$ sudo puppet agent --server=puppet.omitted.com --no-daemonize --verbose 

而这里的我得到两个代理服务器上的输出:

Notice: Starting Puppet client version 3.4.3 
Info: Retrieving plugin 
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not parse for environment production: Is a directory - /etc/puppet/manifests on node img1.omitted.com 
Notice: Using cached catalog 
Error: Could not retrieve catalog; skipping run 

这里就是我的长相puppet.conf就像在两个代理服务器上一样:

[main] 
logdir=/var/log/puppet 
vardir=/var/lib/puppet 
ssldir=/var/lib/puppet/ssl 
rundir=/var/run/puppet 
factpath=$vardir/lib/facter 
templatedir=$confdir/templates 
prerun_command=/etc/puppet/etckeeper-commit-pre 
postrun_command=/etc/puppet/etckeeper-commit-post 
server=puppet.omitted.com 

[master] 
# These are needed when the puppetmaster is run by passenger 
# and can safely be removed if webrick is used. 
ssl_client_header = SSL_CLIENT_S_DN 
ssl_client_verify_header = SSL_CLIENT_VERIFY 

而这里是主服务器上的puppet.conf:

[main] 
logdir=/var/log/puppet 
vardir=/var/lib/puppet 
ssldir=/var/lib/puppet/ssl 
rundir=/var/run/puppet 
factpath=$vardir/lib/facter 
templatedir=$confdir/templates 
prerun_command=/etc/puppet/etckeeper-commit-pre 
postrun_command=/etc/puppet/etckeeper-commit-post 
certname=puppet.omitted.com 
dns_alt_names=puppet.omitted.com 
manifest=/etc/puppet/manifests/ 

[master] 
# These are needed when the puppetmaster is run by passenger 
# and can safely be removed if webrick is used. 
ssl_client_header = SSL_CLIENT_S_DN 
ssl_client_verify_header = SSL_CLIENT_VERIFY 

有趣的是,我在主服务器上的系统日志看到的是:

Oct 7 21:51:57 ip-10-10-1-207 puppet-master[17629]: message repeated 32 times: [ Could not parse for environment production: Is a directory - /etc/puppet/manifests on node img1.omitted.com] 
Oct 7 21:53:57 ip-10-10-1-207 puppet-master[17629]: Could not parse for environment production: Is a directory - /etc/puppet/manifests on node img2.omitted.com 

回答

0

事实证明,在主服务器上设置在puppet.conf的manifest参数为默认价值造成一些混乱。

一旦我删除了冗余参数,错误就被清除了。