Comments (39)
puppetlabs-apt version?
from puppet-nodejs.
@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.
from puppet-nodejs.
Can we see the stack trace anyway? :)
from puppet-nodejs.
@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.
from puppet-nodejs.
Alright, cleared this up...
Rebooted puppetmaster box, basically clean installed and everything is happy once again. Sorry for the noise.
from puppet-nodejs.
Alright.
So was this a 4xx error reported by the master to the agent? In such cases, I think I would try puppet master --trace --compile
.
from puppet-nodejs.
Same problem here. Running puppet, vagrant, librarian-puppet.
Puppetfile:
#!/usr/bin/env ruby
forge "https://forgeapi.puppetlabs.com"
mod 'puppetlabs/apt'
mod 'puppet-community/puppet-nodejs',
:git => '[email protected]:puppet-community/puppet-nodejs.git',
:ref => '1.1.0'
install with librarian-puppet install
manifest/site.pp:
include nodejs
Vagrantfile:
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provision "puppet" do |puppet|
puppet.manifests_path = "manifests"
puppet.manifest_file = "site.pp"
puppet.module_path = ['modules']
puppet.options = "--verbose --debug --hiera_config /vagrant/hiera.yaml"
end
config.vm.hostname = "vagrant.edward.local"
config.vm.network "forwarded_port", guest: 8080, host: 8042
config.vm.synced_folder "webroot/", "/vagrant/webroot/", :owner => "www-data"
end
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.
from puppet-nodejs.
I just tested with Puppet 4 on an Ubuntu 14.04 agent:
puppetserver-2.1.1, puppet-agent-1.2.1
puppet-nodejs (v1.1.0)
puppetlabs-apt (v2.1.0)
puppetlabs-stdlib (v4.6.0)
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.
from puppet-nodejs.
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:
==> default: Debug: Automatically imported apt::key from apt/key into production
==> default: Debug: Adding relationship from Anchor[apt_first] to Class[Apt::Update] with 'before'
==> default: Debug: Adding relationship from Class[Apt::Update] to Anchor[apt_last] with 'before'
==> default: Debug: Adding relationship from Anchor[::nodejs::begin] to Class[Nodejs::Repo::Nodesource] with 'before'
==> default: Debug: Adding relationship from Class[Nodejs::Repo::Nodesource] to Class[Nodejs::Install] with 'before'
==> default: Debug: Adding relationship from Class[Nodejs::Install] to Anchor[::nodejs::end] with 'before'
==> default: Debug: Adding relationship from Apt_key[Add key: 9FD3B784BC1C6FC31A8A0A1C1655A0AB68576280 from Apt::Source nodesource] to Anchor[apt_key 9FD3B784BC1C6FC31A8A0A1C1655A0AB68576280 present] with 'before'
==> default: Error: undefined method `ref' for nil:NilClass on node vagrant.edward.local
==> default: /usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:527:in `block in to_catalog'
==> default: /usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:515:in `each'
==> default: /usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:515:in `to_catalog'
==> default: /usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:402:in `to_resource'
==> default: /usr/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:23:in `compile'
==> default: /usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:116:in `block (2 levels) in compile'
==> default: /usr/lib/ruby/vendor_ruby/puppet/util/profiler/none.rb:6:in `profile'
==> default: /usr/lib/ruby/vendor_ruby/puppet/util/profiler.rb:31:in `profile'
==> default: /usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:114:in `block in compile'
==> default: /usr/lib/ruby/vendor_ruby/puppet/util.rb:161:in `block in benchmark'
==> default: /usr/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
==> default: /usr/lib/ruby/vendor_ruby/puppet/util.rb:160:in `benchmark'
==> default: /usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:113:in `compile'
==> default: /usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:46:in `find'
==> default: /usr/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:201:in `find'
==> default: /usr/lib/ruby/vendor_ruby/puppet/application/apply.rb:204:in `main'
==> default: /usr/lib/ruby/vendor_ruby/puppet/application/apply.rb:146:in `run_command'
==> default: /usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `block (2 levels) in run'
==> default: /usr/lib/ruby/vendor_ruby/puppet/application.rb:470:in `plugin_hook'
==> default: /usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `block in run'
==> default: /usr/lib/ruby/vendor_ruby/puppet/util.rb:478:in `exit_on_fail'
==> default: /usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `run'
==> default: /usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:137:in `run'
==> default: /usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:91:in `execute'
==> default: /usr/bin/puppet:4:in `<main>'
==> default: Error: undefined method `ref' for nil:NilClass on node vagrant.edward.local
==> default: /usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:527:in `block in to_catalog'
==> default: /usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:515:in `each'
==> default: /usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:515:in `to_catalog'
==> default: /usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:402:in `to_resource'
==> default: /usr/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:23:in `compile'
==> default: /usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:116:in `block (2 levels) in compile'
==> default: /usr/lib/ruby/vendor_ruby/puppet/util/profiler/none.rb:6:in `profile'
==> default: /usr/lib/ruby/vendor_ruby/puppet/util/profiler.rb:31:in `profile'
==> default: /usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:114:in `block in compile'
==> default: /usr/lib/ruby/vendor_ruby/puppet/util.rb:161:in `block in benchmark'
==> default: /usr/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
==> default: /usr/lib/ruby/vendor_ruby/puppet/util.rb:160:in `benchmark'
==> default: /usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:113:in `compile'
==> default: /usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:46:in `find'
==> default: /usr/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:201:in `find'
==> default: /usr/lib/ruby/vendor_ruby/puppet/application/apply.rb:204:in `main'
==> default: /usr/lib/ruby/vendor_ruby/puppet/application/apply.rb:146:in `run_command'
==> default: /usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `block (2 levels) in run'
==> default: /usr/lib/ruby/vendor_ruby/puppet/application.rb:470:in `plugin_hook'
==> default: /usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `block in run'
==> default: /usr/lib/ruby/vendor_ruby/puppet/util.rb:478:in `exit_on_fail'
==> default: /usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `run'
==> default: /usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:137:in `run'
==> default: /usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:91:in `execute'
==> default: /usr/bin/puppet:4:in `<main>'
from puppet-nodejs.
The mention of Ruby 1.9.1 does not sound good for Puppet 3 or 4. See https://docs.puppetlabs.com/guides/platforms.html
from puppet-nodejs.
I installed ruby 2.1 inside the VM (via PPA) on ubuntu and I get a smilar error:
==> default: Debug: Adding relationship from Apt_key[Add key: 9FD3B784BC1C6FC31A8A0A1C1655A0AB68576280 from Apt::Source nodesource] to Anchor[apt_key 9FD3B784BC1C6FC31A8A0A1C1655A0AB68576280 present] with 'before'
==> default: Error: undefined method `ref' for nil:NilClass on node vagrant.edward.local
==> default: /usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:527:in `block in to_catalog'
==> default: /usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:515:in `each'
==> default: /usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:515:in `to_catalog'
==> default: /usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:402:in `to_resource'
==> default: /usr/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:23:in `compile'
==> default: /usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:116:in `block (2 levels) in compile'
==> default: /usr/lib/ruby/vendor_ruby/puppet/util/profiler/none.rb:6:in `profile'
==> default: /usr/lib/ruby/vendor_ruby/puppet/util/profiler.rb:31:in `profile'
==> default: /usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:114:in `block in compile'
==> default: /usr/lib/ruby/vendor_ruby/puppet/util.rb:161:in `block in benchmark'
==> default: /usr/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
==> default: /usr/lib/ruby/vendor_ruby/puppet/util.rb:160:in `benchmark'
==> default: /usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:113:in `compile'
==> default: /usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:46:in `find'
==> default: /usr/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:201:in `find'
==> default: /usr/lib/ruby/vendor_ruby/puppet/application/apply.rb:204:in `main'
==> default: /usr/lib/ruby/vendor_ruby/puppet/application/apply.rb:146:in `run_command'
==> default: /usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `block (2 levels) in run'
==> default: /usr/lib/ruby/vendor_ruby/puppet/application.rb:470:in `plugin_hook'
==> default: /usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `block in run'
==> default: /usr/lib/ruby/vendor_ruby/puppet/util.rb:478:in `exit_on_fail'
==> default: /usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `run'
==> default: /usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:137:in `run'
==> default: /usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:91:in `execute'
==> default: /usr/bin/puppet:4:in `<main>'
==> default: Error: undefined method `ref' for nil:NilClass on node vagrant.edward.local
==> default: /usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:527:in `block in to_catalog'
==> default: /usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:515:in `each'
==> default: /usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:515:in `to_catalog'
==> default: /usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:402:in `to_resource'
==> default: /usr/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:23:in `compile'
==> default: /usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:116:in `block (2 levels) in compile'
==> default: /usr/lib/ruby/vendor_ruby/puppet/util/profiler/none.rb:6:in `profile'
==> default: /usr/lib/ruby/vendor_ruby/puppet/util/profiler.rb:31:in `profile'
==> default: /usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:114:in `block in compile'
==> default: /usr/lib/ruby/vendor_ruby/puppet/util.rb:161:in `block in benchmark'
==> default: /usr/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
==> default: /usr/lib/ruby/vendor_ruby/puppet/util.rb:160:in `benchmark'
==> default: /usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:113:in `compile'
==> default: /usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:46:in `find'
==> default: /usr/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:201:in `find'
==> default: /usr/lib/ruby/vendor_ruby/puppet/application/apply.rb:204:in `main'
==> default: /usr/lib/ruby/vendor_ruby/puppet/application/apply.rb:146:in `run_command'
==> default: /usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `block (2 levels) in run'
==> default: /usr/lib/ruby/vendor_ruby/puppet/application.rb:470:in `plugin_hook'
==> default: /usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `block in run'
==> default: /usr/lib/ruby/vendor_ruby/puppet/util.rb:478:in `exit_on_fail'
==> default: /usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `run'
==> default: /usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:137:in `run'
==> default: /usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:91:in `execute'
==> default: /usr/bin/puppet:4:in `<main>
from puppet-nodejs.
Same error of @jpmorris, both with ruby 1.9 and 2.0.0. And with puppet-nodejs v0.8.0 and 1.0
Other info: puppet 3.4.3, ubuntu 14.04 64 bit. I don't install the module, I include it inside another project.
from puppet-nodejs.
Reopening, thanks for the info. Will try and look into it "soon".
from puppet-nodejs.
I can reproduce this, and it somehow seems to be related to "contain" in my setup.
from puppet-nodejs.
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 nodejs::repo::nodesource
.
This apparently comes from the contain
method that is called in nodejs::repo::nodesource
(in my case to the nodejs::repo::nodesource::apt
class). Commenting the contain
call works (but then there's no containment).
from puppet-nodejs.
Do we have enough evidence to open a Puppet bug for this?
from puppet-nodejs.
Do we have enough evidence to open a Puppet bug for this?
Could this be due to the fact that contain '::nodejs::repo::nodesource::apt'
is enclosed with single quotes rather than contain ::nodejs::repo::nodesource::apt
? I seem to remember some Puppet quirks with quoting and the use of include, and since contain has include-like behviour, maybe it was affected as well.
As an aside I can't remember the reason for using both class
and a contain
in nodesource.pp.
from puppet-nodejs.
I just ran into this on trusty with puppet 3.4.3. So I downgraded to puppetlabs-nodejs 0.7.1.
from puppet-nodejs.
I got the same problem on 0.8
puppet 3.4.3
puppetlabs-apt at v1.8.0
ruby ruby 2.0.0p645 (2015-04-13 revision 50299) [x86_64-linux-gnu]
Part of stacktrace:
Debug: importing '/etc/puppet/modules/nodejs/manifests/install.pp' in environment production
Debug: Automatically imported nodejs::install from nodejs/install into production
Debug: importing '/etc/puppet/modules/nodejs/manifests/repo/nodesource.pp' in environment production
Debug: Automatically imported nodejs::repo::nodesource from nodejs/repo/nodesource into production
Debug: importing '/etc/puppet/modules/nodejs/manifests/repo/nodesource/apt.pp' in environment production
Debug: Automatically imported nodejs::repo::nodesource::apt from nodejs/repo/nodesource/apt into production
Debug: importing '/etc/puppet/modules/apt/manifests/source.pp' in environment production
Debug: Automatically imported apt::source from apt/source into production
Debug: Scope(Apt::Source[nodesource]): Retrieving template apt/_header.erb
Debug: template[/etc/puppet/modules/apt/templates/_header.erb]: Bound template variables for /etc/puppet/modules/apt/templates/_header.erb in 0.00 seconds
Debug: template[/etc/puppet/modules/apt/templates/_header.erb]: Interpolated template /etc/puppet/modules/apt/templates/_header.erb in 0.00 seconds
Debug: Scope(Apt::Source[nodesource]): Retrieving template apt/source.list.erb
Debug: template[/etc/puppet/modules/apt/templates/source.list.erb]: Bound template variables for /etc/puppet/modules/apt/templates/source.list.erb in 0.00 seconds
Debug: template[/etc/puppet/modules/apt/templates/source.list.erb]: Interpolated template /etc/puppet/modules/apt/templates/source.list.erb in 0.00 seconds
Debug: importing '/etc/puppet/modules/apt/manifests/key.pp' in environment production
Debug: Automatically imported apt::key from apt/key into production
Debug: Adding relationship from Anchor[::nodejs::begin] to Class[Nodejs::Repo::Nodesource] with 'before'
Debug: Adding relationship from Class[Nodejs::Repo::Nodesource] to Class[Nodejs::Install] with 'before'
Debug: Adding relationship from Class[Nodejs::Install] to Anchor[::nodejs::end] with 'before'
Debug: Adding relationship from Apt_key[Add key: 9FD3B784BC1C6FC31A8A0A1C1655A0AB68576280 from Apt::Source nodesource] to Anchor[apt_key 9FD3B784BC1C6FC31A8A0A1C1655A0AB68576280 present] with 'before'
Error: undefined method `ref' for nil:NilClass on node puppet-debug.int
/usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:527:in `block in to_catalog'
/usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:515:in `each'
/usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:515:in `to_catalog'
/usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:402:in `to_resource'
/usr/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:23:in `compile'
/usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:116:in `block (2 levels) in compile'
/usr/lib/ruby/vendor_ruby/puppet/util/profiler/none.rb:6:in `profile'
/usr/lib/ruby/vendor_ruby/puppet/util/profiler.rb:31:in `profile'
/usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:114:in `block in compile'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:161:in `block in benchmark'
/usr/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:160:in `benchmark'
/usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:113:in `compile'
/usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:46:in `find'
/usr/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:201:in `find'
/usr/lib/ruby/vendor_ruby/puppet/application/apply.rb:204:in `main'
/usr/lib/ruby/vendor_ruby/puppet/application/apply.rb:146:in `run_command'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `block (2 levels) in run'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:470:in `plugin_hook'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `block in run'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:478:in `exit_on_fail'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `run'
/usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:137:in `run'
/usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:91:in `execute'
/usr/bin/puppet:4:in `<main>'
Error: undefined method `ref' for nil:NilClass on node puppet-debug.int
/usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:527:in `block in to_catalog'
/usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:515:in `each'
/usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:515:in `to_catalog'
/usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:402:in `to_resource'
/usr/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:23:in `compile'
/usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:116:in `block (2 levels) in compile'
/usr/lib/ruby/vendor_ruby/puppet/util/profiler/none.rb:6:in `profile'
/usr/lib/ruby/vendor_ruby/puppet/util/profiler.rb:31:in `profile'
/usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:114:in `block in compile'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:161:in `block in benchmark'
/usr/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:160:in `benchmark'
/usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:113:in `compile'
/usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:46:in `find'
/usr/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:201:in `find'
/usr/lib/ruby/vendor_ruby/puppet/application/apply.rb:204:in `main'
/usr/lib/ruby/vendor_ruby/puppet/application/apply.rb:146:in `run_command'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `block (2 levels) in run'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:470:in `plugin_hook'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `block in run'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:478:in `exit_on_fail'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `run'
/usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:137:in `run'
/usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:91:in `execute'
/usr/bin/puppet:4:in `<main>'
from puppet-nodejs.
I had the same problem with a debian wheezy running inside a vagrant box. Relevant versions:
puppet 3.4.3
ruby 1.9.3p194
puppetlabs-apt (2.1.1)
puppet-nodejs (1.2.0)
Tried @juniorsysadmin tip (removing the ' to the contains line) doesn't work either.
from puppet-nodejs.
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
FACTER_factname=things puppet apply --environment=test --modulepath [..] --hiera-config [..] --noop -e 'include nodejs'
And we hit the problem. Our stack-strace:
Error: undefined method `ref' for nil:NilClass on node hal.my.example.com
/usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:525:in `to_catalog'
/usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:513:in `each'
/usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:513:in `to_catalog'
/usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:400:in `to_resource'
/usr/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:23:in `compile'
/usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:95:in `compile'
/usr/lib/ruby/vendor_ruby/puppet/util/profiler/none.rb:6:in `profile'
/usr/lib/ruby/vendor_ruby/puppet/util/profiler.rb:43:in `profile'
/usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:93:in `compile'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:161:in `benchmark'
/usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:160:in `benchmark'
/usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:92:in `compile'
/usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:52:in `find'
/usr/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:201:in `find'
/usr/lib/ruby/vendor_ruby/puppet/application/apply.rb:214:in `main'
/usr/lib/ruby/vendor_ruby/puppet/context.rb:51:in `override'
/usr/lib/ruby/vendor_ruby/puppet.rb:233:in `override'
/usr/lib/ruby/vendor_ruby/puppet/application/apply.rb:190:in `main'
/usr/lib/ruby/vendor_ruby/puppet/application/apply.rb:151:in `run_command'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:372:in `run'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:479:in `plugin_hook'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:372:in `run'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:479:in `exit_on_fail'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:372:in `run'
/usr/lib/ruby/vendor_ruby/puppet/context.rb:51:in `override'
/usr/lib/ruby/vendor_ruby/puppet.rb:233:in `override'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:362:in `run'
/usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:137:in `run'
/usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:91:in `execute'
/usr/bin/puppet:4
Error: undefined method `ref' for nil:NilClass on node hal.my.example.com
/usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:525:in `to_catalog'
/usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:513:in `each'
/usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:513:in `to_catalog'
/usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:400:in `to_resource'
/usr/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:23:in `compile'
/usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:95:in `compile'
/usr/lib/ruby/vendor_ruby/puppet/util/profiler/none.rb:6:in `profile'
/usr/lib/ruby/vendor_ruby/puppet/util/profiler.rb:43:in `profile'
/usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:93:in `compile'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:161:in `benchmark'
/usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:160:in `benchmark'
/usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:92:in `compile'
/usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:52:in `find'
/usr/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:201:in `find'
/usr/lib/ruby/vendor_ruby/puppet/application/apply.rb:214:in `main'
/usr/lib/ruby/vendor_ruby/puppet/context.rb:51:in `override'
/usr/lib/ruby/vendor_ruby/puppet.rb:233:in `override'
/usr/lib/ruby/vendor_ruby/puppet/application/apply.rb:190:in `main'
/usr/lib/ruby/vendor_ruby/puppet/application/apply.rb:151:in `run_command'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:372:in `run'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:479:in `plugin_hook'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:372:in `run'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:479:in `exit_on_fail'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:372:in `run'
/usr/lib/ruby/vendor_ruby/puppet/context.rb:51:in `override'
/usr/lib/ruby/vendor_ruby/puppet.rb:233:in `override'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:362:in `run'
/usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:137:in `run'
/usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:91:in `execute'
/usr/bin/puppet:4
@masterzen's analysis is spookily close to my own. Whatever problem it's running into, it isn't giving a usual puppet dependency fail.
from puppet-nodejs.
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.
from puppet-nodejs.
Thanks for the feedback!
It's weird that the OP hit this failure with Puppet 3.8.1
. A regression perhaps?
@sysadmin1139 are you in a position to test a 3.8.1
master?
It would appear that @igalic might know what's what.
from puppet-nodejs.
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β¦
from puppet-nodejs.
@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?
from puppet-nodejs.
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).
from puppet-nodejs.
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']
}
from puppet-nodejs.
@aisouard i've edited your comment because the recommendation you're making is not something i would want to stand for in public.
from puppet-nodejs.
@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.
from puppet-nodejs.
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?
from puppet-nodejs.
Failing to reproduce this with puppet apply
version 3.8.1 and 4.2.3.
Will try it through puppet master
later - the more exciting Puppet bugs are invisible to apply
, sadly.
from puppet-nodejs.
I just managed to reproduced with puppet 3.4.3
and 3.5.1
.
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.
from puppet-nodejs.
I am able to reproduce this with puppet 3.6.2 with puppet provisioning my vagrant CentOS 7 box
from puppet-nodejs.
@JamesWiley, @ffrank contain
was only really fixed in 3.7.0
from puppet-nodejs.
Closing as a result of merging #178 . Will re-open if pain persists.
from puppet-nodejs.
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
class { 'nodejs':
# TODO: The following setting installs nodejs from apt, which is not very
# recent. However, installing from NodeSource currently fails due to a
# bug in puppet-nodejs. See
# https://github.com/puppet-community/puppet-nodejs/issues/149
# Try to update puppet-nodejs once the bug is fixed.
manage_package_repo => false,
nodejs_dev_package_ensure => 'present',
npm_package_ensure => 'present',
legacy_debian_symlinks => true,
}
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!
from puppet-nodejs.
Of course I spent all this time googling and found out that no, probably puppet isn't automatically the last version!
With this script I managed to update puppet to (I think) the latest available for trusty64 boxes, and after removing the 4 lines mentioned above, it works.
However npm is not the latest version, anybody knows why?
from puppet-nodejs.
@serviceman npm, when installed from nodesource's repository, comes with the version bundled with nodejs. we do not explicitly install the latest version with this module.
you can do this yourself with:
package { 'npm':
ensure => 'latest',
provider => 'npm',
}
and if you're lucky, this won't conflict with anything in the module _
from puppet-nodejs.
Yeah, you're gonna come up against #160 unless you're using Puppet > 4
from puppet-nodejs.
Related Issues (20)
- Linux mint requires a second run HOT 1
- Update docs to mention additional soft dependencies HOT 2
- nodejs_package_ensure won't upgrade my node (RHEL 7)
- Add Debian 10 (Buster) support HOT 3
- Issues with puppet agent 6.8.0 HOT 6
- Missing dependency on package resource that installs NPM when using the nodesource repository HOT 1
- Release bump
- Error "Package 'nodejs-dev' has no installation candidate" on Ubuntu 20.04
- Debian 8 EOL notice!
- Using @bundle/package@version with npm keeps installing the packages
- nodejs::npm::global_config_entry cannot work on a platform that puts npm into a different path
- npm/global_config_entry.pp: refactor to use inifile
- Evaluation Error: Operator '[]' is not applicable to an Undef Value - Ubuntu 20.04 HOT 2
- Puppet runs Exec[npm_install_NPM dependencies] every run
- Issue with nodejs repo and npm package conflict HOT 2
- Cannot install packages with npm provider on Windows HOT 2
- npm provider fails when executed as a daemon HOT 1
- tag the release for debian 11 compatibily please. HOT 2
- Nodejs package fails to install, seems to set incorrect baseurl in nodesource.repo
- Using third party repo on Debian (11) does not work correctly HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-nodejs.