Capistrano gzip: stdin: unexpected end of file interruption

I have a problem deploying Capistrano. The deployment process is reset with a Gzip error.

What could 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 
+6
source share
2 answers

The answer here is if you or others trying to deploy locally still encounter this problem: 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" tries to unzip and delete temporary copy at the same time.

The solution is to define local / remote copy directories on the same computer:

 set :copy_dir, "/home/#{local_user}/tmp" set :remote_copy_dir, "/tmp" 
+10
source

This is usually 1 out of 3 things:

  • bad / corrupt gzip file
  • trying to extract a file as opposed to how it was packed
  • microsoft line ends in your application files (\ r \ n)

my money is on the third.

0
source

Source: https://habr.com/ru/post/904239/


All Articles