2014-10-07 34 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參數爲默認價值造成一些混亂。

一旦我刪除了冗餘參數,錯誤就被清除了。