Re: New user learning puppet and getting error> getaddrinfo: Name or service not known

10,121 views
Skip to first unread message

Jason Cochard

unread,
Jan 22, 2013, 4:21:36 PM1/22/13
to puppet...@googlegroups.com
Hi Juan,

I believe your puppet.conf file should contain the line:

[main]
server = puppet.mydomain.cr  

and not "PUPPET_SERVER".  At least, that is how my clients determine which server to connect to.  This error usually is a failure of the client to find the puppetmaster. Can you ping the puppet master from the client?  

-jason

On Tuesday, January 22, 2013 9:40:53 AM UTC-8, Juan Cubillo wrote:
Hello everyone,

I'm a new user regarding puppet but I'm skilled with linux. I have setup a puppetmaster server and also have a puppet client for testing on a different box.

/etc/sysconfig/puppet has been edited to reach puppetmaster with option PUPPET_SERVER=puppet.mydomain.cr  (I'm in Costa Rica)

On the puppetmaster I was able to see the client with puppetca --list. I was also able to sign the certificate with puppetca --sign schoolserver.flexi.mydomain.cr

That's as much as I have done. However, looking at the log files on the client I noticed some error. When I run on the client puppet agent --test I get the following lines>

err: Could not retrieve catalog from remote server: getaddrinfo: Name or service not known
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run

I googled the getaddrinfo: Name or service not known error, however, I cant seem to get a proper answer to my error.

I was hoping that this community might be able to help me on this. Any suggestions?

Thanks in advance,

 - Juan

Juan Cubillo

unread,
Jan 22, 2013, 4:24:24 PM1/22/13
to puppet...@googlegroups.com
I just made a slight change that also changed the error... According to google the getaddrinfo: Name or service not known means that the client can not find the server. I decided to specify the server uusing the command>

puppet agent --server=puppet.mydomain.cr --test 

And now this is returned:

err: Could not retrieve catalog from remote server: Error 414 on SERVER: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<HTML>
  <HEAD><TITLE>Request-URI Too Large</TITLE></HEAD>
  <BODY>
    <H1>Request-URI Too Large</H1>
    WEBrick::HTTPStatus::RequestURITooLarge
    <HR>
    <ADDRESS>
     WEBrick/1.3.1 (Ruby/1.9.3/2012-12-25) OpenSSL/1.0.0j at
    </ADDRESS>
  </BODY>
</HTML>

warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run


What may be causing this? The server is already specified on the /etc/sysconfig/puppet file on the client and is also the reason why the client was able to get it's certificate request!

Anyone knows what may be going on? And now... what is the 414 error?

  - Juan

Juan Cubillo

unread,
Jan 22, 2013, 4:27:34 PM1/22/13
to puppet...@googlegroups.com
I made my initial config on the file /etc/sysconfig/puppet because the guide I used said so. However, I was reading some more and it seems the correct file to edit should be /etc/puppet/puppet.conf

I'm going to edit the file and report what happens.

 - Juan

Juan Cubillo

unread,
Jan 22, 2013, 5:03:16 PM1/22/13
to puppet...@googlegroups.com
FIXED!

Returned default values to /etc/sysconfig/puppet and added server = fqt.mydomain.cr to the [main] block on /etc/puppet/puppet.conf

This fixed the  getaddrinfo: Name or service not known erro but now added the following:

err: Could not retrieve catalog from remote server: Error 414 on SERVER: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<HTML>
  <HEAD><TITLE>Request-URI Too Large</TITLE></HEAD>
  <BODY>
    <H1>Request-URI Too Large</H1>
    WEBrick::HTTPStatus::RequestURITooLarge
    <HR>
    <ADDRESS>
     WEBrick/1.3.1 (Ruby/1.9.3/2012-12-25) OpenSSL/1.0.0j at
    </ADDRESS>
  </BODY>
</HTML>

According to google this is a bug on the 2.6 version. This was fixed by editing the file /usr/share/ruby/webrick/httprequest.rb and changing the variable MAX_URI_LENGTH = 2083 for a value of 4096

Thanks for the help! :)

Jason Cochard

unread,
Jan 22, 2013, 5:34:23 PM1/22/13
to puppet...@googlegroups.com
Excellent.  Glad you were able to fix it.  

May I next suggest moving your puppet deployment to Passenger and Apache?  :)  

Juan Cubillo

unread,
Jan 22, 2013, 5:46:05 PM1/22/13
to puppet...@googlegroups.com
I'm still learning about puppet. I'll try to read some more about Passenger.

If you have any good links with info I'll aprreciate if you may guide me on my "quest" to learn about this system.

Jason Cochard

unread,
Jan 24, 2013, 5:29:45 PM1/24/13
to puppet...@googlegroups.com
Here is a good start: 

Also the book, Pro Puppet, covers this in detail.  
Reply all
Reply to author
Forward
0 new messages