puppet一次惨痛错误学习记录
一个错误问题为难了一周~~puppet客户端执行
1
# puppet agent --test --noop
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
notice: Ignoring --listen on onetime run
info: Caching catalog for tj.web_cert.domain.com
info: Applying configuration version '1417400052'
info: create new repo mirrors in file /etc/yum.repos.d/mirrors.repo
notice: /Stage/Nginx/Yumrepo/descr: current_value , should be mirrors domain repo (noop)
notice: /Stage/Nginx/Yumrepo/baseurl: current_value , should be http://mirrors.domain.com/centos/6/update/x86_64/ (noop)
notice: /Stage/Nginx/Yumrepo/enabled: current_value , should be 1 (noop)
notice: /Stage/Nginx/Yumrepo/gpgcheck: current_value , should be 0 (noop)
notice: /Stage/Nginx/Service/ensure: current_value stopped, should be running (noop)
notice: /Stage/Nginx/Package/ensure: current_value absent, should be latest (noop)
err: /File: 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: 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
notice: /Stage/Nginx/Exec: Dependency File has failures: true
warning: /Stage/Nginx/Exec: Skipping because of failed dependencies
notice: /File: Dependency File has failures: true
warning: /File: Skipping because of failed dependencies
notice: Class: Would have triggered 'refresh' from 6 events
notice: Stage: Would have triggered 'refresh' from 1 events
notice: Finished catalog run in 31.59 seconds
错误信息
1
2
err: /File: 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: 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中的内容
添加类似以下信息
1
2
3
path /etc/puppet/files
allow *.domain.com
但添加完后,puppetmaster根本无法启动
最后修改模块的文件
1
# vim /etc/puppet/modules/nginx/manifests/init.pp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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"
然后在
# vim /etc/puppet/fileserver.conf
添加刚才内容
path /etc/puppet/files
allow *.domain.com
重启puppet服务端即可解决。
整整查找一周的问题也是醉了。。。
页:
[1]