Error: Could not request certificate: Failed to open TCP connection to puppet:8140 (getaddrinfo: Name or service not known)

asked 2016-09-08 16:17:15 -0600

czar1983 gravatar image

Hello everyone,

Hello, Here I am trying to learn to use Puppet to a future job and so I decide to mount a Lab in Vbox . So I have two bridge machine

  • Ubuntu puppet agent 192.168.0.5

  • Debian puppet master server 192.168.0.14

So I ping the two machines with Ip and hostsmane .

telnet from my client on the server works but when I want to apply for a cert to my server I have the following message appears

Error: Could not request certificate: Failed to open TCP connection to puppet:8140 (getaddrinfo: Name or service not known)

Here my puppet.conf on puppet agent machine

>

 [main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/run/puppet
factpath=$vardir/lib/facter
prerun_command=/etc/puppet/etckeeper-commit-pre
postrun_command=/etc/puppet/etckeeper-commit-post
report=true
rundir=/var/run/puppet/
certname=debianserverpuppet
server=debianserverpuppet
environment=test

runinterval=50
[agent]
listen = true
[master]
ssl_client_header = SSL_CLIENT_S_DN 
ssl_client_verify_header = SSL_CLIENT_VERIFY

My iptables :

rbo@rbo-VirtualBoxOpenClassRoom:/etc/puppet$ sudo iptables -L --line-number

Chain INPUT (policy ACCEPT)

num  target     prot opt source               destination         
1    ACCEPT     tcp  --  debianserverpuppet   192.168.0.5          state NEW,ESTABLISHED tcp dpt:8140
2    ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:8140 state NEW

Chain FORWARD (policy ACCEPT)
num  target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination         
1    ACCEPT     tcp  --  192.168.0.5          debianserverpuppet   state NEW,ESTABLISHED tcp spt:8140
edit retag flag offensive close merge delete

Comments

Based on the error, the agent is connect to the server name "puppet". When you say "I want to apply for a cert to my server", how did you do that? Did you run the command as sudo or root?

maynero gravatar imagemaynero ( 2016-09-12 09:27:55 -0600 )edit