Answers: <p>First, try setting <a href="https://docs.puppet.com/puppet/latest/configuration.html#dnsaltnames" rel="nofollow noreferrer">dns_alt_names</a> in /etc/puppet/puppet.conf:</p>
  
  <pre><code>[main]
      dns_alt_names = www.puppetmaster.com
  [master]
      autosign = true
  </code></pre>
  
  <p>Then see if your puppet-agent -t run works properly. be sure that you have properly set your server on the puppet client in /etc/puppet/puppet.conf too:</p>
  
  <pre><code>[agent]
      server = www.puppetmaster.com
  </code></pre>
  
Answers: CC BY-SA 3.0
Answers: 2017-09-24T14:37:30.173Z
Answers: 2017-09-24T14:37:30.173Z
Answers: James Shewey
Body: <p><strong><em>Puppet Master:</em></strong></p>
  
  <ul>
  <li>Docker container with cent-OS-6 </li>
  <li>configured in /etc/hosts</li>
  <li>configured /etc/puppet/puppet.conf with <strong>server</strong>,<strong>dns_alt_names</strong> and
  <strong>certname</strong></li>
  </ul>
  
  <p><strong>Puppet Agent:</strong></p>
  
  <ul>
  <li>Docker container  with ubuntu OS</li>
  <li>configured serverip and agent ip in /etc/hosts</li>
  <li>configure /etc/puppet/puppet.conf with <strong>server</strong> value </li>
  </ul>
  
  <p><strong>NOW trying to Generate Certificate in SERVER Machine with</strong></p>
  
  <pre><code>sudo -u puppet puppet master --no-daemonize --verbose
  </code></pre>
  
  <p>Displays:<em><code>Notice: Starting Puppet master version 3.8.7</code></em></p>
  
  <p><em>Nothing happens  related to Certificate Generation.</em></p>
  
  <p>I believe there aint any mistake in hosts file and other configuration missing. here might have things gone wrong.</p>
  
  <p><strong>In the client machine</strong>
  If I run this command <strong>puppet agent -t</strong> . I get the following error. As the certificate is not generated in server. I think I have to fix that first than this .</p>
  
  <pre><code>Warning: Unable to fetch my node definition, but the agent run will continue:
  Warning: Server hostname 'www.puppetmaster.com' did not match server certificate; expected one of puppetcertificate, DNS:puppet www.puppetmaster.com, DNS:puppetcertificate
  Info: Retrieving pluginfacts
  Error: /File[/var/lib/puppet/facts.d]: Failed to generate additional resources using 'eval_generate': Server hostname 'www.puppetmaster.com' did not match server certificate; expected one of puppetcertificate, DNS:puppet www.puppetmaster.com, DNS:puppetcertificate
  Error: /File[/var/lib/puppet/facts.d]: Could not evaluate: Could not retrieve file metadata for puppet://www.puppetmaster.com/pluginfacts: Server hostname 'www.puppetmaster.com' did not match server certificate; expected one of puppetcertificate, DNS:puppet www.puppetmaster.com, DNS:puppetcertificate
  Info: Retrieving plugin
  Error: /File[/var/lib/puppet/lib]: Failed to generate additional resources using 'eval_generate': Server hostname 'www.puppetmaster.com' did not match server certificate; expected one of puppetcertificate, DNS:puppet www.puppetmaster.com, DNS:puppetcertificate
  Error: /File[/var/lib/puppet/lib]: Could not evaluate: Could not retrieve file metadata for puppet://www.puppetmaster.com/plugins: Server hostname 'www.puppetmaster.com' did not match server certificate; expected one of puppetcertificate, DNS:puppet www.puppetmaster.com, DNS:puppetcertificate
  Error: Could not retrieve catalog from remote server: Server hostname 'www.puppetmaster.com' did not match server certificate; expected one of puppetcertificate, DNS:puppet www.puppetmaster.com, DNS:puppetcertificate
  Warning: Not using cache on failed catalog
  Error: Could not retrieve catalog; skipping run
  Error: Could not send report: Server hostname 'www.puppetmaster.com' did not match server certificate; expected one of puppetcertificate, DNS:puppet www.puppetmaster.com, DNS:puppetcertificate
  </code></pre>
  
Comments: CC BY-SA 3.0
Comments: 2017-10-30T10:42:37.110Z
Comments: don't install 3.8.7, don't use centos 6 ...
Comments: Vorsprung
Tags: <puppet>
Title: Puppet master certificate generation not working
UserDisplayName: Tara Prasad Gurung
ThreadText: # Puppet master certificate generation not working
  
  (Asked by: username_0 on 2017-09-24)
  
  ***Puppet Master:***
  
  * Docker container with cent-OS-6
  * configured in /etc/hosts
  * configured /etc/puppet/puppet.conf with **server**,**dns\_alt\_names** and
    **certname**
  
  **Puppet Agent:**
  
  * Docker container with ubuntu OS
  * configured serverip and agent ip in /etc/hosts
  * configure /etc/puppet/puppet.conf with **server** value
  
  **NOW trying to Generate Certificate in SERVER Machine with**
  
  ```
  sudo -u puppet puppet master --no-daemonize --verbose
  
  ```
  
  Displays:*`Notice: Starting Puppet master version 3.8.7`*
  
  *Nothing happens related to Certificate Generation.*
  
  I believe there aint any mistake in hosts file and other configuration missing. here might have things gone wrong.
  
  **In the client machine**
  If I run this command **puppet agent -t** . I get the following error. As the certificate is not generated in server. I think I have to fix that first than this .
  
  ```
  Warning: Unable to fetch my node definition, but the agent run will continue:
  Warning: Server hostname 'www.puppetmaster.com' did not match server certificate; expected one of puppetcertificate, DNS:puppet www.puppetmaster.com, DNS:puppetcertificate
  Info: Retrieving pluginfacts
  Error: /File[/var/lib/puppet/facts.d]: Failed to generate additional resources using 'eval_generate': Server hostname 'www.puppetmaster.com' did not match server certificate; expected one of puppetcertificate, DNS:puppet www.puppetmaster.com, DNS:puppetcertificate
  Error: /File[/var/lib/puppet/facts.d]: Could not evaluate: Could not retrieve file metadata for puppet://www.puppetmaster.com/pluginfacts: Server hostname 'www.puppetmaster.com' did not match server certificate; expected one of puppetcertificate, DNS:puppet www.puppetmaster.com, DNS:puppetcertificate
  Info: Retrieving plugin
  Error: /File[/var/lib/puppet/lib]: Failed to generate additional resources using 'eval_generate': Server hostname 'www.puppetmaster.com' did not match server certificate; expected one of puppetcertificate, DNS:puppet www.puppetmaster.com, DNS:puppetcertificate
  Error: /File[/var/lib/puppet/lib]: Could not evaluate: Could not retrieve file metadata for puppet://www.puppetmaster.com/plugins: Server hostname 'www.puppetmaster.com' did not match server certificate; expected one of puppetcertificate, DNS:puppet www.puppetmaster.com, DNS:puppetcertificate
  Error: Could not retrieve catalog from remote server: Server hostname 'www.puppetmaster.com' did not match server certificate; expected one of puppetcertificate, DNS:puppet www.puppetmaster.com, DNS:puppetcertificate
  Warning: Not using cache on failed catalog
  Error: Could not retrieve catalog; skipping run
  Error: Could not send report: Server hostname 'www.puppetmaster.com' did not match server certificate; expected one of puppetcertificate, DNS:puppet www.puppetmaster.com, DNS:puppetcertificate
  
  ```
  
  **Tags:** puppet
  
  > **Comments:**
  > **username_1**: don't install 3.8.7, don't use centos 6 ...  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2017-09-24. Score: 2
  
  First, try setting [dns\_alt\_names](https://docs.puppet.com/puppet/latest/configuration.html#dnsaltnames) in /etc/puppet/puppet.conf:
  
  ```
  [main]
      dns_alt_names = www.puppetmaster.com
  [master]
      autosign = true
  
  ```
  
  Then see if your puppet-agent -t run works properly. be sure that you have properly set your server on the puppet client in /etc/puppet/puppet.conf too:
  
  ```
  [agent]
      server = www.puppetmaster.com
  
  ```
  
  
  ---
  
  