New Ubuntu EC2 instance do not work in EU-NORTH-1

0

I create a brand new ec2 instance and when doing apt update it keeps timing out. I allow all outbound traffic in the security group and have other ec2 instances that seams to be working fine. Any one have any ide ? /etc/reslove.conf nameserver 127.0.0.53 options edns0 trust-ad search eu-north-1.compute.internal

Looks the same as the working ec2 instances. But still this happens.

sudo apt update Ign:1 http://security.ubuntu.com/ubuntu jammy-security InRelease Ign:2 http://eu-north-1.ec2.archive.ubuntu.com/ubuntu jammy InRelease Ign:3 http://eu-north-1.ec2.archive.ubuntu.com/ubuntu jammy-updates InRelease Ign:4 http://eu-north-1.ec2.archive.ubuntu.com/ubuntu jammy-backports InRelease Ign:1 http://security.ubuntu.com/ubuntu jammy-security InRelease Ign:2 http://eu-north-1.ec2.archive.ubuntu.com/ubuntu jammy InRelease Ign:3 http://eu-north-1.ec2.archive.ubuntu.com/ubuntu jammy-updates InRelease Ign:4 http://eu-north-1.ec2.archive.ubuntu.com/ubuntu jammy-backports InRelease Ign:1 http://security.ubuntu.com/ubuntu jammy-security InRelease Ign:2 http://eu-north-1.ec2.archive.ubuntu.com/ubuntu jammy InRelease Ign:3 http://eu-north-1.ec2.archive.ubuntu.com/ubuntu jammy-updates InRelease Ign:4 http://eu-north-1.ec2.archive.ubuntu.com/ubuntu jammy-backports InRelease Err:1 http://security.ubuntu.com/ubuntu jammy-security InRelease Cannot initiate the connection to security.ubuntu.com:80 (2620:2d:4000:1::16). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2620:2d:4000:1::19). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Could not connect to security.ubuntu.com:80 (91.189.91.38), connection timed out Could not connect to security.ubuntu.com:80 (91.189.91.39), connection timed out Could not connect to security.ubuntu.com:80 (185.125.190.36), connection timed out Could not connect to security.ubuntu.com:80 (185.125.190.39), connection timed out. Err:2 http://eu-north-1.ec2.archive.ubuntu.com/ubuntu jammy InRelease Could not connect to eu-north-1.ec2.archive.ubuntu.com:80 (34.253.229.19), connection timed out Could not connect to eu-north-1.ec2.archive.ubuntu.com:80 (34.253.189.82), connection timed out Could not connect to eu-north-1.ec2.archive.ubuntu.com:80 (54.229.225.193), connection timed out Could not connect to eu-north-1.ec2.archive.ubuntu.com:80 (54.229.116.227), connection timed out Could not connect to eu-north-1.ec2.archive.ubuntu.com:80 (34.241.117.189), connection timed out Could not connect to eu-north-1.ec2.archive.ubuntu.com:80 (54.246.214.20), connection timed out Err:3 http://eu-north-1.ec2.archive.ubuntu.com/ubuntu jammy-updates InRelease Unable to connect to eu-north-1.ec2.archive.ubuntu.com:http: Err:4 http://eu-north-1.ec2.archive.ubuntu.com/ubuntu jammy-backports InRelease Unable to connect to eu-north-1.ec2.archive.ubuntu.com:http: Reading package lists... Done Building dependency tree... Done Reading state information... Done All packages are up to date. W: Failed to fetch http://eu-north-1.ec2.archive.ubuntu.com/ubuntu/dists/jammy/InRelease Could not connect to eu-north-1.ec2.archive.ubuntu.com:80 (34.253.229.19), connection timed out Could not connect to eu-north-1.ec2.archive.ubuntu.com:80 (34.253.189.82), connection timed out Could not connect to eu-north-1.ec2.archive.ubuntu.com:80 (54.229.225.193), connection timed out Could not connect to eu-north-1.ec2.archive.ubuntu.com:80 (54.229.116.227), connection timed out Could not connect to eu-north-1.ec2.archive.ubuntu.com:80 (34.241.117.189), connection timed out Could not connect to eu-north-1.ec2.archive.ubuntu.com:80 (54.246.214.20), connection timed out W: Failed to fetch http://eu-north-1.ec2.archive.ubuntu.com/ubuntu/dists/jammy-updates/InRelease Unable to connect to eu-north-1.ec2.archive.ubuntu.com:http: W: Failed to fetch http://eu-north-1.ec2.archive.ubuntu.com/ubuntu/dists/jammy-backports/InRelease Unable to connect to eu-north-1.ec2.archive.ubuntu.com:http: W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/jammy-security/InRelease Cannot initiate the connection to security.ubuntu.com:80 (2620:2d:4000:1::16). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2620:2d:4000:1::19). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Could not connect to security.ubuntu.com:80 (91.189.91.38), connection timed out Could not connect to security.ubuntu.com:80 (91.189.91.39), connection timed out Could not connect to security.ubuntu.com:80 (185.125.190.36), connection timed out Could not connect to security.ubuntu.com:80 (185.125.190.39), connection timed out W: Some index files failed to download. They have been ignored, or old ones used instead.

Jimmy
asked 10 months ago402 views
3 Answers
0
Accepted Answer

Hi,

If it seems good to you, I leave you some questions to collect more information about your problem and thus be able to give you a solution.

  • Is this new EC2 deployed in the same VPC and subnet as the rest of EC2 that works correctly?
  • If not, does the VPC have an Internet Gateway attached that allows access to the Internet?
  • In case the subnet is public, does it have route table that directs internet-bound traffic to the internet gateway?
  • In case the subnet is private, does it subnet have route table that directs internet-bound traffic to a NAT gateway located at the public subnet?
profile picture
EXPERT
answered 10 months ago
  • Found the issue, the instance was deployed on a public subnet but it didn't get any ip address for some reason. But now it work when it has bin assigned a ip. Thanks all for the help.

0

Is port 80 ever blocked in network ACLs?
I want to make sure that port 80 is not blocked first, since the repository access via http is timing out.

profile picture
EXPERT
answered 10 months ago
  • Looking at the settings in the image, it looks fine. What about going through a proxy server as another way to deal with the problem? If I create one proxy server such as squid on EC2 and apt update via proxy, will it succeed? http://www.squid-cache.org/Doc/
    The apt update proxy should be configured as follows.

    export http_proxy=http://EC2 Proxy Server IP:3128
    export https_proxy=http://EC2 Proxy Server IP:3128
    sudo apt update  -y -o Acquire::http::Proxy=$http_proxy -o Acquire::https::Proxy=$https_proxy
    
0

As far as i can see it should be ok. Enter image description here

Enter image description here

Jimmy
answered 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions