capistrano 未重新启动、停止但更新正在运行
我最近更换了机器,并且在更新 Rails 时遇到了一些困难。服务器本身保持原样。一切似乎都很好,但卡皮斯特拉诺却不然。当我进行更改并更新 SVN 时,运行
cap deploy
正确的新版本的存储库会放置在服务器上。运行 capistrano 的终端中的日志记录没有显示任何异常,但显然实际上没有重新启动,因为服务器继续运行。运行
cap deploy:restart
产生
Dans-iMac:rebuild apple$ cap deploy:restart
* executing `deploy:restart'
* executing `accelerator:smf_restart'
* executing `accelerator:smf_stop'
* executing "sudo -p 'sudo password: ' svcadm disable /network/mongrel/urbanistica-production"
servers: ["www.urbanisti.ca"]
Password:
[www.urbanisti.ca] executing command
command finished
* executing `accelerator:smf_start'
* executing "sudo -p 'sudo password: ' svcadm enable -r /network/mongrel/urbanistica-production"
servers: ["www.urbanisti.ca"]
[www.urbanisti.ca] executing command
command finished
* executing `accelerator:restart_apache'
* executing "sudo -p 'sudo password: ' svcadm refresh svc:/network/http:cswapache2"
servers: ["www.urbanisti.ca"]
[www.urbanisti.ca] executing command
command finished
但没有发生明显的变化。可能发生了什么?服务器上的 Mongrel 日志显示没有任何变化:它仍在运行更新之前的旧版本。
I recently changed machines, and had a few rough spots updating Rails. The server itself stayed as it was. Everything seemed to be fine, but not capistrano. When I make changes and update SVN, running
cap deploy
the correct new version of the repository is placed on the server. The logging in the terminal running capistrano shows nothing out of the ordinary, but evidently no restart actually takes place because the server continues to run. Running
cap deploy:restart
Produces
Dans-iMac:rebuild apple$ cap deploy:restart
* executing `deploy:restart'
* executing `accelerator:smf_restart'
* executing `accelerator:smf_stop'
* executing "sudo -p 'sudo password: ' svcadm disable /network/mongrel/urbanistica-production"
servers: ["www.urbanisti.ca"]
Password:
[www.urbanisti.ca] executing command
command finished
* executing `accelerator:smf_start'
* executing "sudo -p 'sudo password: ' svcadm enable -r /network/mongrel/urbanistica-production"
servers: ["www.urbanisti.ca"]
[www.urbanisti.ca] executing command
command finished
* executing `accelerator:restart_apache'
* executing "sudo -p 'sudo password: ' svcadm refresh svc:/network/http:cswapache2"
servers: ["www.urbanisti.ca"]
[www.urbanisti.ca] executing command
command finished
But no evident change takes place. What might be going on? The Mongrel log on the server shows no changes whatever: it's still running the older version that predates the update.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题似乎出在您的自定义(或者至少是非内置)重新启动任务中。正在调用的任务
accelerator:smf_restart
以及关联的smf_stop
和smf_start
任务不属于标准 Capistrano 套件的一部分。这些任务是您自己编写的还是来自 Capistrano 扩展?如果是的话,什么扩展名?如果您可以发布该扩展的链接,或者发布您自己编写的 Capfile,这将帮助人们更具体地找出问题所在。
The problem would seem to be in your custom (or, at least non-built-in) restart task. The task
accelerator:smf_restart
, and associatedsmf_stop
andsmf_start
tasks, that are being called are not part of the standard Capistrano suite. Did you write those tasks yourself or are they from a Capistrano extension? If so, what extension?If you can post a link to that extension, or post your Capfile if you wrote them youself, that would help people figuring out more specifically what's going wrong.