简体   繁体   English

Capistrano和EC2:sh:1:杀死失败

[英]Capistrano and EC2: sh: 1: kill FAILED

I am trying to deploy new code to Amazon EC2 instance with using capistrano and suddenly, I got this error: 我试图使用capistrano将新代码部署到Amazon EC2实例,突然,我收到此错误:

servers: ["IP"]
[IP] executing command
*** [err :: IP] cat:
*** [err :: IP] /home/deployer/fileto/current/tmp/pids/unicorn.pid
*** [err :: IP] : No such file or directory
*** [err :: IP]
*** [err :: IP] sh: 1: kill:
*** [err :: IP] Usage: kill [-s sigspec | -signum | -sigspec] [pid | job]... or
*** [err :: IP] kill -l [exitstatus]
*** [err :: IP]
    command finished in 371ms
failed: "sh -c 'kill -s USR2 `cat /home/deployer/project_name/current/tmp/pids/unicorn.pid`'" on IP

Two hours ago I deployed code successfully, but now I when I try it, I get this error message. 两个小时前,我成功地部署了代码,但是现在当我尝试它时,收到了此错误消息。

What happened with the instance and the whole deployment process if 2 hours ago was everything working well? 如果2个小时前一切正常,实例和整个部署过程会怎样?

EDIT: When I run 编辑:当我运行

kill -s USR2 cat /home/deployer/fileto/current/tmp/pids/unicorn.pid 杀死-s USR2 cat /home/deployer/fileto/current/tmp/pids/unicorn.pid

I get 我懂了

cat: /home/deployer/fileto/current/tmp/pids/unicorn.pid: No such file or directory
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]

Is this an error condition that needs to stop deployment? 这是需要停止部署的错误情况吗? You can add || 您可以添加|| true to the end of the kill command, add :on_error => continue to the task, or prefix with [ -d /home/deployer/fileto/current/tmp/pids/unicorn.pid ] before the kill command. 在kill命令的末尾返回true,请在任务前添加:on_error =>继续,或在[kill -d /home/deployer/fileto/current/tmp/pids/unicorn.pid]之前添加前缀。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM