error apt-get update no Ubuntu na AWS

0

When I run apt-get update it gives the following error:

Err:1 http://archive.ubuntu.com/ubuntu focal InRelease Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2620:2d:4000:1::16). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2620:2d:4000:1::19). - connect (101: Network is unreachable) Could not connect to archive.ubuntu.com:80 (91.189.91.39), connection timed out Could not connect to archive.ubuntu.com:80 (185.125.190.36), connection timed out Could not connect to archive.ubuntu.com:80 (185.125.190.39), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.91.38), connection timed out Reading package lists... Done W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/InRelease Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2620:2d:4000:1::16). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2620:2d:4000:1::19). - connect (101: Network is unreachable) Could not connect to archive.ubuntu.com:80 (91.189.91.39), connection timed out Could not connect to archive.ubuntu.com:80 (185.125.190.36), connection timed out Could not connect to archive.ubuntu.com:80 (185.125.190.39), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.91.38), connection timed out W: Some index files failed to download. They have been ignored, or old ones used instead.

Please, I already checked all the security part and I didn't find anything that could be preventing the connection, I need help.

已提問 1 年前檢視次數 1556 次
7 個答案
1

Based on your output it appears DNS is working. Have you tried this and used the suggestions to troubleshoot yet? If not I'd give that a shot.

AWS
已回答 1 年前
0

I've already used the tips check the subnets route table and it's correct apparently I'm likely to ping websites meaning I have internet access, I'm only able to use apt-get update

已回答 1 年前
  • Can you do a curl or wget on an external website over port 80?

  • This is what was generated using wget

    --2023-04-27 16:04:09-- http://www.google.com/ Resolving www.google.com (www.google.com)... 172.253.115.99, 172.253.115.103, 172.253.115.104, ... Connecting to www.google.com (www.google.com)|172.253.115.99|:80...

    curl did not generate any results. However, port 80 is included in the input and output security rules for ipv4 and ipv6

  • Are any NACLs assigned to the subnet? Can you post a screen shot of the SG rules as well as any NACLs?

  • Follow the requested captures to verify

  • The SGs and NACLs look as if they should allow your calls. At this point I would boot up another generic Ubuntu in the same subnet with a SG that allows all outbound traffic and see if it can download the patches. If successful, this eliminates any routing and NACL issues and points to SG or something local on the server.

0

I would check the route table associated with the subnet hosting the instance. You will need a route to either an Internet Gateway or a NAT Gateway in your public subnet.

profile pictureAWS
專家
kentrad
已回答 1 年前
0

Enter image description here
Enter image description here
Enter image description here
Enter image description here

已回答 1 年前
0

Enter image description here

已回答 1 年前
0

Enter image description here

已回答 1 年前
0

Enter image description here

已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南