- Lab
- A Cloud Guru
Troubleshooting Puppet Communication
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.
Path Info
Table of Contents
-
Challenge
Replicate the Issue
-
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
-
On the master, attempt to approve the cert:
$ sudo puppetserver ca sign --all
-
-
Challenge
Discover the Root of the Issue
-
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 thepuppet
service tells us anything (make sure to work from thenode1
node):$ sudo systemctl status puppet | less
-
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!
-
-
Challenge
Solve the Issue
-
Clean the original cert from the master:
$ sudo puppetserver ca clean --certname node1.ec2.internal
-
Remove existing certificate information from the
node1
node:$ sudo -i ~# rm -r $(puppet agent --configprint ssldir)
-
Generate new certs for the node:
~# puppet agent -t
-
Sign the cert on the master:
$ sudo puppetserver ca sign --certname node1.ec2.internal
-
It is optional, but we can confirm it worked by performing a puppet run against the node:
~# puppet agent -t
-
What's a lab?
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.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.