Search code examples
sslpuppetrhel6

PuppetServer upgarde failing with missing private key


I had a working puppetserver but somehow it got screwed during os patching and it is not coming up . I tried a fresh installation of ``puppetserver. It is6.3.0` . After doing the installation i restored the ssl dir from old installation which contain the certs , but it is failing with below error

  /etc/puppetlabs/puppet/ssl/certs/example.com.pem' but master private key '/etc/puppetlabs/puppet/ssl/private_keys/example.com.pem' is missing

However both the files exist. Any suggestion to resolve this or i have to generate new keys ?


Solution

  • If the program claims a file is missing that you know to be present, then the true issue is almost certainly one of access control, either to the specific file in question or to a directory in the path to it. There are several patterns of details that could cause such a problem, and it is plausible that it could arise in a scenario such as you describe.

    Do this:

    • Ascertain the user as whom PuppetServer is running. Typical would be one named "puppet", but do not assume.

    • Make sure that the ownership and mode of /etc/puppetlabs/puppet/ssl/certs/example.com.pem permit the PuppetServer user to read it.

    • Make sure that the ownership and mode of each directory in the path /etc/puppetlabs/puppet/ssl/certs permit the PuppetServer user to both read and traverse (execute) that directory.

    • If SELinux is enabled on the server then make sure it's not causing the problem by

      1. Running restorecon. If the problem persists at that point then you could also try
      2. Putting SELinux into permissive mode: setenforce 0. If this is what it takes to resolve the problem then you'll need to either leave SELinux enforcing mode disabled, or (better) write and install an SELinux policy module that enables PuppetServer's access.