amazonlinux / amazon-linux-2023

Amazon Linux 2023
https://aws.amazon.com/linux/amazon-linux-2023/
Other
500 stars 37 forks source link

Amazon linux 2023: 403 Errors during downloading metadata for repository 'amazonlinux' #710

Open gowgopal83 opened 2 months ago

gowgopal83 commented 2 months ago

Describe the bug

We have installed the Amazon-linux-2023 on the vSphere VM and tried to install some of the packages that are failing with the status code 403 for the amazonlinux repo.

To Reproduce Steps to reproduce the behavior:

  1. Install the AL2023 on the Vmware Vsphere VM.
  2. install any package using the dnf install

Expected behavior

amazonlinux repo is accessible and allows the installation of the packages.

Error and details

[root@al2023-temp-hop ~]# cat /etc/amazon-linux-release
Amazon Linux release 2023.4.20240416 (Amazon Linux)
[root@al2023-temp-hop ~]#
[root@al2023-temp-hop ~]# dnf install apache
Unable to detect release version (use '--releasever' to specify release version)
Amazon Linux 2023 repository                                                                                                          15  B/s | 243  B     00:16
Errors during downloading metadata for repository 'amazonlinux':
  - Status code: 403 for https://cdn.amazonlinux.com/al2023/core/mirrors/$releasever/x86_64/mirror.list (IP: 13.35.18.64)
  - Status code: 403 for https://cdn.amazonlinux.com/al2023/core/mirrors/$releasever/x86_64/mirror.list (IP: 13.35.18.5)
  - Status code: 403 for https://cdn.amazonlinux.com/al2023/core/mirrors/$releasever/x86_64/mirror.list (IP: 13.35.18.73)
Error: Failed to download metadata for repo 'amazonlinux': Cannot prepare internal mirrorlist: Status code: 403 for https://cdn.amazonlinux.com/al2023/core/mirrors/$releasever/x86_64/mirror.list (IP: 13.35.18.5)
Ignoring repositories: amazonlinux
Last metadata expiration check: 6:58:13 ago on Wed May  1 10:20:57 2024.
No match for argument: apache
Error: Unable to find a match: apache
[root@al2023-temp-hop yum.repos.d]# dnf check-release-update
Unable to detect release version (use '--releasever' to specify release version)
[root@al2023-temp-hop yum.repos.d]# rpm -q system-release
package system-release is not installed
[root@al2023-temp-hop yum.repos.d]# ping google.com
PING google.com (172.217.194.102) 56(84) bytes of data.
64 bytes from si-in-f102.1e100.net (172.217.194.102): icmp_seq=1 ttl=108 time=5.57 ms
64 bytes from si-in-f102.1e100.net (172.217.194.102): icmp_seq=2 ttl=108 time=3.77 ms
^C
--- google.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 3.774/4.671/5.569/0.897 ms
[root@al2023-temp-hop yum.repos.d]# ping https://cdn.amazonlinux.com
ping: https://cdn.amazonlinux.com: Name or service not known
[root@al2023-temp-hop yum.repos.d]# ping cdn.amazonlinux.com
PING d21lvh0gtuor4a.cloudfront.net (13.35.18.59) 56(84) bytes of data.
64 bytes from server-13-35-18-59.sin5.r.cloudfront.net (13.35.18.59): icmp_seq=1 ttl=244 time=4.39 ms
64 bytes from server-13-35-18-59.sin5.r.cloudfront.net (13.35.18.59): icmp_seq=2 ttl=244 time=3.39 ms
64 bytes from server-13-35-18-59.sin5.r.cloudfront.net (13.35.18.59): icmp_seq=3 ttl=244 time=3.20 ms
^C
zcobol commented 2 months ago

@gowgopal83 how did you install al2023 version 20240416 on exsi since the latest available ova is version 20240412?

Download link: https://cdn.amazonlinux.com/os-images/2.0.20240412.0/vmware/

Your package manager doesn't know the release version so you could specify --releasever=2023.4.20240416 when invoking the command, like dnf install apache --releasever=2023.4.20240416

However, there's no apache package in al2023, thus the error. Try httpd instead.

Available Packages
Name         : httpd
Version      : 2.4.58
Release      : 1.amzn2023
Architecture : x86_64
Size         : 47 k
Source       : httpd-2.4.58-1.amzn2023.src.rpm
Repository   : amazonlinux
Summary      : Apache HTTP Server
URL          : https://httpd.apache.org/
License      : Apache-2.0 AND (BSD-3-Clause AND metamail AND HPND-sell-variant AND Spencer-94)
Description  : The Apache HTTP Server is a powerful, efficient, and extensible
             : web server.
elsaco commented 1 month ago

On-premise images were bumped to 20240429. Enjoy!

Download link https://cdn.amazonlinux.com/al2023/os-images/2023.4.20240429.0/