Temporary failure in name resolution

0

I am trying to run a flask application on my ec2 instance. My application uses dropbox api's for meta data. However when I try to request for the meta data. The system throws an error File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 169, in _ne> conn = connection.create_connection( File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 73, in> for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): File "/usr/lib/python3.10/socket.py", line 955, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -3] Temporary failure in name resolution

Which on further investigation, I have found is a DNS issue. But I haven't change the DNS configuration, so it is on the default DNS configuration, which comes when you set an ec2 instance. Which bring me to the question, doesnt the aws ec2 instance DNS have dropbox address?

Josh
質問済み 1ヶ月前128ビュー
1回答
0

Hi THere

THis doesn't sound like a DNS issue but more like an internet connectivity issue. Do you have an Internet Gateway or NAT Gateway attached to your VPC? Can you test connectivity from the EC2 instance with a basic test? Try to run the command

ping 8.8.8.8 and you should get a reply similar to:

PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=115 time=1.90 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=115 time=1.54 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=115 time=1.47 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=115 time=1.44 ms
^C^C
--- 8.8.8.8 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 1.444/1.589/1.903/0.184 ms

See https://repost.aws/knowledge-center/ec2-connect-internet-gateway

profile pictureAWS
エキスパート
Matt-B
回答済み 1ヶ月前
profile picture
エキスパート
レビュー済み 1ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ