ruby - Capistrano current/ directory doesn't get created -
the current directory doesn't created capistrano when trying deploy first time.
i try deploy:check project , fine, when deploy process ends in error:
debug [8d5bfb3a] directory not exist '/home/deployer/apps/reputationmonitor-api/current' cap aborted! if test ! -d /home/deployer/apps/reputationmonitor-api/current; echo "directory not exist '/home/deployer/apps/reputationmonitor-api/current'" 1>&2; false; fi exit status: 1 if test ! -d /home/deployer/apps/reputationmonitor-api/current; echo "directory not exist '/home/deployer/apps/reputationmonitor-api/current'" 1>&2; false; fi stdout: nothing written if test ! -d /home/deployer/apps/reputationmonitor-api/current; echo "directory not exist '/home/deployer/apps/reputationmonitor-api/current'" 1>&2; false; fi stderr: directory not exist '/home/deployer/apps/reputationmonitor-api/current' /users/ngw/.rvm/gems/ruby-2.1.1@ec-api/gems/sshkit-1.4.0/lib/sshkit/command.rb:98:in `exit_status=' /users/ngw/.rvm/gems/ruby-2.1.1@ec-api/gems/sshkit-1.4.0/lib/sshkit/backends/netssh.rb:142:in `block (4 levels) in _execute' /users/ngw/.rvm/gems/ruby-2.1.1@ec-api/gems/net-ssh-2.9.0/lib/net/ssh/connection/channel.rb:551:in `call' /users/ngw/.rvm/gems/ruby-2.1.1@ec-api/gems/net-ssh-2.9.0/lib/net/ssh/connection/channel.rb:551:in `do_request' /users/ngw/.rvm/gems/ruby-2.1.1@ec-api/gems/net-ssh-2.9.0/lib/net/sshdebug [ac4ea3f3] finished in 0.053 seconds exit status 0 (successful). info unicorn running... /connection/session.rb:561:in `channel_request' /users/ngw/.rvm/gems/ruby-2.1.1@ec-api/gems/net-ssh-2.9.0/lib/net/ssh/connection/session.rb:465:in `dispatch_incoming_packets' /users/ngw/.rvm/gems/ruby-2.1.1@ec-api/gems/net-ssh-2.9.0/lib/net/ssh/connection/session.rb:221:in `preprocess' /users/ngw/.rvm/gems/ruby-2.1.1@ec-api/gems/net-ssh-2.9.0/lib/net/ssh/connection/session.rb:205:in `process' /users/ngw/.rvm/gems/ruby-2.1.1@ec-api/gems/net-ssh-2.9.0/lib/net/ssh/connection/session.rb:169:in `block in loop' /users/ngw/.rvm/gems/ruby-2.1.1@ec-api/gems/net-ssh-2.9.0/lib/net/ssh/connection/session.rb:169:in `loop' /users/ngw/.rvm/gems/ruby-2.1.1@ec-api/gems/net-ssh-2.9.0/lib/net/ssh/connection/session.rb:169:in `loop' /users/ngw/.rvm/gems/ruby-2.1.1@ec-api/gems/net-ssh-2.9.0/lib/net/ssh/connection/channel.rb:269:in `wait' /users/ngw/.rvm/gems/ruby-2.1.1@ec-api/gems/sshkit-1.4.0/lib/sshkit/backends/netssh.rb:164:in `block (2 levels) in _execute' /users/ngw/.rvm/gems/ruby-2.1.1@ec-api/gems/net-ssh-2.9.0/lib/net/ssh/connection/channel.rb:514:in `call' /users/ngw/.rvm/gems/ruby-2.1.1@ec-api/gems/net-ssh-2.9.0/lib/net/ssh/connection/channel.rb:514:in `do_open_confirmation' /users/ngw/.rvm/gems/ruby-2.1.1@ec-api/gems/net-ssh-2.9.0/lib/net/ssh/connection/session.rb:545:in `channel_open_confirmation' /users/ngw/.rvm/gems/ruby-2.1.1@ec-api/gems/net-ssh-2.9.0/lib/net/ssh/connection/session.rb:465:in `dispatch_incoming_packets' /users/ngw/.rvm/gems/ruby-2.1.1@ec-api/gems/net-ssh-2.9.0/lib/net/ssh/connection/session.rb:221:in `preprocess' /users/ngw/.rvm/gems/ruby-2.1.1@ec-api/gems/net-ssh-2.9.0/lib/net/ssh/connection/session.rb:205:in `process' /users/ngw/.rvm/gems/ruby-2.1.1@ec-api/gems/net-ssh-2.9.0/lib/net/ssh/connection/session.rb:169:in `block in loop' /users/ngw/.rvm/gems/ruby-2.1.1@ec-api/gems/net-ssh-2.9.0/lib/net/ssh/connection/session.rb:169:in `loop' /users/ngw/.rvm/gems/ruby-2.1.1@ec-api/gems/net-ssh-2.9.0/lib/net/ssh/connection/session.rb:169:in `loop' /users/ngw/.rvm/gems/ruby-2.1.1@ec-api/gems/sshkit-1.4.0/lib/sshkit/backends/netssh.rb:166:in `block in _execute' /users/ngw/.rvm/gems/ruby-2.1.1@ec-api/gems/sshkit-1.4.0/lib/sshkit/backends/netssh.rb:123:in `tap' /users/ngw/.rvm/gems/ruby-2.1.1@ec-api/gems/sshkit-1.4.0/lib/sshkit/backends/netssh.rb:123:in `_execute' /users/ngw/.rvm/gems/ruby-2.1.1@ec-api/gems/sshkit-1.4.0/lib/sshkit/backends/netssh.rb:66:in `execute' /users/ngw/.rvm/gems/ruby-2.1.1@ec-api/gems/sshkit-1.4.0/lib/sshkit/backends/abstract.rb:75:in `within' /users/ngw/.rvm/gems/ruby-2.1.1@ec-api/gems/capistrano3-unicorn-0.1.1/lib/capistrano3/tasks/unicorn.rake:17:in `block (3 levels) in <top (required)>' /users/ngw/.rvm/gems/ruby-2.1.1@ec-api/gems/sshkit-1.4.0/lib/sshkit/backends/netssh.rb:54:in `instance_exec' /users/ngw/.rvm/gems/ruby-2.1.1@ec-api/gems/sshkit-1.4.0/lib/sshkit/backends/netssh.rb:54:in `run' /users/ngw/.rvm/gems/ruby-2.1.1@ec-api/gems/sshkit-1.4.0/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute' tasks: top => unicorn:start (see full trace running task --trace) deploy has failed error: #<sshkit::command::failed: if test ! -d /home/deployer/apps/reputationmonitor-api/current; echo "directory not exist '/home/deployer/apps/reputationmonitor-api/current'" 1>&2; false; fi exit status: 1 if test ! -d /home/deployer/apps/reputationmonitor-api/current; echo "directory not exist '/home/deployer/apps/reputationmonitor-api/current'" 1>&2; false; fi stdout: nothing written if test ! -d /home/deployer/apps/reputationmonitor-api/current; echo "directory not exist '/home/deployer/apps/reputationmonitor-api/current'" 1>&2; false; fi stderr: directory not exist '/home/deployer/apps/reputationmonitor-api/current'
from experience it's caused previous problem didn't let deploy end, can't see noticeable exception or error (but might missing obvious).
lock '3.2.1' set :application, 'reputationmonitor-api' set :scm, :git set :repo_url, 'git@github.com:thefoolsrl/engagementconsole-api' set :ssh_options, {user: 'deployer', forward_agent: true} set :stages, %w(staging demo production) set :default_stage, 'staging' set :user, 'deployer' set :group, 'deployer' set :deploy_to, '/home/deployer/apps/reputationmonitor-api' set :format, :pretty set :log_level, :debug set :linked_files, %w{config/database.yml config/redis.yml config/unicorn.rb} set :linked_dirs, %w{bin log sockets tmp/pids tmp/sockets} set :redis_config, "#{shared_path}/config/redis.yml" set :unicorn_config_path, "#{deploy_to}/shared/config/unicorn.rb" set :sidekiq_timeout, 30 set :sidekiq_options, " -e #{fetch(:stage)} -c #{current_path}/config/sidekiq.yml -r #{current_path}/config/environment.rb -l #{shared_path}/log/sidekiq.log" set :rvm_ruby_version, '2.1.1' set :keep_releases, 5 namespace :deploy desc 'start application' task :start on roles(:app), in: :sequence, wait: 5 execute "sudo service nginx start" end end desc 'stop application' task :stop on roles(:app), in: :sequence, wait: 5 execute 'sudo service nginx stop' end end end desc 'restart application' task :restart on roles(:app), in: :sequence, wait: 5 execute 'sudo service nginx reload' end end task :migrate on roles(:app), in: :sequence, wait: 5 within release_path rack_env: fetch(:rack_env) execute :rake, "db:migrate" end end end end end namespace :remote_invoker desc 'restart remotecallbackinvoker daemon' task :restart on roles(:app), in: :sequence, wait: 5 within release_path rack_env: fetch(:rack_env) execute :ruby, "./scripts/callback_invoker restart" end end end end end after 'deploy:updated', 'deploy:migrate' after "deploy:updated", "deploy:cleanup" after 'deploy:migrate', 'unicorn:restart' after 'unicorn:restart', 'remote_invoker:restart'
does have clue can debug this?
Comments
Post a Comment