Skip to content
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

Incorrect permissions when running gem_package 'jruby-openssl' #8

Open
tominated opened this issue Feb 20, 2014 · 2 comments
Open

Incorrect permissions when running gem_package 'jruby-openssl' #8

tominated opened this issue Feb 20, 2014 · 2 comments

Comments

@tominated
Copy link

I'm writing a wrapper cookbook for my web app (using berkshelf and vagrant—if it makes a difference), and when I run vagrant provision, chef-solo fails when trying to install jruby-openssl. I'm not sure what user chef-solo runs the command as, but as the torquebox folder belongs to the torquebox user & group, I'm assuming it needs to be that.

Here's the last bit of the error:

[2014-02-20T10:43:07+00:00] ERROR: gem_package[jruby-openssl] (torquebox::server line 85) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '137'
---- Begin output of /opt/torquebox-current/jruby/bin/jgem install jruby-openssl -q --no-rdoc --no-ri -v "0.9.4" ----
STDOUT:
STDERR: Killed
---- End output of /opt/torquebox-current/jruby/bin/jgem install jruby-openssl -q --no-rdoc --no-ri -v "0.9.4" ----
Ran /opt/torquebox-current/jruby/bin/jgem install jruby-openssl -q --no-rdoc --no-ri -v "0.9.4" returned 137
[2014-02-20T10:43:07+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

It might be a case of just moving the gem install resource above the installation folder chown resource. Any help would be great

@tominated
Copy link
Author

OK, I seem to have fixed the issue by replacing the gem_package resource with this:

execute "install jruby-openssl" do
  command "#{current}/jruby/bin/jgem install jruby-openssl -q --no-document"
  user "torquebox"
  returns [0, '0', '', nil]
end

I'll clean it up a bit and submit a pull request

@bbrowning
Copy link
Member

Great - thanks for tracking that down!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants