I am seeing an odd error (at least odd to me, and I have spent a good portion of the day trying to figure this out to no avail:
I run on local: cap production deploy
Deployment starts, but at deploy:migrate, I have an issue:
00:31 deploy:migrate [deploy:migrate] Run `rake db:migrate` 00:31 deploy:migrating 01 $HOME/.rbenv/bin/rbenv exec bundle exec rake db:migrate 01 rake aborted! 01 PG::ConnectionBad: could not connect to server: Connection refused 01 Is the server running on host "220.127.116.11" and accepting 01 TCP/IP connections on port 5432? ... ... #<Thread:0x00007fc18a23b8a8@/Users/BryanBeshore/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/sshkit-1.18.2/lib/sshkit/runners/parallel.rb:10 run> terminated with exception (report_on_exception is true): Traceback (most recent call last): 1: from /Users/BryanBeshore/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/sshkit-1.18.2/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute' /Users/BryanBeshore/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/sshkit-1.18.2/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute': Exception while executing as firstname.lastname@example.org: rake exit status: 1 (SSHKit::Runner::ExecuteError) rake stdout: Nothing written rake stderr: rake aborted! PG::ConnectionBad: could not connect to server: Connection refused Is the server running on host "18.104.22.168" and accepting TCP/IP connections on port 5432?
Ok. I am ... an idiot unless I have 5-cups of coffee in me and I take breaks after 10+hrs staring at a computer monitor.
I had two setups for the following when I should have only had one. One was directed to: myapp (literal) and myapp (my actual app). And I directed the IP to my actual IP address instead of 127.0.0.1
Thanks for the workaround. Worked for me.