Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Error on Opsworks
2015-06-23T06:29:40+00:00] INFO: sudo su - deploy -c 'cd /srv/www/inq/releases/20150623062934 && /usr/local/bin/bundle install --path /home/deploy/.bundler/inq --without=test development'
================================================================================
Error executing action `deploy` on resource 'deploy[/srv/www/inq]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '5'
---- Begin output of sudo su - deploy -c 'cd /srv/www/inq/releases/20150623062934 && /usr/local/bin/bundle install --path /home/deploy/.bundler/inq --without=test development' 2>&1 ----
STDOUT: Using rake (10.4.2)
Using i18n (0.7.0)
Using json (1.8.2)
Using minitest (5.5.1)
Using thread_safe (0.3.4)
Using tzinfo (1.2.2)
Using activesupport (4.2.0)
Using builder (3.2.2)
Using erubis (2.7.0)
Using mini_portile (0.6.2)
Using nokogiri (1.6.6.2)
Using rails-deprecated_sanitizer (1.0.3)
Using rails-dom-testing (1.0.5)
Using loofah (2.0.1)
Using rails-html-sanitizer (1.0.1)
Using actionview (4.2.0)
Using rack (1.6.0)
Using rack-test (0.6.3)
Using actionpack (4.2.0)
Using globalid (0.3.0)
Using activejob (4.2.0)
Using mime-types (2.4.3)
Using mail (2.6.3)
Using actionmailer (4.2.0)
Using arbre (1.0.3)
Using sass (3.4.13)
Using thor (0.19.1)
Using bourbon (4.2.1)
Using coffee-script-source (1.9.0)
Using execjs (2.2.2)
Using coffee-script (2.3.0)
Using railties (4.2.0)
Using coffee-rails (4.0.1)
Using formtastic (3.1.3)
Using formtastic_i18n (0.4.1)
Using has_scope (0.6.0)
Using responders (2.1.0)
Using inherited_resources (1.6.0)
Using jquery-rails (4.0.3)
Using jquery-ui-rails (5.0.5)
Using kaminari (0.16.2) from git://github.com/amatsuda/kaminari.git (at 0-16-stable)
Using activemodel (4.2.0)
Using arel (6.0.0)
Using activerecord (4.2.0)
Using bundler (1.5.3)
Using hike (1.2.3)
Using multi_json (1.10.1)
Using tilt (1.4.1)
Using sprockets (2.12.3)
Using sprockets-rails (2.2.4)
Using rails (4.2.0)
Using polyamorous (1.2.0)
Using ransack (1.6.6)
Using sass-rails (5.0.1)
Errno::EACCES: Permission denied @ rb_sysopen - activeadmin-1.0.0.pre1.gem
An error occurred while installing activeadmin (1.0.0.pre1), and Bundler cannot
continue.
Make sure that `gem install activeadmin -v '1.0.0.pre1'` succeeds before
bundling.
STDERR:
---- End output of sudo su - deploy -c 'cd /srv/www/inq/releases/20150623062934 && /usr/local/bin/bundle install --path /home/deploy/.bundler/inq --without=test development' 2>&1 ----
Ran sudo su - deploy -c 'cd /srv/www/inq/releases/20150623062934 && /usr/local/bin/bundle install --path /home/deploy/.bundler/inq --without=test development' 2>&1 returned 5
Cookbook Trace:
---------------
/var/lib/aws/opsworks/cache.stage2/cookbooks/opsworks_commons/libraries/shellout.rb:9:in `shellout'
/var/lib/aws/opsworks/cache.stage2/cookbooks/rails/libraries/rails_configuration.rb:41:in `bundle'
/var/lib/aws/opsworks/cache.stage2/cookbooks/deploy/definitions/opsworks_deploy.rb:105:in `block (3 levels) in from_file'
Resource Declaration:
---------------------
# In /var/lib/aws/opsworks/cache.stage2/cookbooks/deploy/definitions/opsworks_deploy.rb
65: deploy deploy[:deploy_to] do
66: provider Chef::Provider::Deploy.const_get(deploy[:chef_provider])
67: keep_releases deploy[:keep_releases]
68: repository deploy[:scm][:repository]
69: user deploy[:user]
70: group deploy[:group]
71: revision deploy[:scm][:revision]
72: migrate deploy[:migrate]
73: migration_command deploy[:migrate_command]
74: environment deploy[:environment].to_hash
75: purge_before_symlink(deploy[:purge_before_symlink]) unless deploy[:purge_before_symlink].nil?
76: create_dirs_before_symlink(deploy[:create_dirs_before_symlink])
77: symlink_before_migrate(deploy[:symlink_before_migrate])
78: symlinks(deploy[:symlinks]) unless deploy[:symlinks].nil?
79: action deploy[:action]
80:
81: if deploy[:application_type] == 'rails' && node[:opsworks][:instance][:layers].include?('rails-app')
82: restart_command "sleep #{deploy[:sleep_before_restart]} && #{node[:opsworks][:rails_stack][:restart_command]}"
83: end
84:
Compiled Resource:
------------------
# Declared in /var/lib/aws/opsworks/cache.stage2/cookbooks/deploy/definitions/opsworks_deploy.rb:65:in `block in from_file'
deploy("/srv/www/inq") do
params {:deploy_data=>{"deploy_to"=>"/srv/www/inq", "chef_provider"=>"Timestamped", "keep_releases"=>5, "current_path"=>"/srv/www/inq/current", "document_root"=>"public", "ignore_bundler_groups"=>["test", "development"], "absolute_document_root"=>"/srv/www/inq/current/public/", "rake"=>"/usr/local/bin/rake", "migrate"=>true, "migrate_command"=>"if [ -f Gemfile ]; then echo 'OpsWorks: Gemfile found - running migration with bundle exec' && /usr/local/bin/bundle exec /usr/local/bin/rake db:migrate; else echo 'OpsWorks: no Gemfile - running plain migrations' && /usr/local/bin/rake db:migrate; fi", "rails_env"=>"production", "action"=>"deploy", "user"=>"deploy", "group"=>"www-data", "shell"=>"/bin/bash", "home"=>"/home/deploy", "sleep_before_restart"=>0, "stack"=>{"needs_reload"=>true}, "enable_submodules"=>true, "shallow_clone"=>false, "delete_cached_copy"=>true, "purge_before_symlink"=>["log", "tmp/pids", "public/system"], "create_dirs_before_symlink"=>["tmp", "public", "config"], "symlink_before_migrate"=>{"config/database.yml"=>"config/database.yml", "config/memcached.yml"=>"config/memcached.yml"}, "symlinks"=>{"system"=>"public/system", "pids"=>"tmp/pids", "log"=>"log"}, "environment"=>{"RAILS_ENV"=>"production", "RUBYOPT"=>"", "RACK_ENV"=>"production", "HOME"=>"/home/deploy", "SECRET_KEY_BASE"=>"4854233ac8da9143eae2030ec87cd9be334de7139c325292586351bf25020d824540e8a1d27649492298e42595d197b8fe9bbf0a9f7ffac172109e07c0bf994d", "TWITTER_KEY"=>"q7MLTERyJiG5W6HUbmqCwQ", "TWITTER_SECRET"=>"vUSsDYFNIKjuiExYKBOUOme4PovOmN6odb6bGI9kck", "FACEBOOK_ID"=>"331103580366910", "FACEBOOK_SECRET"=>"a81674bc7bc43a6192b30839602581c9", "ASSOCIATE_TAG"=>"rakuzone-22", "AWS_ACCESS_KEY_ID"=>"AKIAIKNR6DMH5TKEVNZQ", "AWS_SECRET_KEY"=>"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", "TRACKING_ID"=>"UA-41000764-6"}, "environment_variables"=>{"SECRET_KEY_BASE"=>"4854233ac8da9143eae2030ec87cd9be334de7139c325292586351bf25020d824540e8a1d27649492298e42595d197b8fe9bbf0a9f7ffac172109e07c0bf994d", "TWITTER_KEY"=>"q7MLTERyJiG5W6HUbmqCwQ", "TWITTER_SECRET"=>"vUSsDYFNIKjuiExYKBOUOme4PovOmN6odb6bGI9kck", "FACEBOOK_ID"=>"331103580366910", "FACEBOOK_SECRET"=>"a81674bc7bc43a6192b30839602581c9", "ASSOCIATE_TAG"=>"rakuzone-22", "AWS_ACCESS_KEY_ID"=>"AKIAIKNR6DMH5TKEVNZQ", "AWS_SECRET_KEY"=>"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", "TRACKING_ID"=>"UA-41000764-6"}, "ssl_support"=>false, "auto_npm_install_on_deploy"=>true, "nodejs"=>{"restart_command"=>"monit restart node_web_app_inq", "stop_command"=>"monit stop node_web_app_inq", "port"=>80}, "application"=>"inq", "application_type"=>"rails", "auto_bundle_on_deploy"=>true, "deploying_user"=>"arn:aws:iam::132080408241:root", "domains"=>["inq"], "mounted_at"=>nil, "restart_command"=>nil, "ssl_certificate"=>nil, "ssl_certificate_key"=>nil, "ssl_certificate_ca"=>nil, "scm"=>{"scm_type"=>"git", "repository"=>"git@github.com:tarky/inq_rails", "revision"=>nil, "ssh_key"=>"-----BEGIN RSA PRIVATE KEY-----\nMIICWwIBAAKBgQCRBgILcMowaTvVPtUZjr3eB7NEYZl5sV8L5nnEcQ5w1ZOP1JEi\nIh4EPxmiXdsggP9h51kQjGxDIUr3WvICWeQP008SlzA8sWK4TIL6y2RM4sO3FCgb\nOROpRm4HDhQBCWGF9jEU6qXggBiZ09/30A5B5szhKat99idX9uk4V+7BKQIDAQAB\nAoGAS14O8/ki6rPV54Xm44hePiRMUu5R/39hgOK/R4rl0Vf9fxMeddm7NcPBQ7N5\nLNQ9ZJkBnWsM3HpR5mj6OqSSs6p8wv5CcXpEbMTIo9z2yJfe+WlHBq7uyCdO9/cJ\nHpguxQfYFgXlF9AZVRtOB7YCUav4tJ6c2zacL7xH601/STECQQDAtKk66ZxgnUb1\nzETrQlu/ZiO070BKVc1B9Fkth9DelWtn7nLSiWsCQRlL2wzODhheR0I0kUanWaHF\n+WBxsFNdAkEAwKgQsI+oQUXzJwEWazIRYOH7XdX2b27zs2zmOjHYHFNWLa58jr27\ne4h++HxQvdeL0pm3Gunm8mMFkWl9zCw0PQJACwDFwOVh1mpkiNhW/w/U6ULNuyEG\nDLiFdcSb6uucU3k4nsCQsdDC2WgaJ6ikPIe1gHyVHSdGX3vQrtskVJl6yQJAH9en\naodT9/XnynqTigQseybetRO4N5LPFMjbBKNYZNYhWEuOqskRQ8m7srZZYgdORPDD\nIt+mHEnhkbct46EqwQJAGSqRxv5fEszsahsowMNiKM9wTAFmjprwlRaCfDq5GiE6\nVg2kD6I61zZgsbgVgSyJPQ8occ6lqMySrQu8ZO5XQA==\n-----END RSA PRIVATE KEY-----", "user"=>nil, "password"=>nil}, "database"=>{"host"=>"172.31.6.172", "database"=>"inq", "port"=>3306, "username"=>"root", "password"=>"mpul2nvcxr", "reconnect"=>true, "data_source_provider"=>"stack", "type"=>"mysql"}, "memcached"=>{"host"=>nil, "port"=>11211}}, :app=>"inq", :name=>nil}
provider Chef::Provider::Deploy::Timestamped
action [:deploy]
updated true
updated_by_last_action true
retries 0
retry_delay 2
deploy_to "/srv/www/inq"
environment {"RAILS_ENV"=>"production", "RUBYOPT"=>"", "RACK_ENV"=>"production", "HOME"=>"/home/deploy", "SECRET_KEY_BASE"=>"4854233ac8da9143eae2030ec87cd9be334de7139c325292586351bf25020d824540e8a1d27649492298e42595d197b8fe9bbf0a9f7ffac172109e07c0bf994d", "TWITTER_KEY"=>"q7MLTERyJiG5W6HUbmqCwQ", "TWITTER_SECRET"=>"vUSsDYFNIKjuiExYKBOUOme4PovOmN6odb6bGI9kck", "FACEBOOK_ID"=>"331103580366910", "FACEBOOK_SECRET"=>"a81674bc7bc43a6192b30839602581c9", "ASSOCIATE_TAG"=>"rakuzone-22", "AWS_ACCESS_KEY_ID"=>"AKIAIKNR6DMH5TKEVNZQ", "AWS_SECRET_KEY"=>"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", "TRACKING_ID"=>"UA-41000764-6"}
repository_cache "cached-copy"
purge_before_symlink ["log", "tmp/pids", "public/system"]
create_dirs_before_symlink ["tmp", "public", "config"]
symlink_before_migrate {"config/database.yml"=>"config/database.yml", "config/memcached.yml"=>"config/memcached.yml"}
symlinks {"system"=>"public/system", "pids"=>"tmp/pids", "log"=>"log"}
revision "HEAD"
migrate true
remote "origin"
enable_submodules true
scm_provider Chef::Provider::Git
keep_releases 5
enable_checkout true
checkout_branch "deploy"
cookbook_name "deploy"
recipe_name "rails"
repo "git@github.com:tarky/inq_rails"
user "deploy"
group "www-data"
migration_command "if [ -f Gemfile ]; then echo 'OpsWorks: Gemfile found - running migration with bundle exec' && /usr/local/bin/bundle exec /usr/local/bin/rake db:migrate; else echo 'OpsWorks: no Gemfile - running plain migrations' && /usr/local/bin/rake db:migrate; fi"
restart_command "sleep 0 && ../../shared/scripts/unicorn clean-restart"
before_migrate #<Proc:0x007fa6c620b538@/var/lib/aws/opsworks/cache.stage2/cookbooks/deploy/definitions/opsworks_deploy.rb:100>
shared_path "/srv/www/inq/shared"
destination "/srv/www/inq/shared/cached-copy"
current_path "/srv/www/inq/current"
end
[2015-06-23T06:29:41+00:00] INFO: Running queued delayed notifications before re-raising exception
[2015-06-23T06:29:41+00:00] ERROR: Running exception handlers
[2015-06-23T06:29:41+00:00] ERROR: Exception handlers complete
[2015-06-23T06:29:41+00:00] FATAL: Stacktrace dumped to /var/lib/aws/opsworks/cache.stage2/chef-stacktrace.out
[2015-06-23T06:29:41+00:00] ERROR: deploy[/srv/www/inq] (deploy::rails line 65) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '5'
---- Begin output of sudo su - deploy -c 'cd /srv/www/inq/releases/20150623062934 && /usr/local/bin/bundle install --path /home/deploy/.bundler/inq --without=test development' 2>&1 ----
STDOUT: Using rake (10.4.2)
Using i18n (0.7.0)
Using json (1.8.2)
Using minitest (5.5.1)
Using thread_safe (0.3.4)
Using tzinfo (1.2.2)
Using activesupport (4.2.0)
Using builder (3.2.2)
Using erubis (2.7.0)
Using mini_portile (0.6.2)
Using nokogiri (1.6.6.2)
Using rails-deprecated_sanitizer (1.0.3)
Using rails-dom-testing (1.0.5)
Using loofah (2.0.1)
Using rails-html-sanitizer (1.0.1)
Using actionview (4.2.0)
Using rack (1.6.0)
Using rack-test (0.6.3)
Using actionpack (4.2.0)
Using globalid (0.3.0)
Using activejob (4.2.0)
Using mime-types (2.4.3)
Using mail (2.6.3)
Using actionmailer (4.2.0)
Using arbre (1.0.3)
Using sass (3.4.13)
Using thor (0.19.1)
Using bourbon (4.2.1)
Using coffee-script-source (1.9.0)
Using execjs (2.2.2)
Using coffee-script (2.3.0)
Using railties (4.2.0)
Using coffee-rails (4.0.1)
Using formtastic (3.1.3)
Using formtastic_i18n (0.4.1)
Using has_scope (0.6.0)
Using responders (2.1.0)
Using inherited_resources (1.6.0)
Using jquery-rails (4.0.3)
Using jquery-ui-rails (5.0.5)
Using kaminari (0.16.2) from git://github.com/amatsuda/kaminari.git (at 0-16-stable)
Using activemodel (4.2.0)
Using arel (6.0.0)
Using activerecord (4.2.0)
Using bundler (1.5.3)
Using hike (1.2.3)
Using multi_json (1.10.1)
Using tilt (1.4.1)
Using sprockets (2.12.3)
Using sprockets-rails (2.2.4)
Using rails (4.2.0)
Using polyamorous (1.2.0)
Using ransack (1.6.6)
Using sass-rails (5.0.1)
Errno::EACCES: Permission denied @ rb_sysopen - activeadmin-1.0.0.pre1.gem
An error occurred while installing activeadmin (1.0.0.pre1), and Bundler cannot
continue.
Make sure that `gem install activeadmin -v '1.0.0.pre1'` succeeds before
bundling.
STDERR:
---- End output of sudo su - deploy -c 'cd /srv/www/inq/releases/20150623062934 && /usr/local/bin/bundle install --path /home/deploy/.bundler/inq --without=test development' 2>&1 ----
Ran sudo su - deploy -c 'cd /srv/www/inq/releases/20150623062934 && /usr/local/bin/bundle install --path /home/deploy/.bundler/inq --without=test development' 2>&1 returned 5
[2015-06-23T06:29:41+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
@tarky
Copy link
Author

tarky commented Jun 23, 2015

According to http://stackoverflow.com/questions/16426398/active-admin-install-with-rails-4 ,

I will try

gem 'activeadmin', '~> 1.0.0.pre1'

@tarky
Copy link
Author

tarky commented Jun 23, 2015

sloved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment