【问题标题】:Puppet 400 Error when starting remote agent启动远程代理时出现 Puppet 400 错误
【发布时间】:2014-10-07 22:04:16
【问题描述】:

(我是 puppet 的新手 - 希望这是一个简单的解决方法)。

我已经设置了一个 puppet 主服务器,以及两个 puppet 代理服务器。证书已签名,一切顺利,直到我尝试启动两个 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

【问题讨论】:

    标签: parsing puppet agent master


    【解决方案1】:

    事实证明,将主服务器上 puppet.conf 中的manifest 参数设置为默认值会引起一些混乱。

    删除冗余参数后,错误就被清除了。

    【讨论】:

      猜你喜欢
      • 2013-05-06
      • 1970-01-01
      • 2013-09-15
      • 2016-06-09
      • 1970-01-01
      • 2011-06-21
      • 1970-01-01
      • 2018-03-28
      • 1970-01-01
      相关资源
      最近更新 更多