0

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 ?

Rahul
  • 67
  • 1
  • 12

3 Answers3

1

try: puppet agent --test --server localhost

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

peelman
  • 801
  • 1
  • 5
  • 11
  • 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 06: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
0

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.

Frederik
  • 3,359
  • 3
  • 32
  • 46
0

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:

[main]
certname = puppetmaster01.example.com
server = puppet
environment = production
runinterval = 1h
strict_variables = true
trusted

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

See the puppet configuration documentation.

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.

  • 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”
рüффп
  • 620
  • 1
  • 11
  • 25
Mike Marseglia
  • 913
  • 8
  • 18