Undefined method 'closed?' for nil:NilClass

5,124 views
Skip to first unread message

Kikanny

unread,
Sep 21, 2010, 2:45:32 PM9/21/10
to Puppet Users
Hi all

I started researching on puppet and decided I'll try it out on Vmware
Workstation using Ubuntu 10.04. So I'm trying to do the simplest
puppet install pattern as outlined in
http://projects.puppetlabs.com/projects/puppet/wiki/Simplest_Puppet_Install_Pattern.
For now, I'm trying to test puppetd and puppetmasterd on the same
machine. I start puppetmaster and everything works fine. Then I start
puppetd and I end up with following error:

err: /File[/var/lib/puppet/lib]: Failed to generate additional
resources using 'eval_generate': undefined method 'closed?' for
nil:NilClass
err: /File[/var/lib/puppet/lib]: Failed to retrieve current state of
resource: undefined method 'closed?' for nil:NilClass Could not
retrieve file metadata for puppet://puppet/plugins: undefined method
'closed?' for nil:NilClass
err: Could not retrieve catalog from remote server: undefined method
'closed?' for nil:NilClass
err: Could not retrieve catalog; skipping run

I've been trying to figure this out over last couple of days but I'm
completely stumped. Any help would be appreciated. Thanks!

James Turnbull

unread,
Sep 21, 2010, 7:04:39 PM9/21/10
to puppet...@googlegroups.com

This a well known Ruby error which masks the actual error. It's fixed
in 0.25.5. See:

http://projects.puppetlabs.com/issues/3101

Regards

James Turnbull

--
Puppet Labs - http://www.puppetlabs.com
C: 503-734-8571

Patrick

unread,
Sep 21, 2010, 9:11:53 PM9/21/10
to puppet...@googlegroups.com


James Turnbull mostly answered this one, but didn't mention the "plugin sync". It can be error can be safely ignored, but is distracting when debugging. Add "pluginsync = false" to the client to bypass it. If you want to fix it, add a directory called "lib" to one of your modules. The directory can be empty.

Kikanny

unread,
Sep 24, 2010, 8:34:54 AM9/24/10
to Puppet Users
Thanks guys! I upgraded puppet from 0.25.4 to 2.6.1. Now when I try to
run puppetd on the same machine as puppemasterd, I get the following
error message:

err: Could not retrieve catalog from remote server: getaddrinfo: Name
or service not known
err: Could not retrieve catalog; skipping run

I'm not really sure what that means. Is it problem with my hostname or
dns or something? Any help would be appreciated!

Patrick

unread,
Sep 24, 2010, 12:38:25 PM9/24/10
to puppet...@googlegroups.com

Just to clarify, 0.25.4 wasn't working either right?

What happens if you run "ping puppet" on that computer?

Kikanny

unread,
Sep 24, 2010, 12:45:33 PM9/24/10
to Puppet Users
Yup. I get the following when I say ping puppet
ping: unknown host puppet

So I haven't defined puppet as a hostname somewhere or something?

Patrick

unread,
Sep 24, 2010, 12:55:50 PM9/24/10
to puppet...@googlegroups.com
Try putting puppet as an alias to your server in /etc/hosts (DNS is a better long term solution, but /etc/hosts is usually easier). The test it again. If that doesn't work, test it with ping to make sure "ping puppet" works.

> --
> You received this message because you are subscribed to the Google Groups "Puppet Users" group.
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
>

Kikanny

unread,
Sep 24, 2010, 1:04:36 PM9/24/10
to Puppet Users
Holy crap! That fixed it! Thank you so much for your help!

Patrick

unread,
Sep 24, 2010, 1:36:36 PM9/24/10
to puppet...@googlegroups.com
By default, puppet looks for the hostname "puppet" for the server. You can change that in puppet.conf, but it's usually better to just use DNS to always point the the right box.

Stuart Cracraft

unread,
Aug 6, 2013, 5:24:54 PM8/6/13
to puppet...@googlegroups.com, kik...@gmail.com
Yep -- thumbs up on this answer.
 
Simple and sweet.
 
Reply all
Reply to author
Forward
0 new messages