一个错误问题为难了一周~~
puppet客户端执行
[root@tj_web ~]# puppet agent --test --noop
notice: Ignoring --listen on onetime runinfo: Caching catalog for tj.web_cert.domain.cominfo: Applying configuration version '1417400052'info: create new repo mirrors in file /etc/yum.repos.d/mirrors.reponotice: /Stage[main]/Nginx/Yumrepo[mirrors]/descr: current_value , should be mirrors domain repo (noop)notice: /Stage[main]/Nginx/Yumrepo[mirrors]/baseurl: current_value , should be http://mirrors.domain.com/centos/6/update/x86_64/ (noop)notice: /Stage[main]/Nginx/Yumrepo[mirrors]/enabled: current_value , should be 1 (noop)notice: /Stage[main]/Nginx/Yumrepo[mirrors]/gpgcheck: current_value , should be 0 (noop)notice: /Stage[main]/Nginx/Service[nginx]/ensure: current_value stopped, should be running (noop)notice: /Stage[main]/Nginx/Package[nginx-debuginfo]/ensure: current_value absent, should be latest (noop)err: /File[/etc/nginx/conf.d]: Failed to generate additional resources using 'eval_generate: Error 400 on SERVER: Not authorized to call search on /file_metadata/files/nginx/conf.d with {:recurse=>true, :links=>"manage", :checksum_type=>"md5"}err: /File[/etc/nginx/conf.d]: Could not evaluate: Error 400 on SERVER: Not authorized to call find on /file_metadata/files/nginx/conf.d with {:links=>"manage"} Could not retrieve file metadata for puppet://puppet.domain.com/files/nginx/conf.d: Error 400 on SERVER: Not authorized to call find on /file_metadata/files/nginx/conf.d with {:links=>"manage"} at /etc/puppet/modules/nginx/manifests/init.pp:42notice: /Stage[main]/Nginx/Exec[reload-nginx]: Dependency File[/etc/nginx/conf.d] has failures: truewarning: /Stage[main]/Nginx/Exec[reload-nginx]: Skipping because of failed dependenciesnotice: /File[/etc/nginx/conf.d/nginx_logrote.sh]: Dependency File[/etc/nginx/conf.d] has failures: truewarning: /File[/etc/nginx/conf.d/nginx_logrote.sh]: Skipping because of failed dependenciesnotice: Class[Nginx]: Would have triggered 'refresh' from 6 eventsnotice: Stage[main]: Would have triggered 'refresh' from 1 eventsnotice: Finished catalog run in 31.59 seconds
错误信息
err: /File[/etc/nginx/conf.d]: Failed to generate additional resources using 'eval_generate: Error 400 on SERVER: Not authorized to call search on /file_metadata/files/nginx/conf.d with {:recurse=>true, :links=>"manage", :checksum_type=>"md5"}err: /File[/etc/nginx/conf.d]: Could not evaluate: Error 400 on SERVER: Not authorized to call find on /file_metadata/files/nginx/conf.d with {:links=>"manage"} Could not retrieve file metadata for puppet://puppet.domain.com/files/nginx/conf.d: Error 400 on SERVER: Not authorized to call find on /file_metadata/files/nginx/conf.d with {:links=>"manage"} at /etc/puppet/modules/nginx/manifests/init.pp:42
google,百度了好多答案,都是修改fileserver.conf中的内容
添加类似以下信息
[files] path /etc/puppet/files allow *.domain.com
但添加完后,puppetmaster根本无法启动
最后修改模块的文件
[root@puppet_master puppet]# vim /etc/puppet/modules/nginx/manifests/init.pp
file { $nginx_conf: ensure => directory, recurse => true, purge => true, #source => "puppet://$fileserver/files/nginx/conf.d", source => "puppet:///files/nginx/conf.d", notify => Exec["reload-nginx"], require => Package["nginx"],}file { $nginx_logrote: ensure => file, mode =>755,owner =>root,group =>root, #source => "puppet://$fileserver/files/nginx/nginx_logrote.sh", source => "puppet:///files/nginx/nginx_logrote.sh",}
把原来的
source => "puppet://$fileserver/files/nginx/conf.d"
修改为
source => "puppet:///files/nginx/conf.d"
然后在
[root@puppet_master puppet]# vim /etc/puppet/fileserver.conf
添加刚才内容
[files]
path /etc/puppet/files
allow *.domain.com
重启puppet服务端即可解决。
整整查找一周的问题也是醉了。。。