-
-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
undefined method `ref' for nil:NilClass on v1.1.0 #149
Comments
puppetlabs-apt version? |
@juniorsysadmin latest actually... i'll post some more as there is something very odd, if it comes from puppetmaster it fails, if local puppet agent it's fine. It's absolutely one of the most odd issues i've seen thus far. |
Can we see the stack trace anyway? :) |
@ffrank would love to provide one if i could actually get one. puppetmaster with trace set to on as well as log level to debug provides no stack trace; if it did I likely would have submitted a PR vs. this ticket. |
Alright, cleared this up... Rebooted puppetmaster box, basically clean installed and everything is happy once again. Sorry for the noise. |
Alright. So was this a 4xx error reported by the master to the agent? In such cases, I think I would try |
Same problem here. Running puppet, vagrant, librarian-puppet. Puppetfile:
install with librarian-puppet install manifest/site.pp:
Vagrantfile:
Vagrant up (after vagrant destroy) gives me the error: "Error: undefined method `ref' for nil:NilClass on node vagrant.edward.local". I would provide a stack trace if I knew how. Apt version is 2.1.0 (according to metadata.json). Sorry I did what I could from bothering you all, but I've been waiting for several version trying to fix this to no avail. |
I just tested with Puppet 4 on an Ubuntu 14.04 agent: with node 'ubuntutrusty.domain' {
class { 'apt':
update => {
frequency => 'always',
},
}
class { '::nodejs': }
} and got no issue. Will see if I can do a 3.8 agent test against a 3.8 master later. |
Ok I moved to 4.2 (installed the gem was using 3.7 from apt-get), but still same error. All my versions match up with yours (though not sure how to check puppetserver and agent versions). I found out how to get you a stacktrace:
|
The mention of Ruby 1.9.1 does not sound good for Puppet 3 or 4. See https://docs.puppetlabs.com/guides/platforms.html |
I installed ruby 2.1 inside the VM (via PPA) on ubuntu and I get a smilar error:
|
Same error of @jpmorris, both with ruby 1.9 and 2.0.0. And with puppet-nodejs v0.8.0 and 1.0 |
Reopening, thanks for the info. Will try and look into it "soon". |
I can reproduce this, and it somehow seems to be related to "contain" in my setup. |
Just hit this issue too (with puppet 3.5.1). The generated catalog is malformed: a relationship edge points to nil, the edge source is This apparently comes from the |
Do we have enough evidence to open a Puppet bug for this? |
Could this be due to the fact that As an aside I can't remember the reason for using both |
I just ran into this on trusty with puppet 3.4.3. So I downgraded to puppetlabs-nodejs 0.7.1. |
I got the same problem on 0.8 puppet 3.4.3 Part of stacktrace:
|
I had the same problem with a debian wheezy running inside a vagrant box. Relevant versions:
Tried @juniorsysadmin tip (removing the ' to the contains line) doesn't work either. |
I've been chasing this one all day and only found this issue. Looks like I'm hitting the same problem. We're running puppet 3.6.2, and nodejs version 0.8.0. I also tried the master-branch here and hit the same problem. This can be reproduced through a pretty simple method
And we hit the problem. Our stack-strace:
@masterzen's analysis is spookily close to my own. Whatever problem it's running into, it isn't giving a usual puppet dependency fail. |
After much hammering, this looks to be a manifestation of this: https://tickets.puppetlabs.com/browse/PUP-1597 Which is fixed in the 3.7.0 codebase. Upgrading my local puppet to a 3.7 version caused things to start working again. |
Thanks for the feedback! It's weird that the OP hit this failure with Puppet @sysadmin1139 are you in a position to test a It would appear that @igalic might know what's what. |
weird. even weirder, in $bigCo we're always running latest stable puppet, and are not hitting this. (our roles and profiles and private modules are filled with contain) we also have spec tests that should be catching that… |
@ffrank We're deployed on 3.8.2 at the moment, and it's working fine. When we discovered we had to update past where we were, we bit the bullet and went to 'latest 3.x'. And we're still running the 0.8.0 code. It could be that the newer 1.2.0 rev makes the bug more visible? |
I'm experiencing this as well, tried Puppet 3.8.2 and 3.8.3 and module versions 1.2.0 and 0.8.0. Trace is identical to the others (save for the node name). |
Here is a workaround if you need to retrieve the package from nodesource : class { '::nodejs':
repo_url_suffix => 'node_0.12',
manage_package_repo => false,
npm_package_ensure => 'present',
require => Exec['nodesource']
} |
@aisouard i've edited your comment because the recommendation you're making is not something i would want to stand for in public. |
@igalic Whoops, sorry. I will be more careful about that next time. A safer workaround would be telling people to provide their own nodejs package instead of manually retrieving the package from apt. |
anyway, i'm currently using this module to install node 4.x from apt with puppet 4.2.2. it works for me. what am i doing wrong? |
Failing to reproduce this with Will try it through |
I just managed to reproduced with puppet Everyone who saw this with newer master versions, could you make extra sure that the binary from the installed package is really really running? Think rebooting the master machine etc. |
I am able to reproduce this with puppet 3.6.2 with puppet provisioning my vagrant CentOS 7 box |
@JamesWiley, @ffrank |
Closing as a result of merging #178 . Will re-open if pain persists. |
I believe this is still an issue I encounter the error when I vagrant up the machine for the first time and puppet runs the provisioner. My code was working through
However commenting out the 4 lines gives me the error. I would like to provide more information but I am not really expert at puppet, so if you'd like to guide me I can be more of help. For instance, it may just be that I did not update puppet, or the module... If it is not done automagically by vagrant, then how to? Sorry but my teammate who was taking care of puppet is busy and I am not as skilled as he is! |
Of course I spent all this time googling and found out that no, probably puppet isn't automatically the last version! However npm is not the latest version, anybody knows why? |
@serviceman npm, when installed from nodesource's repository, comes with the version package { 'npm':
ensure => 'latest',
provider => 'npm',
} and if you're lucky, this won't conflict with anything in the module |
Yeah, you're gonna come up against #160 unless you're using Puppet > 4 |
Overview
Whenever I attempt to use the nodejs module in the following way:
The error "undefined method `ref' for nil:NilClass" comes up. This only happens when including this module, I have attempted just about everything given that I cannot get a decent stack trace that actually tells me boo of what is happening. Basically the puppetmaster refuses to supply it because of this.
Modules
/etc/puppet/environments/production/modules
├── puppet-nodejs (v1.1.0)
├── puppetlabs-apache (v1.0.1)
├── puppetlabs-apt (v2.1.0)
├── puppetlabs-concat (v1.2.3)
├── puppetlabs-firewall (v1.6.0)
├── puppetlabs-mysql (v2.2.3)
├── puppetlabs-ntp (v4.0.0)
├── puppetlabs-stdlib (v4.6.0)
├── saz-timezone (v3.0.1)
Environment
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.2 LTS"
Puppet version: 3.8.1
Puppetmaster version: 3.8.1
The text was updated successfully, but these errors were encountered: