Troubleshooting Puppet Communication

30 minutes
  • 3 Learning Objectives

About this Hands-on Lab

In an ideal world, we would be able to provision our hosts and have things work consistently without problems every day ― but that is not the case because a system that is completely immune to all issues does not exist. In this hands-on lab, we explore the reasons why a node with the Puppet agent is unable to connect to our Puppet master. We will start this lesson by ensuring that there are no connection issues overall and then explore using the certificate authority to confirm if any conflicting certificates are preventing the node from connecting. Once the problem is tracked down, we will take the appropriate steps to fix the communication issue and connect our node to the Puppet master.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Replicate the Issue
  1. Install Puppet on the node1 Ubuntu node using the one-command installer:

    $ curl -k https://puppet.ec2.internal:8140/packages/current/install.bash | sudo bash
  2. On the master, attempt to approve the cert:

    $ sudo puppetserver ca sign –all

Discover the Root of the Issue
  1. Since we know that the node can connect to the Puppet master thanks to the installation command’s success, we know the issue isn’t related to a firewall or with any inter-node communications. So, let’s see if our status message for the puppet service tells us anything (make sure to work from the node1 node):

    $ sudo systemctl status puppet | less
  2. Now, from the master, list the available cert information:

    $ sudo puppetserver ca list –all

    The output informs us of a revoked certificate’s node that is identical to the one we’ve been working with. We’ve tracked down the problem!

Solve the Issue
  1. Clean the original cert from the master:

    $ sudo puppetserver ca clean –certname node1.ec2.internal

  2. Remove existing certificate information from the node1 node:

    $ sudo -i
    ~# rm -r $(puppet agent –configprint ssldir)

  3. Generate new certs for the node:

    ~# puppet agent -t

  4. Sign the cert on the master:

    $ sudo puppetserver ca sign –certname node1.ec2.internal

  5. It is optional, but we can confirm it worked by performing a puppet run against the node:

    ~# puppet agent -t

Additional Resources

While provisioning a new node that gets pulled under-enforcement of the Puppet master, you found that the new node is not connecting. Use your troubleshooting skills to see why Puppet installs but is not connecting to the Puppet master.

Once you have identified the issue, investigate what steps can be taken to resolve the problem.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?