4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

EC2名前解決できない時の解消方法

Last updated at Posted at 2019-08-05

Could not resolve hostname ~~~.com: Temporary failure in name resolution の解消方法

エラー内容

ubuntu@~~~ $ git pull origin development
:
:
Could not resolve hostname ~~~.com: Temporary failure in name resolution

とりあえず、「名前解決できないよ」といったエラー。

解決法方

Resolve.confにnameserverを追加する。

ubuntu@~~$ sudo vi /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.
nameserver 8.8.8.8 #name serverを追加
```

ひとまずgoogleのname serverを設定したら名前解決してくれました。
ちなみにEC2のデフォルトのname serverってどこなんだろう。

### メモ
[EC2インスタンスから名前解決ができない問題](http://txclr.hatenablog.com/entry/2015/05/12/135848)

`ping` `nslookup` コマンドを試しても、EC2はデフォルトでpingコマンドを叩けなかったので、少し解消まで時間かかってしまった。。
4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?