title: Puppet agent can't find server
body: <p>I'm new to puppet, but picking it up quickly.  Today, I'm running into an issue when trying to run the following:</p>
  
  <pre><code>$ puppet agent --no-daemonize --verbose --onetime
  
  **err: Could not request certificate: getaddrinfo: Name or service not known
  Exiting; failed to retrieve certificate and waitforcert is disabled**
  </code></pre>
  
  <p>It would appear the agent doesn't know what server to connect to.  I could just specify <code>--server</code> on the command line, but that will be of no use to me when this runs as a daemon in production, so instead, I specify the server name in /etc/puppet/puppet.conf like so:</p>
  
  <pre><code>[main]
      server = puppet.&lt;my domain&gt;
  </code></pre>
  
  <p>I <em>do</em> have a DNS entry for <code>puppet.&lt;my domain&gt;</code> and if I <code>dig puppet.&lt;my domain&gt;</code>, I see that the name resolves correctly.</p>
  
  <p>All puppet documentation I have read states that the agent tries to connect to a puppet master at <code>puppet</code> by default and your options are host file trickery or do the right thing, create a CNAME in DNS, and edit the puppet.conf accordingly, which I have done.</p>
  
  <p>So what am I missing?  Any help is greatly appreciated!</p>