Capistrano3でデプロイを実行したところ以下のようなエラー???がでてしまい、解決方法などをご教示おねがいします。
$ bundle exec cap production deploy --dry-run
$ bundle exec cap production deploy:check
ではエラーはでていません。
$ bundle exec cap production deploy [9895c011] Command: [ -L /usr/share/nginx/html/releases/20190417035252/tm p/sockets ] DEBUG [7babb3d8] Finished in 0.233 seconds with exit status 1 (failed). DEBUG [c4776b98] Running [ -d /usr/share/nginx/html/releases/20190417035252/tmp /sockets ] as panda@155.128.133.87 DEBUG [c4776b98] Command: [ -d /usr/share/nginx/html/releases/20190417035252/tm p/sockets ] DEBUG [9c26963a] Finished in 0.215 seconds with exit status 1 (failed). INFO [b3efd1e2] Running /usr/bin/env ln -s /usr/share/nginx/html/shared/tmp/so ckets /usr/share/nginx/html/releases/20190417035252/tmp/sockets as panda@155.128.133.87 [267403f4] bash: /root/.rbenv/bin/rbenv: Permission denied DEBUG [267403f4] Finished in 0.216 seconds with exit status 126 (failed). INFO [8e818031] Running /root/.rbenv/bin/rbenv exec bundle install --path /usr /share/nginx/html/shared/bundle --jobs 4 --without development test --deployment --quiet as panda@155.128.133.87 DEBUG [8e818031] Command: cd /usr/share/nginx/html/releases/20190417035252 && ( export RBENV_ROOT="/root/.rbenv" RBENV_VERSION="" ; /root/.rbenv/bin/rbenv exec bundle install --path /usr/share/nginx/html/shared/bundle --jobs 4 --without de velopment test --deployment --quiet ) DEBUG [95d5f842] bash: /root/.rbenv/bin/rbenv: Permission denied (Backtrace restricted to imported tasks) cap aborted! SSHKit::Runner::ExecuteError: Exception while executing as panda@155.128.133.87 : bundle exit status: 126 bundle stdout: bash: /root/.rbenv/bin/rbenv: Permission denied bundle stderr: Nothing written SSHKit::Command::Failed: bundle exit status: 126 bundle stdout: bash: /root/.rbenv/bin/rbenv: Permission denied bundle stderr: Nothing written Tasks: TOP => deploy:updated => bundler:install (See full trace by running task with --trace) The deploy has failed with an error: Exception while executing as panda@155.128.133.87 : bundle exit status: 126 bundle stdout: bash: /root/.rbenv/bin/rbenv: Permission denied bundle stderr: Nothing written
のようにエラーがでてしまいます。
知りたいのは以下の2点です。
1, DEBUG [7babb3d8] Finished in 0.233 seconds with exit status 1 (failed).
2, DEBUG [267403f4] Finished in 0.216 seconds with exit status 126 (failed). SSHKit::Command::Failed: bundle exit status: 126 bundle stdout: bash: /root/.rbenv/bin/rbenv: Permission denied bundle stderr: Nothing written
の解決方法です。
1、の場合は何カ所も出ましたが表示がでてもデプロイの実行が進んでいました。
2,の場合はデプロイがストップしてしまいました。
VPS側の状況はどうなっているか見たところファイルの転送はできているみたいです。
パーミッションがなにか悪さしているのかと考えどうなっているか表示してみました。
ローカル側 [vagrant@localhost chibi]$ ls -l total 72 drwxrwxr-x 15 vagrant vagrant 4096 Dec 27 2017 app drwxr-xr-x 2 vagrant vagrant 103 Aug 6 2017 bin -rw-r--r-- 1 vagrant vagrant 1247 Apr 16 17:12 Capfile drwxrwxr-x 6 vagrant vagrant 4096 Apr 16 16:47 config -rw-rw-r-- 1 vagrant vagrant 130 Aug 5 2017 config.ru drwxrwxr-x 4 vagrant vagrant 63 Aug 7 2017 db -rw-rw-r-- 1 vagrant vagrant 2938 Apr 10 14:37 Gemfile -rw-rw-r-- 1 vagrant vagrant 8106 Apr 10 14:37 Gemfile.lock drwxrwxr-x 5 vagrant vagrant 48 Mar 12 12:29 lib drwxrwxr-x 2 vagrant vagrant 4096 Apr 7 16:09 log -rw-rw-r-- 1 vagrant vagrant 1078 Dec 20 2017 MIT-LICENSE.txt -rw-rw-r-- 1 vagrant vagrant 63 Aug 5 2017 package.json drwxrwxr-x 4 vagrant vagrant 4096 Apr 16 17:19 public -rw-rw-r-- 1 vagrant vagrant 287 Aug 7 2017 Rakefile -rw-rw-r-- 1 vagrant vagrant 375 Apr 8 23:52 README.md -rw-rw-r-- 1 vagrant vagrant 1306 Feb 22 08:58 server.crt -rw-rw-r-- 1 vagrant vagrant 1054 Feb 22 08:57 server.csr -rw-rw-r-- 1 vagrant vagrant 1675 Feb 22 08:53 server.key drwxrwxr-x 12 vagrant vagrant 4096 Jan 7 2018 spec drwxrwxr-x 9 vagrant vagrant 4096 Aug 5 2017 test drwxrwxr-x 5 vagrant vagrant 92 Apr 11 21:14 tmp drwxrwxr-x 3 vagrant vagrant 31 Aug 28 2017 vendor
VPS側 [panda@ik1-301-10835 ~]$ ls -l total 4 drwxrwxr-x 13 panda panda 4096 Apr 15 10:14 ChibiApp
どちらにもrbenvのパーミッションらしきものは無くてわかりません。
どなたか解決方法おしえていただけませんでしょうか?
宜しくお願いします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。