1
votes

enter image description here

I am new to puppet, I am configuring connecting between puppet master "puppet" I have edited the host file on agent & client as well as I have edited the puppet.conf on agent node to resolve the master. I can ping in between both servers.

I checked on master for cert list but there were no requests.

But still I am getting this error.

How can fix this?

My configuration is :

Puppet master is :

Name: puppet, Agent: centos

Both are on VM, both have same puppet version

4
What command are you running and what error are you getting ? - iamauser
what is the error? - ptierno
I am running 'puppet agent --test' from agent node to generate a certificate on a master server so that master server can sign the certificate. But some how the agent is not able to request the puppet server. I have proper communication between both of them. - Nirbhay Singh
Error I'm getting is : [root@centos ~]# puppet agent --test Error: Could not request certificate: Connection refused - connect(2) for "puppet" port 8140 Exiting; failed to retrieve certificate and waitforcert is disabled - Nirbhay Singh

4 Answers

3
votes

I figured out the problem. Issue was in new version of puppet we have to run enable the puppet server. Only starting the puppet server & services will not work we have to enable the server as well. Following command is for starting the server :

puppet resource service puppetserver ensure=running

This command is to enable the server.

puppet resource service puppetserver enable=true

2
votes

In /etc/puppetlabs/puppet/puppet.conf

server = SERVER_FQDN

Try giving the ip address here.

0
votes

To start putty on master machine below mentioned command doesn't work in newer puppet versions

systemctl status puppetserver 

To start the puppet master you need to start the server and enable the server

Command is for starting the server:

puppet resource service puppetserver ensure=running

Command is to enable the server:

puppet resource service puppetserver enable=true

And on slave machine below command to start puppet

systemctl status puppetserver
-1
votes

You have configured in the agent (puppet.conf) the master hostname, "puppet":

  1. Add it to the /etc/hosts in the agent server. A row indicating the master IP and hostname is needed.
  2. Then, execute sudo puppet cert sign --all in your master.