简体   繁体   中英

capistrano deploy fails on starting sidekiq

My deploy goes good until the sidekiq:start :

00:18 sidekiq:start
      01 sidekiq --index 0 --pidfile /home/user/cap/shared/tmp/pids/sidekiq-0.pid --environment production --logfile /home/user/cap/shared/log/sidekiq.log --concurrency 4 --daemon
      01 /usr/bin/env: sidekiq: No such file or directory
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as user@app.domain.com: sidekiq exit status: 127
sidekiq stdout: Nothing written
sidekiq stderr: /usr/bin/env: sidekiq: No such file or directory

SSHKit::Command::Failed: sidekiq exit status: 127
sidekiq stdout: Nothing written
sidekiq stderr: /usr/bin/env: sidekiq: No such file or directory

Tasks: TOP => sidekiq:start
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing as user@app.domain.com: sidekiq exit status: 127
sidekiq stdout: Nothing written
sidekiq stderr: /usr/bin/env: sidekiq: No such file or directory

** DEPLOY FAILED
** Refer to log/capistrano.log for details. Here are the last 20 lines:

 DEBUG [c0e43b64] Command: if test ! -d /home/user/cap/releases/20160629062112; then echo "Directory does not exist '/home/user/cap/releases/20160629062112'" 1>&2; false; fi
 DEBUG [c0e43b64] Finished in 0.079 seconds with exit status 0 (successful).
 DEBUG [2c3323b9] Running /usr/bin/env [ -f /home/user/cap/shared/tmp/pids/sidekiq-0.pid ] as user@app.domain.com
 DEBUG [2c3323b9] Command: cd /home/user/cap/releases/20160629062112 && ( export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.3.0" ; /usr/bin/env [ -f /home/user/cap/shared/tmp/pids/sidekiq-0.pid ] )
 DEBUG [2c3323b9] Finished in 0.083 seconds with exit status 1 (failed).
  INFO [6813e38f] Running /usr/bin/env ln -s /home/user/cap/releases/20160629062112 /home/user/cap/releases/current as user@app.domain.com
 DEBUG [6813e38f] Command: ( export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.3.0" ; /usr/bin/env ln -s /home/user/cap/releases/20160629062112 /home/user/cap/releases/current )
  INFO [6813e38f] Finished in 0.080 seconds with exit status 0 (successful).
  INFO [6d1d7708] Running /usr/bin/env mv /home/user/cap/releases/current /home/user/cap as user@app.domain.com
 DEBUG [6d1d7708] Command: ( export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.3.0" ; /usr/bin/env mv /home/user/cap/releases/current /home/user/cap )
  INFO [6d1d7708] Finished in 0.080 seconds with exit status 0 (successful).
 DEBUG [0dbc1637] Running if test ! -d /home/user/cap/releases/20160629062112; then echo "Directory does not exist '/home/user/cap/releases/20160629062112'" 1>&2; false; fi as user@portal.nordcloud…
 DEBUG [0dbc1637] Command: if test ! -d /home/user/cap/releases/20160629062112; then echo "Directory does not exist '/home/user/cap/releases/20160629062112'" 1>&2; false; fi
 DEBUG [0dbc1637] Finished in 0.079 seconds with exit status 0 (successful).
 DEBUG [6b62769e] Running /usr/bin/env [ -f /home/user/cap/shared/tmp/pids/sidekiq-0.pid ] as user@app.domain.com
 DEBUG [6b62769e] Command: cd /home/user/cap/releases/20160629062112 && ( export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.3.0" ; /usr/bin/env [ -f /home/user/cap/shared/tmp/pids/sidekiq-0.pid ] )
 DEBUG [6b62769e] Finished in 0.081 seconds with exit status 1 (failed).
  INFO [eaed2dfc] Running /usr/bin/env sidekiq --index 0 --pidfile /home/user/cap/shared/tmp/pids/sidekiq-0.pid --environment production --logfile /home/user/cap/shared/log/sidekiq.log --concurrency …
 DEBUG [eaed2dfc] Command: cd /home/user/cap/releases/20160629062112 && ( export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.3.0" ; /usr/bin/env sidekiq --index 0 --pidfile /home/user/cap/shared/tmp/p…
 DEBUG [eaed2dfc]   /usr/bin/env: sidekiq: No such file or directory

Does anyone have hints what's going on, what is it looking for in /usr/bin/env and mail question: how do I solve it?

Looks like you use rbenv. Do you also have the Capistrano support gem included?

https://github.com/capistrano/rbenv

Also, take a look into this bug report - might be helpful!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM