前提・実現したいこと
以下の記事を参考にデプロイを進めて参りました。
https://qiita.com/Tatsu88/items/ab5d4927bbfade959c1c
発生している問題・エラーメッセージ
bundle exec cap production deployを打ち込んだ後、
#<Thread:0x00007fbb301c65e0@/Users/名前/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sshkit-1.21.2/lib/sshkit/runners/parallel.rb:10 run> terminated with exception (report_on_exception is true): Traceback (most recent call last): 17: from /Users/名前/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sshkit-1.21.2/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute' 16: from /Users/名前/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sshkit-1.21.2/lib/sshkit/backends/abstract.rb:31:in `run' 15: from /Users/名前/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sshkit-1.21.2/lib/sshkit/backends/abstract.rb:31:in `instance_exec' 14: from /Users/名前/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/capistrano-rbenv-2.2.0/lib/capistrano/tasks/rbenv.rake:10:in `block (3 levels) in <top (required)>' 13: from /Users/名前/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sshkit-1.21.2/lib/sshkit/backends/abstract.rb:61:in `test' 12: from /Users/名前/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sshkit-1.21.2/lib/sshkit/backends/abstract.rb:148:in `create_command_and_execute' 11: from /Users/名前/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sshkit-1.21.2/lib/sshkit/backends/abstract.rb:148:in `tap' 10: from /Users/名前/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sshkit-1.21.2/lib/sshkit/backends/abstract.rb:148:in `block in create_command_and_execute' 9: from /Users/名前/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sshkit-1.21.2/lib/sshkit/backends/netssh.rb:130:in `execute_command' 8: from /Users/名前/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sshkit-1.21.2/lib/sshkit/backends/netssh.rb:177:in `with_ssh' 7: from /Users/名前/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sshkit-1.21.2/lib/sshkit/backends/connection_pool.rb:63:in `with' 6: from /Users/名前/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sshkit-1.21.2/lib/sshkit/backends/connection_pool.rb:63:in `call' 5: from /Users/名前/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/net-ssh-6.1.0/lib/net/ssh.rb:251:in `start' 4: from /Users/名前/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/net-ssh-6.1.0/lib/net/ssh.rb:251:in `new' 3: from /Users/名前/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/net-ssh-6.1.0/lib/net/ssh/transport/session.rb:73:in `initialize' 2: from /Users/名前/.rbenv/versions/2.6.5/lib/ruby/2.6.0/socket.rb:631:in `tcp' 1: from /Users/名前/.rbenv/versions/2.6.5/lib/ruby/2.6.0/socket.rb:227:in `foreach' /Users/名前/.rbenv/versions/2.6.5/lib/ruby/2.6.0/socket.rb:227:in `getaddrinfo': getaddrinfo: nodename nor servname provided, or not known (SocketError) 1: from /Users/名前/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sshkit-1.21.2/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute' /Users/名前/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sshkit-1.21.2/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute': Exception while executing as ec2-user@IPアドレス : getaddrinfo: nodename nor servname provided, or not known (SSHKit::Runner::ExecuteError) (Backtrace restricted to imported tasks) cap aborted! SSHKit::Runner::ExecuteError: Exception while executing as ec2-user@IPアドレス : getaddrinfo: nodename nor servname provided, or not known Caused by: SocketError: getaddrinfo: nodename nor servname provided, or not known Tasks: TOP => rbenv:validate (See full trace by running task with --trace)
上記のエラーが出ました。
試したこと
以下の記事を参考に.ssh鍵を変更しましたが変化はありませんでした。
https://qiita.com/d_nagano1002/items/ae4a916a8532f08ade86
その他ご存知の方がいらっしゃいましたら、ご教授お願いします。
補足情報(FW/ツールのバージョンなど)
capistrano 3.1
rails 6.0.3.4
ruby 2.6.5p114
追記
仮説
・ExecuteError
SSHKit::Runner::ExecuteError: Exception while executing as ec2-user@IPアドレス : getaddrinfo: nodename nor servname provided, or not known
・SocketError
SocketError: getaddrinfo: nodename nor servname provided, or not known
上記二つのエラーに共通しているもの
・getaddrinfo: nodename nor servname provided, or not known
訳: getaddrinfo:nodenameまたはservnameが提供されているか、不明
つまり、nodenameまたはservnameというものがおかしい?
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2021/04/13 09:43