I've configure puppet server and client, when I run puppet master --verbose --no-daemonize on puppet server, I get following message,

Notice: Starting Puppet master version 3.8.4
Error: Could not run: Could not create PID file: /var/run/puppet/master.pid

what could be the possible solution ?


The error err: Could not retrieve catalog from remote server indicates that the puppet agent was unable to contact the puppetmaster.

Ensure the puppet agent is configured with the puppetmaster's hostname or fully qualified domain name. View /etc/puppetlabs/puppet/puppet.conf and in section [main], confirm the value of server is correct.

Example configuration:

certname = puppetmaster01.example.com
server = puppet
environment = production
runinterval = 1h
strict_variables = true

In the above example the server name puppet must be the address of the puppetmaster.

See the puppetlabs configuration documentation https://docs.puppetlabs.com/puppet/latest/reference/config_file_main.html

Second, ensure the puppetmaster's hostname or fully qualified domain name resolves to an IP address. Fix your DNS if it does not resolve.

Use dig or another tool to ensure the name resolves correctly:

dig puppet

Lastly, check the firewall on the puppetmaster. Ensure all the required ports are allowed in the firewall configuration as specified in the documentation https://docs.puppetlabs.com/pe/latest/install_system_requirements.html

  • 8140 The Puppet master uses this port to accept inbound traffic/requests from Puppet agents. The PE console sends request to the Puppet master on this port. Certificate requests are passed over this port unless ca_port is set differently. Classifier group: “PE Master”
  • 443 This port provides host access to the PE console. The PE
    Console accepts HTTPS traffic from end-users on this port. Classifier group: “PE Console”
  • 61613 MCollective uses this port to accept inbound traffic/requests from Puppet agents. Any host used to invoke
    commands must be able to reach MCollective on this port. Classifier
    group: “PE ActiveMQ Broker”
  • 8142 Orchestration services uses this port to accept inbound traffic/requests from Puppet agents. Classifier group: “PE Orchestrator”
| improve this answer | |

try: puppet agent --test --server localhost

if that works then you don't have the server parameter set properly in your puppet agent config.

| improve this answer | |
  • when I run puppet agent --test --server localhost I get notice: Run of Puppet configuration client already in progress; skipping – Rahul Dec 24 '15 at 6:16
  • Means the puppet agent is probably already running as a service. See Mike's answer to look at the config. What I posted above is good for testing – peelman Dec 25 '15 at 14:47

Check your network setup, DNS setup and puppet config setup.

The error suggests that the agent cannot connect to the master because it cannot resolve the hostname of the master.

This can be due to wrong networking setup (for example a wrong IP), missing DNS server entries or faulty DNS servers or due to a misconfiguration in the puppet.conf file on the agent.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.