Uncaught exception: Puppet::Error: Got nil value for user

11 views
Skip to first unread message

jaambros

unread,
Sep 16, 2014, 5:55:32 PM9/16/14
to railsmachin...@googlegroups.com
Hi all,

I'm trying to deploy a rails 3.2.17, ruby 2.1 application and I'm getting this error:

    triggering before callbacks for `deploy:create_symlink'
  * 2014-09-15 19:24:02 executing `moonshine:apply'
  * executing "sudo -p 'sudo password: ' RAILS_ROOT=/var/www/tek32/releases/20140916022332 DEPLOY_STAGE=tek32_lab RAILS_ENV=production shadow_puppet   /var/www/tek32/releases/20140916022332/app/manifests/application_manifest.rb"
    servers: ["tek32"]
    [tek32] executing command
 ** [out :: tek32] Uncaught exception: Puppet::Error: Got nil value for user
 ** [out :: tek32] /usr/lib/ruby/gems/2.1.0/gems/puppet-3.6.2/lib/puppet/type.rb:646:in `[]='
[ the rest of the stack dump is below]

I'm not sure what "user" variable is getting a nil value.
The one in config/moonshine.yml is set as
:ruby: src21
:user: rails

I've updated moonshine to the latest version, to no avail.
I've set the :user variable in config/deploy.rb
I'm out of ideas on how to fix this problem.
Any sugestions?

This version is a migration from a 2.3.18, 1.8.7 that deploys fine, and I have made no changes (relevant to moonshine).
That makes it even more puzzling to me.

Thanks in advance,
Jose

--- full backtrace ---
** [out :: tek32] Uncaught exception: Puppet::Error: Got nil value for user
 ** [out :: tek32] /usr/lib/ruby/gems/2.1.0/gems/puppet-3.6.2/lib/puppet/type.rb:646:in `[]='
 ** [out :: tek32] /usr/lib/ruby/gems/2.1.0/gems/puppet-3.6.2/lib/puppet/type.rb:2250:in `block in set_parameters'
 ** [out :: tek32]
 ** [out :: tek32] /usr/lib/ruby/gems/2.1.0/gems/puppet-3.6.2/lib/puppet/type.rb:2244:in `each'
 ** [out :: tek32]
 ** [out :: tek32] /usr/lib/ruby/gems/2.1.0/gems/puppet-3.6.2/lib/puppet/type.rb:2244:in `set_parameters'
 ** [out :: tek32] /usr/lib/ruby/gems/2.1.0/gems/puppet-3.6.2/lib/puppet/type.rb:2200:in `initialize'
 ** [out :: tek32]
 ** [out :: tek32] /usr/lib/ruby/gems/2.1.0/gems/shadow_puppet-0.9.1/lib/shadow_puppet/manifest.rb:348:in `new'
 ** [out :: tek32]
 ** [out :: tek32] /usr/lib/ruby/gems/2.1.0/gems/shadow_puppet-0.9.1/lib/shadow_puppet/manifest.rb:348:in `new_resource'
 ** [out :: tek32] /usr/lib/ruby/gems/2.1.0/gems/shadow_puppet-0.9.1/lib/shadow_puppet/manifest.rb:340:in `add_resource'
 ** [out :: tek32] /usr/lib/ruby/gems/2.1.0/gems/shadow_puppet-0.9.1/lib/shadow_puppet/manifest.rb:324:in `resource_or_reference'
 ** [out :: tek32]
 ** [out :: tek32] /usr/lib/ruby/gems/2.1.0/gems/shadow_puppet-0.9.1/lib/shadow_puppet/manifest.rb:212:in `block (2 levels) in register_puppet_types'
 ** [out :: tek32] /var/www/tek32/releases/20140916022332/vendor/plugins/moonshine/lib/moonshine/manifest/rails/os.rb:283:in `exec'
 ** [out :: tek32]
 ** [out :: tek32] /var/www/tek32/releases/20140916022332/vendor/plugins/moonshine/lib/moonshine/manifest/rails/rails.rb:298:in `rake'
 ** [out :: tek32] /var/www/tek32/releases/20140916022332/vendor/plugins/moonshine/lib/moonshine/manifest/rails/rails.rb:65:in `rails_rake_environment'
 ** [out :: tek32]
 ** [out :: tek32]
 ** [out :: tek32] /usr/lib/ruby/gems/2.1.0/gems/shadow_puppet-0.9.1/lib/shadow_puppet/manifest.rb:301:in `block in evaluate_recipes'
 ** [out :: tek32] /usr/lib/ruby/gems/2.1.0/gems/shadow_puppet-0.9.1/lib/shadow_puppet/manifest.rb:296:in `each'
 ** [out :: tek32]
 ** [out :: tek32] /usr/lib/ruby/gems/2.1.0/gems/shadow_puppet-0.9.1/lib/shadow_puppet/manifest.rb:296:in `evaluate_recipes'
 ** [out :: tek32]
 ** [out :: tek32] /usr/lib/ruby/gems/2.1.0/gems/shadow_puppet-0.9.1/lib/shadow_puppet/manifest.rb:256:in `execute!'
 ** [out :: tek32]
 ** [out :: tek32]
 ** [out :: tek32] /usr/lib/ruby/gems/2.1.0/gems/shadow_puppet-0.9.1/bin/shadow_puppet:143:in `<top (required)>'
 ** [out :: tek32] /usr/bin/shadow_puppet:23:in `load'
 ** [out :: tek32]
 ** [out :: tek32] /usr/bin/shadow_puppet:23:in `<main>'
 ** [out :: tek32]

Kevin Lawver

unread,
Sep 17, 2014, 7:38:20 AM9/17/14
to railsmachin...@googlegroups.com
Make sure that puppet's the latest version:

cap shell
sudo gem install shadow_puppet

And then make sure that the config directory isn't in the shared_children section in config/moonshine.yml.

Did you update moonshine and run cap ruby:upgrade to get the server up to ruby 2.1?

--
You received this message because you are subscribed to the Google Groups "Moonshine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to railsmachine-moon...@googlegroups.com.
To post to this group, send email to railsmachin...@googlegroups.com.
Visit this group at http://groups.google.com/group/railsmachine-moonshine.
For more options, visit https://groups.google.com/d/optout.

jaambros

unread,
Sep 17, 2014, 7:24:40 PM9/17/14
to railsmachin...@googlegroups.com
Hi Kevin

It seems like making sure config is not in shared_children did the trick.

Thanks a lot for your help!!
Jose
To unsubscribe from this group and stop receiving emails from it, send an email to railsmachine-moonshine+unsub...@googlegroups.com.

jaambros

unread,
Sep 17, 2014, 9:26:39 PM9/17/14
to railsmachin...@googlegroups.com
Hey Kevin,

Please note that the Configuration page https://github.com/railsmachine/moonshine/wiki/Configuration lists config in the shared_children section.
I think that's where I got the idea from ...
MIght be a good idea to take it out there.

Best and thanks again,
Jose
Reply all
Reply to author
Forward
0 new messages