尝试将Puppet配置为高可用性时出错

问题描述 投票:2回答:3

我想在高可用性环境中配置puppet。我已经配置了2个Puppet master,但是他们无法通过CA签名。当我尝试测试puppet agent --test时,它会给我以下错误:

'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
puppet high-availability
3个回答
2
投票

server[main]部分缺少puppet.conf值。 server值应指向Puppet主服务器。必须可以从puppet agent访问Puppet主服务器的名称。检查以下文章如何正确连接Puppet代理到puppet master:

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

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


1
投票

看起来像名称解析问题?系统(主站和代理)都能够使用他们的FQDN进行通信吗?如果您不打算使用DNS服务器,则可以在/ etc / hosts文件中添加其FQDN。

例如:/ etc / host

root@puppet-master-kasun:~# 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

0
投票

使用puppet agent -t --DEBUG来调试


调试:启动https://toto.local:8140的连接错误:/ File [/ opt / puppetlabs / puppet / cache /facts.d]:无法使用'eval_generate'生成其他资源:getaddrinfo:名称或服务未知

https://toto.local:8140无法到达

© www.soinside.com 2019 - 2024. All rights reserved.