質問

My working deployment script is failing with upload via sftp failed on XX.XXX.XXX.XXX: Net::SFTP::StatusException (Net::SFTP::StatusException write /tmp/20130610114941.tar.gz (4, "failure")) error.

here is my deployment script

require "rvm/capistrano"
require "bundler/capistrano"


set :rvm_type, :user

set :rvm_ruby_string, 'ruby-2.0.0-p0'

set :user, "deployer"
set :application, "myapp"
set :deploy_to, "/home/#{user}/apps/#{application}"

set :bundle_dir, "/home/#{user}/.rvm/gems/ruby-2.0.0-p0"

server "XX.XXX.XXX.XXX", :web, :app, :db, primary: true

set :use_sudo, false

set :deploy_via, :copy
set :repository, "."

set :copy_exclude, %w[.git log tmp .DS_Store]
set :scm, :none

default_run_options[:pty] = true

after "deploy", "deploy:cleanup" # keep only the last 5 releases

namespace :deploy do
  task :start do
    ;
  end
  task :stop do
    ;
  end
  task :restart, roles: :app, except: {no_release: true} do
    run "touch #{deploy_to}/current/tmp/restart.txt"
  end
end

Any idea?

Thanks

Edit: Just checked and my disk space is full. Obviously this is my problem. An after update hook to prevent this?

役に立ちましたか?

解決

From the comments:

  • check available disk space on the server for /tmp

    df /tmp

  • free up space if necessary

  • alternatively configure capistrano to use a different folder to deploy to (How do I change the temporary directory that Capistrano uses?)

  • you may want to look at removing old releases if you are not already doing so

    cap deploy:cleanup

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top