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
demandé il y a un mois128 vues
1 réponse
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
EXPERT
Matt-B
répondu il y a un mois
profile picture
EXPERT
vérifié il y a un mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions