Puppet problem. Could not retrieve hostname: getaddrinfo: Name or service not known

Puppet agent error message:

Could not retrieve hostname: getaddrinfo: Name or service not known
Could not retrieve hostname: getaddrinfo: Name or service not known
dnsdomainname: Name or service not known
/usr/lib/ruby/1.8/puppet/defaults.rb:190: undefined method `downcase' for nil:NilClass (NoMethodError)
from /usr/lib/ruby/1.8/puppet.rb:100:in `require'
from /usr/lib/ruby/1.8/puppet.rb:100
from /usr/lib/ruby/1.8/puppet/application.rb:278:in `require'
from /usr/lib/ruby/1.8/puppet/application.rb:278:in `initialize'
from /usr/lib/ruby/1.8/puppet/util/command_line.rb:55:in `new'
from /usr/lib/ruby/1.8/puppet/util/command_line.rb:55:in `execute'
from /usr/bin/puppet:4

You fix the above error message by editing /etc/hosts file and make sure your server domain name resolves to your public interface IP (or 127.0.0.1). Then run once again “puppet agent –test


Leave a Reply