2015-02-24 26 views
2

我想在高可用性環境中配置puppet。我配置了2個木偶大師,但他們無法通過CA簽署對方。當我嘗試測試puppet agent --test,它給了我以下錯誤:嘗試將Puppet配置爲高可用性時出錯

'Warning: Unable to fetch my node definition, but the agent run will continue: 
Warning: getaddrinfo: Name or service not known 
Info: Retrieving pluginfacts 
Error: /File[/home/clogeny/.puppet/var/facts.d]: Failed to generate additional resources using 'eval_generate': getaddrinfo: Name or service not known 
Error: /File[/home/clogeny/.puppet/var/facts.d]: Could not evaluate: Could not retrieve file metadata for puppet://puppet/pluginfacts: getaddrinfo: Name or service not known 
Wrapped exception: 
getaddrinfo: Name or service not known 
Info: Retrieving plugin 
Error: /File[/home/clogeny/.puppet/var/lib]: Failed to generate additional resources using 'eval_generate': getaddrinfo: Name or service not known 
Error: /File[/home/clogeny/.puppet/var/lib]: Could not evaluate: Could not retrieve file metadata for puppet://puppet/plugins: getaddrinfo: Name or service not known 
Wrapped exception: 
getaddrinfo: Name or service not known 
Error: Could not retrieve catalog from remote server: getaddrinfo: Name or service not known 
Warning: Not using cache on failed catalog 
Error: Could not retrieve catalog; skipping run 
Error: Could not send report: getaddrinfo: Name or service not known' 

任何人都可以幫我嗎?

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 
hiera_config=/etc/puppet/hiera.yml 
catalog_format = yaml 
certname=puppet 
pluginsync=false 
dns_alt_names=puppetmaster01,puppet.sencha.com 

[master] 
ssl_client_header = SSL_CLIENT_S_DN 
ssl_client_verify_header = SSL_CLIENT_VERIFY 
manifest=$confdir/manifests/site.pp 
modulepath=$confdir/environments/$environment/modules:/home/clogeny/Desktop/pupp‌​‌​et-kitchen-example/modules 
+0

你能證明你的木偶大師機puppet.conf文件。 – kkamilpl 2015-02-24 14:13:39

+0

'getaddrinfo:名稱或服務未知'意味着您在puppet.conf中擁有的木偶大師無法訪問,您可以編輯以顯示您的配置嗎? – 2015-02-24 15:50:58

+0

@ kkamilpl,@ PeterSouter我的主機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 hiera_config =/etc/puppet/hiera.yml catalog_format = yaml certname = puppet pluginsync = false dns_alt_names = puppetmaster01,puppet.sencha.com [master] ssl_client_header = SSL_CLIENT_S_DN ssl_client_verify_header = SSL_CLIENT_VERIFY清單= $ confdir/manifests/site.pp modulepath = $ confdir/environments/$ environment/modules:/ home/clogeny/Desktop/pupp et-kitchen-example/modules' – sencha7 2015-02-25 05:51:52

回答

1

存在的puppet.conf[main]部分缺失server值。 server值應該指向Puppet主服務器。必須可以從puppet代理訪問Puppet主服務器的名稱。檢查下面的文章如何正確連接木偶代理木偶大師:

http://shapeshed.com/connecting-clients-to-a-puppet-master/

https://docs.puppetlabs.com/guides/install_puppet/post_install.html

+0

Thanx for reply。我能解決這個問題。 – sencha7 2015-03-02 10:41:30

+0

有沒有人有想在HA(即高可用性)環境中配置多個puppetmaster? 我有兩個puppet master啓動並運行,但我面臨HA配置問題。 – sencha7 2015-03-02 12:18:07

+0

@ sencha7檢查以下參考https://ask.puppetlabs.com/question/1740/how-to-design-a-high-available-multi-master-puppet-architecture-spanning-multiple-data-center/ – kkamilpl 2015-03-02 12:39:09

0

似乎是一個名稱解析問題?兩個系統(主代理&代理)能夠使用他們的FQDN進行通信?如果您不打擾使用DNS服務器,則可以將它們的FQDN添加到/ etc/hosts文件中。

如:在/ etc /主機

[email protected]:~# cat /etc/hosts 
127.0.0.1 localhost 
192.168.1.1 puppet puppet-master 

# The following lines are desirable for IPv6 capable hosts 
::1  localhost ip6-localhost ip6-loopback 
ff02::1 ip6-allnodes 
ff02::2 ip6-allrouters 
相關問題