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
질문됨 한 달 전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
답변함 한 달 전
profile picture
전문가
검토됨 한 달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠