簡體   English   中英

啟動遠程代理時,Puppet 400錯誤

[英]Puppet 400 Error when starting remote agent

(我是puppet的新手,希望這是一個簡單的解決方法)。

我已經設置了一個人偶主服務器,以及兩個人偶代理服務器。 證書已簽名,一切都進行得很順利,直到我嘗試啟動兩個人偶代理為止。

這是我在兩個代理服務器上都運行的命令:

ubuntu@img1:~$ 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

事實證明,將主服務器上puppet.conf中的manifest參數設置為默認值會引起一些混亂。

一旦刪除冗余參數,該錯誤便被清除。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM