amazon-linux-2023
amazon-linux-2023 copied to clipboard
[Bug] - Errors during downloading metadata for repository 'amazonlinux'
Describe the bug When I use CloudFormation/cloud-init to install packages on an AL2022 AMI, I frequently encounter errors.
To Reproduce Steps to reproduce the behavior:
- Create CF template where the UserData/cloud-config section specifies the list of packages to install e.g.
packages:
- wget
- git
- gcc
- make
- perf
- python
- Launch an instance using ami-04a0a1bfbe6cb2189
- After the instance is created, review logs using journalctl
- See error:
cloud-init[4858]: Amazon Linux 2022 repository 0.0 B/s | 0 B 03:02
cloud-init[4858]: Errors during downloading metadata for repository 'amazonlinux':
cloud-init[4858]: - Curl error (28): Timeout was reached for https://al2022-repos-us-east-2-9761ab97.s3.dualstack.us-east-2.amazonaws.com/core/mirrors/2022.0.20220531/x86_64/mirror.list [Failed to connect to al2022-repos-us-east-2-9761ab97.s3.dualstack.us-east-2.amazonaws.com port 443 after 15201 ms: Connection timed out]
cloud-init[4858]: - Curl error (28): Timeout was reached for https://al2022-repos-us-east-2-9761ab97.s3.dualstack.us-east-2.amazonaws.com/core/mirrors/2022.0.20220531/x86_64/mirror.list [Failed to connect to al2022-repos-us-east-2-9761ab97.s3.dualstack.us-east-2.amazonaws.com port 443 after 15202 ms: Connection timed out]
cloud-init[4858]: - Curl error (28): Timeout was reached for https://al2022-repos-us-east-2-9761ab97.s3.dualstack.us-east-2.amazonaws.com/core/mirrors/2022.0.20220531/x86_64/mirror.list [Failed to connect to al2022-repos-us-east-2-9761ab97.s3.dualstack.us-east-2.amazonaws.com port 443 after 15200 ms: Connection timed out]
cloud-init[4858]: Error: Failed to download metadata for repo 'amazonlinux': Cannot prepare internal mirrorlist: Curl error (28): Timeout was reached for https://al2022-repos-us-east-2-9761ab97.s3.dualstack.us-east-2.amazonaws.com/core/mirrors/2022.0.20220531/x86_64/mirror.list [Failed to connect to al2022-repos-us-east-2-9761ab97.s3.dualstack.us-east-2.amazonaws.com port 443 after 15200 ms: Connection timed out]
cloud-init[4858]: Ignoring repositories: amazonlinux
cloud-init[4858]: Package wget-1.21.2-2.amzn2022.x86_64 is already installed.
cloud-init[4858]: No match for argument: git
cloud-init[4858]: Package gcc-11.3.1-2.amzn2022.0.2.x86_64 is already installed.
cloud-init[4858]: Package make-1:4.3-5.amzn2022.x86_64 is already installed.
cloud-init[4858]: No match for argument: perf
cloud-init[4858]: No match for argument: python
cloud-init[4858]: Error: Unable to find a match: git perf python
Expected behavior All packages should be installed without error