IP Address change - cap using old address

46 views
Skip to first unread message

paul h

unread,
Dec 1, 2015, 10:22:02 AM12/1/15
to Capistrano
Versions:
  • Ruby 1.9.3
  • Capistrano 3.1.0
  • Rake / Rails  (10.3.2 / 4.1.0)
Platform:
  • Working on.... OS X 10.11.1
  • Deploying to... Centos 5
Hi,

I have a Centos server running in my office with a rails 4 app. As a result of changes to all my comms equipment and local network, the server is now on a different IP Address.

I have updated the IP Address in config/deploy.rb and config/deploy/production.rb. However, when I attempt to deploy, I now get the following error (192.168.1.105 is the old incorrect IP Address):


DEBUG [47f030ab]        ssh: connect to host 192.168.1.105 port 22: Connection timed out
DEBUG [47f030ab]        fatal: Could not read from remote repository.

DEBUG [47f030ab]  

DEBUG [47f030ab]        Please make sure you have the correct access rights

DEBUG [47f030ab]     and the repository exists.

DEBUG [47f030ab]      error: Could not fetch origin


I've reset all my remotes in git, and can push and pull fine from origin.


So, my question is: where is capistrano getting the reference to the incorrect ip address above (192.168.1.105)?


I've done a search of all my files for the rails app and can't find 192.168.1.105 defined anywhere so was wondering where this is coming from, because I can no longer deploy until this is fixed.


Many Thanks


Paul


paul h

unread,
Dec 1, 2015, 10:45:14 AM12/1/15
to Capistrano
Fixed it.

Cap was using a definition on my server that isn't updated when I update the IP Addresses locally on my dev machine. 

In case anyone else comes across this, the IP address that required updating was at:

/var/www/app_name/repo/config

So hope this helps someone else.

Paul

Lee Hambley

unread,
Dec 1, 2015, 12:36:40 PM12/1/15
to Capistrano

Hi Paul the reference is in the cached repository that Cap uses to speed up deployments. Log into your server and look for a directory in, or near your deploy_to directory called something like cached_repo and delete it, it'll come back on next deploy with new references.

--
You received this message because you are subscribed to the Google Groups "Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capistrano+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/45a3a732-ee20-4a79-a5eb-dc73244199a2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages