Конфигурация главного агента Puppet - PullRequest
0 голосов
/ 19 сентября 2019

Я получаю сообщение об ошибке в тесте агента кукол:

parallels@puppet-server:~$ puppet agent -t
Error: Could not request certificate: Failed to open TCP connection to puppet:8140 (getaddrinfo: Name or service not known)
Exiting; failed to retrieve certificate and waitforcert is disabled
parallels@puppet-server:~$ sudo puppet agent -t
Warning: Unable to fetch my node definition, but the agent run will continue:
Warning: Failed to open TCP connection to puppet:8140 (getaddrinfo: Name or service not known)
Info: Retrieving pluginfacts
Error: /File[/var/cache/puppet/facts.d]: Failed to generate additional resources using 'eval_generate': Failed to open TCP connection to puppet:8140 (getaddrinfo: Name or service not known)
Error: /File[/var/cache/puppet/facts.d]: Could not evaluate: Could not retrieve file metadata for puppet:///pluginfacts: Failed to open TCP connection to puppet:8140 (getaddrinfo: Name or service not known)
Info: Retrieving plugin
Error: /File[/var/cache/puppet/lib]: Failed to generate additional resources using 'eval_generate': Failed to open TCP connection to puppet:8140 (getaddrinfo: Name or service not known)
Error: /File[/var/cache/puppet/lib]: Could not evaluate: Could not retrieve file metadata for puppet:///plugins: Failed to open TCP connection to puppet:8140 (getaddrinfo: Name or service not known)
Error: Could not retrieve catalog from remote server: Failed to open TCP connection to puppet:8140 (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: Failed to open TCP connection to puppet:8140 (getaddrinfo: Name or service not known)

ФАЙЛ MASTER CONF: /etc/puppet/puppet.conf:

[main]
ssldir = /var/lib/puppet/ssl
logdir = /var/log/puppet
localconfig = $vardir/localconfig
classfile = $vardir/classes.txt
[master]
environment = production
server = puppet-server
ca_server = puppet-server
vardir = /var/lib/puppet
cadir  = /var/lib/puppet/ssl/ca
dns_alt_names = puppet

MASTER /etc/hosts:

127.0.0.1   localhost
127.0.1.1   parallels-Parallels-Virtual-Platform

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
192.168.64.14  puppet-server 
192.168.64.16  node-01

АГЕНТ КОНФ ФАЙЛ: /etc/puppet/puppet.conf:

[main]
ssldir = /var/lib/puppet/ssl
vardir = /var/lib/puppet
cadir  = /var/lib/puppet/ssl/ca
dns_alt_names = puppet

[agent]
server=192.168.64.14
ca_server=192.168.64.14

АГЕНТ /etc/hosts:

127.0.0.1   localhost
127.0.1.1   parallels-Parallels-Virtual-Platform
192.168.64.14  puppet-server                                   
192.168.64.16  node-01

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

1 Ответ

0 голосов
/ 19 сентября 2019

Как говорится в сообщении об ошибке:

Не удалось открыть TCP-соединение с куклой: 8140 (getaddrinfo: Имя или служба неизвестна)

Не удается найти хостpuppet.

Если вы добавите это к /etc/hosts на вашем клиенте и сервере, оно должно работать:

192.168.64.14  puppet
...