capistrano: deploy gets stuck and doesn't print anything
Steps to reproduce
cap production deploy
and that’s it, just gets stuck forever until I abort it
Expected behavior
- Capistrano must to print a TimeOut error log or something else when it doesn’t connect to server
Actual behavior
When I run: cap production deploy it shows nothing, just keeps waiting
But when I run: cap production deploy --trace it shows this:
** Invoke production (first_time)
** Execute production
** Invoke load:defaults (first_time)
** Execute load:defaults
** Invoke rbenv:validate (first_time)
** Execute rbenv:validate
System configuration
https://gist.github.com/anyelopetit/7320fc8141554ea4b75ec88bb02f8132
About this issue
- Original URL
- State: open
- Created 4 years ago
- Comments: 18 (9 by maintainers)
Yes @anyelopetit please follow up with us when you track down what was causing the freeze. There may be something capistrano can do better in terms of error messaging.
My assumption is that
rbenv:validateis the very first task that actually requires an SSH connection to the remote host, and that SSH connection is failing to open. You could try changing the connection timeout to see if that changes anything.We probably can’t help you fix the reason for the timeout (that is likely due to a firewall between you and the remote host, or an incorrect port number). But we may be able to improve capistrano to provide better error messaging, or maybe a more reasonable default timeout so capistrano doesn’t appear to hang indefinitely.