capistrano-sidekiq
capistrano-sidekiq copied to clipboard
deploy fails on sidekiq:start
I simply installed the capistrano-sidekiq gem and did not customize any settings.
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 [email protected]: 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 [email protected]: 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 [email protected]
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 [email protected]
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 [email protected]
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 [email protected]…
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 [email protected]
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 on what's going on, what is it looking for in /usr/bin/env
and main question: how do I solve it?
i have similar issue, you should manually create shared/log/ dir and add to deploy.rb,
set :pty, false
SSHKit.config.command_map[:sidekiq] = "source ~/.bash_profile && bundle exec sidekiq"
SSHKit.config.command_map[:sidekiqctl] = "source ~/.bash_profile && bundle exec sidekiqctl"
i do not like this solution
You can try use previous version of gem (0.5.3). This issue could appear after https://github.com/seuros/capistrano-sidekiq/pull/104 .
If it's really connected to bundle_bins, try to require 'capistrano/sidekiq'
AFTER 'capistrano/bundler'
in Capfile. I had similar issue and it helped
Put "capistrano/sidekiq" after "capistrano/rails" worked for me.