I have a problem with Capistrano deployment. Deployment process is being dropped with error of Gzip.
What can it be?
cap flow deploy
* executing `flow'
* executing `deploy'
* executing `deploy:update'
** transaction: start
* executing `deploy:update_code'
* getting (via checkout)
revision to /tmp/20111214204507
executing locally: cp -R . /tmp/20111214204507
c ommand finished in 413ms
compressing /tmp/20111214204507 to /tmp/20111214204507.tar.gz
executing locally: tar chzf 20111214204507.tar.gz 20111214204507
command finished in 2419ms
servers: ["10.11.10.10"]
Password: ** sftp upload /tmp/20111214204507.tar.gz -> /tmp/20111214204507.tar.gz
[10.11.10.10] /tmp/20111214204507.tar.gz
[10.11.10.10] done * sftp upload complete * executing "cd /home/tieto/dvs_production/releases && tar xzf /tmp/20111214204507.tar.gz && rm /tmp/20111214204507.tar.gz"
servers: ["10.11.10.10"]
[10.11.10.10] executing command
[err :: 10.11.10.10]
[err :: 10.11.10.10] gzip:
[err :: 10.11.10.10] stdin: unexpected end of file
[err :: 10.11.10.10] tar:
[err :: 10.11.10.10] Child returned status 1
[err :: 10.11.10.10]
[err :: 10.11.10.10] tar:
[err :: 10.11.10.10] Error exit delayed from previous errors
[err :: 10.11.10.10]
command finished in 62ms
[deploy:update_code] rolling back * executing "rm -rf /home/flow/production/releases/20111214204507; true"
servers: ["10.11.10.10"]
[10.11.10.10] executing command
command finished in 69ms
failed: "sh -c 'cd /home/flow/production/releases && tar xzf /tmp/20111214204507.tar.gz && rm /tmp/20111214204507.tar.gz'" on 10.11.10.10
The answer is herein, if you are or others attempting a local deployment are still having this issue: http://f3internet.com/articles/2010/06/18/deploying-static-sites-with-capistrano/
This line [10.11.10.10] done * sftp upload complete * executing "cd /home/tieto/dvs_production/releases && tar xzf /tmp/20111214204507.tar.gz && rm /tmp/20111214204507.tar.gz"
is attempting to unzip and delete the temporary copy at the same time.
The solution is to define local/remote copy directories on the same machine:
set :copy_dir, "/home/#{local_user}/tmp"
set :remote_copy_dir, "/tmp"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With