3

パペットをインストールforeman-1.2しました。インストール後、パペットをsmart-proxyフォアマンに登録しました。

次のコマンドを実行すると

[root@puppet ~]# puppet agent -t
Warning: Unable to fetch my node definition, but the agent run will continue:
Warning: Error 400 on SERVER: Failed to find puppet.example.com via exec: Execution of '/etc/puppet/node.rb puppet.example.com' returned 1: --- false

Info: Retrieving plugin
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed when searching for node puppet.example.com: Failed to find puppet.example.com via exec: Execution of '/etc/puppet/node.rb puppet.example.com' returned 1: --- false

Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

フォローしてみた

[root@puppet ~]# /etc/puppet/node.rb puppet.example.com
--- false
Error retrieving node puppet.example.com: Net::HTTPNotFound

foreman.log デバッグ

Started GET "/node/puppet.example.com?format=yml" for 10.101.20.15 at 2014-03-25 21:01:47 -0400
Processing by HostsController#externalNodes as YML
  Parameters: {"name"=>"puppet.example.com"}
  Setting Load (1.3ms)  SELECT `settings`.* FROM `settings` WHERE `settings`.`name` = 'restrict_registered_puppetmasters' ORDER BY name LIMIT 1
  Setting Load (0.3ms)  SELECT `settings`.* FROM `settings` WHERE `settings`.`name` = 'require_ssl_puppetmasters' ORDER BY name LIMIT 1
  SmartProxy Load (0.5ms)  SELECT `smart_proxies`.* FROM `smart_proxies` INNER JOIN `features_smart_proxies` ON `features_smart_proxies`.`smart_proxy_id` = `smart_proxies`.`id` INNER JOIN `features` ON `features`.`id` = `features_smart_proxies`.`feature_id` WHERE `features`.`name` = 'Puppet' ORDER BY smart_proxies.name
  Setting Load (0.3ms)  SELECT `settings`.* FROM `settings` WHERE `settings`.`name` = 'trusted_puppetmaster_hosts' ORDER BY name LIMIT 1
Verifying request from ["puppet.example.com"] against ["puppet.example.com"]
  User Load (0.4ms)  SELECT `users`.* FROM `users` WHERE `users`.`login` = 'admin' LIMIT 1
Setting current user thread-local variable to admin
  Host::Managed Load (0.7ms)  SELECT `hosts`.* FROM `hosts` WHERE `hosts`.`type` IN ('Host::Managed') AND `hosts`.`certname` = 'puppet.example.com' LIMIT 1
  Host::Managed Load (0.6ms)  SELECT `hosts`.* FROM `hosts` WHERE `hosts`.`type` IN ('Host::Managed') AND `hosts`.`name` = 'puppet.example.com' LIMIT 1
Completed 404 Not Found in 25ms (ActiveRecord: 4.1ms)

何か不足していますか?foremanGUIで最初にホストを作成する必要がありますか? の概念がわかりませんnode.rb

4

2 に答える 2

1

基本的に、マスターとエージェントが (/etc/hosts または dns のいずれかを介して) お互いに精通していることを確認する必要があります。このエラーは通常、マスターがエージェントの名前 (puppet.example.com など) を解決できない場合に発生します。

于 2014-12-24T14:26:04.080 に答える