我有一个工作环境,使用傀儡供应与流浪汉。现在我在AWS EC2上设置了一个puppetmaster服务器,其中包含与vagrant一起使用的相同模块,但是当我尝试从代理访问它时,我得到Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class co_gocdserver for ip-172-31-34-78.us-west-2.compute.internal on node ip-172-31-34-78.us-west-2.compute.internal
。
/etc/puppet/manifests/site.pp
目前看起来就像这样:
node default {
include co_gocdserver
}
/etc/puppet/modules/co_gocdserver/manifests/init.pp
看起来像:
class co_gocdserver {
include gocd::server
file { "ssh":
path => "/var/go/.ssh",
source => "puppet:///modules/co_baseconfig/ssh",
recurse => true,
require => Package["go-server"],
}
}
更新:主人在/etc/puppet/puppet.conf
处:
[main]
# The Puppet log directory.
# The default value is '$vardir/log'.
logdir = /var/log/puppet
# Where Puppet PID files are kept.
# The default value is '$vardir/run'.
rundir = /var/run/puppet
# Where SSL certificates are kept.
# The default value is '$confdir/ssl'.
ssldir = $vardir/ssl
#node_name = facter
#node_name_fact = puppet_node
basemodulepath = /etc/puppet/modules
[master]
basemodulepath = /etc/puppet/modules
[agent]
# The file in which puppetd stores a list of the classes
# associated with the retrieved configuratiion. Can be loaded in
# the separate ``puppet`` executable using the ``--loadclasses``
# option.
# The default value is '$confdir/classes.txt'.
classfile = $vardir/classes.txt
# Where puppetd caches the local configuration. An
# extension indicating the cache format is added automatically.
# The default value is '$confdir/localconfig'.
localconfig = $vardir/localconfig
是否有任何明显的错误或如何调试?
答案 0 :(得分:1)
解决了它。问题是我搞砸了modules目录的权限,并且puppetserver作为用户puppet运行,没有读取权限。
我怎么会弄乱权限?有效的问题。简单回答:
rm -rf /etc/puppet/modules
ln -s /home/centos/puppet/modules /etc/puppet/modules
将此线程作为参考。