Я пытаюсь выполнить развертывание на нашем новом производственном сервере. Capistrano SSH на сервере работает, но IP-адрес, указанный ниже в выходных данных терминала, является IP-адресом, который мы больше не используем, и его нигде нет в нашей установке Rails (мы повторили все файлы).
Как мне заставить Capistrano прекратить попытки доступа к этому IP-адресу? Откуда это вообще? Существует ли кеш Capistrano, в котором может храниться этот адрес?
Терминальный выход
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as [email protected]: Net::SSH::ConnectionTimeout
Caused by:
Net::SSH::ConnectionTimeout: Net::SSH::ConnectionTimeout
Tasks: TOP => rvm:hook => passenger:rvm:hook => passenger:test_which_passenger
Выход журнала Capistrano
INFO START 2018-08-17 18:20:21 -0600 cap production doctor
INFO ---------------------------------------------------------------------------
DEBUG [0244ff8e] Running /usr/bin/env which passenger as [email protected]
DEBUG [e9aebdc9] Running /usr/bin/env which passenger as [email protected]
DEBUG [0244ff8e] Command: ( export RVM_BIN_PATH = "~/.rvm/bin" ; /usr/bin/env which passenger )
DEBUG [e9aebdc9] Command: ( export RVM_BIN_PATH = "~/.rvm/bin" ; /usr/bin/env which passenger )
deploy.rb
# config valid for current version and patch releases of Capistrano
lock "~> 3.10.0"
set :application, "<omitted>"
set :repo_url, "ssh://<omitted>"
# Default branch is :master
# ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp
# Default deploy_to directory is /var/www/my_app_name
set :deploy_to, "/home/vadmin/<omitted>"
# Default value for :format is :airbrussh.
# set :format, :airbrussh
# You can configure the Airbrussh format using :format_options.
# These are the defaults.
# set :format_options, command_output: true, log_file: "log/capistrano.log", color: :auto, truncate: :auto
# Default value for :pty is false
# set :pty, true
# Default value for :linked_files is []
append :linked_files, "config/database.yml", "config/secrets.yml"
# Default value for linked_dirs is []
append :linked_dirs, 'log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'vendor/bundle', '.bundle', 'public/system', 'public/uploads'
# Default value for default_env is {}
# set :default_env, { path: "/opt/ruby/bin:$PATH" }
set :default_env, { rvm_bin_path: '~/.rvm/bin' }
# Default value for local_user is ENV['USER']
# set :local_user, -> { `git config user.name`.chomp }
# Default value for keep_releases is 5
set :keep_releases, 10
# set migration role to :app instead of :db
set :migration_role, :app
# Uncomment the following to require manually verifying the host key before first deploy.
# set :ssh_options, verify_host_key: :secure
production.rb
# server-based syntax
# ======================
# Defines a single server with a list of roles and multiple properties.
# You can define all roles on a single server, or split them:
server "15.153.1.30", user: "vadmin", roles: %w{app db web}
# server "example.com", user: "deploy", roles: %w{app web}, other_property: :other_value
# server "db.example.com", user: "deploy", roles: %w{db}
set :stage, :production
# role-based syntax
# ==================
# Defines a role with one or multiple servers. The primary server in each
# group is considered to be the first unless any hosts have the primary
# property set. Specify the username and a domain or IP for the server.
# Don't use `:all`, it's a meta role.
# role :app, %w{[email protected]}, my_property: :my_value
# role :web, %w{[email protected] [email protected]}, other_property: :other_value
# role :db, %w{[email protected]}
# Configuration
# =============
# You can set any configuration variable like in config/deploy.rb
# These variables are then only loaded and set in this stage.
# For available Capistrano configuration variables see the documentation page.
# http://capistranorb.com/documentation/getting-started/configuration/
# Feel free to add new variables to customise your setup.
# Custom SSH Options
# ==================
# You may pass any option but keep in mind that net/ssh understands a
# limited set of options, consult the Net::SSH documentation.
# http://net-ssh.github.io/net-ssh/classes/Net/SSH.html#method-c-start
#
# Global options
# --------------
# set :ssh_options, {
# keys: %w(/home/rlisowski/.ssh/id_rsa),
# forward_agent: false,
# auth_methods: %w(password)
# }
#
# The server-based syntax can be used to override options:
# ------------------------------------
# server "example.com",
# user: "user_name",
# roles: %w{web app},
# ssh_options: {
# user: "user_name", # overrides user setting above
# keys: %w(/home/user_name/.ssh/id_rsa),
# forward_agent: false,
# auth_methods: %w(publickey password)
# # password: "please use keys"
# }
драгоценные камни
gem 'capistrano', '~> 3.10'
gem 'capistrano-rails', '~> 1.3'
gem 'capistrano-rvm'
gem 'capistrano-passenger'





Вам нужно найти этот каталог на вашем сервере cached_repo и удалить его. Этот каталог будет создан при следующем развертывании.
В капистрано 3
Вы должны удалить этот $deploy_to/repo