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
gefragt vor einem Monat129 Aufrufe
1 Antwort
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
EXPERTE
Matt-B
beantwortet vor einem Monat
profile picture
EXPERTE
überprüft vor einem Monat

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen