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.
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.