Codebuild Docker Image Build Fails During Linux Dependency Installation

0

This afternoon a CodeBuild project that has run successfully for a couple of years suddenly started failing. Between builds this afternoon the Docker image build process started using malformed URLs to resolve dependency repo locations.

If you look at the urls in snippet below you will see that an extra directory has been added that always matches the first character of the package name. e.g

http://aws.repo.almalinux.org/8.10/BaseOS/x86_64/os/Packages/p/python3-dateutil-2.6.1-6.el8.noarch.rpm

This mirror url has an extra /p added to the path. The proper url should be:

https://aws.repo.almalinux.org/8.10/BaseOS/x86_64/os/Packages/python3-dateutil-2.6.1-6.el8.noarch.rpm

Is this a new bug? Has anyone experienced this before?

AlmaLinux 8 - BaseOS                             92 MB/s |  21 MB     00:00    
AlmaLinux 8 - AppStream                          78 MB/s |  18 MB     00:00    
AlmaLinux 8 - Extras                            200 kB/s |  14 kB     00:00    
epel-release-latest-8.noarch.rpm                1.2 MB/s |  24 kB     00:00    
remi-release-8.rpm                              110 kB/s |  37 kB     00:00    
Dependencies resolved.
================================================================================
 Package                     Arch      Version            Repository       Size
================================================================================
Installing:
 epel-release                noarch    8-21.el8           @commandline     24 k
 remi-release                noarch    8.10-2.el8.remi    @commandline     37 k
Installing dependencies:
 dbus-glib                   x86_64    0.110-2.el8        baseos          127 k
 python3-dateutil            noarch    1:2.6.1-6.el8      baseos          251 k
 python3-dbus                x86_64    1.2.4-15.el8       baseos          134 k
 python3-dnf-plugins-core    noarch    4.0.21-25.el8      baseos          262 k
 python3-six                 noarch    1.11.0-8.el8       baseos           38 k
 python3-systemd             x86_64    234-8.el8          baseos           81 k
Installing weak dependencies:
 dnf-plugins-core            noarch    4.0.21-25.el8      baseos           75 k

Transaction Summary
================================================================================
Install  9 Packages

Total size: 1.0 M
Total download size: 969 k
Installed size: 2.7 M
Downloading Packages:
[MIRROR] python3-dateutil-2.6.1-6.el8.noarch.rpm: Status code: 404 for http://aws.repo.almalinux.org/8.10/BaseOS/x86_64/os/Packages/p/python3-dateutil-2.6.1-6.el8.noarch.rpm (IP: 3.171.76.72)
[MIRROR] dnf-plugins-core-4.0.21-25.el8.noarch.rpm: Status code: 404 for http://aws.repo.almalinux.org/8.10/BaseOS/x86_64/os/Packages/d/dnf-plugins-core-4.0.21-25.el8.noarch.rpm (IP: 3.171.76.72)
[MIRROR] python3-dateutil-2.6.1-6.el8.noarch.rpm: Status code: 404 for http://mirror.servaxnet.com/almalinux/8.10/BaseOS/x86_64/os/Packages/p/python3-dateutil-2.6.1-6.el8.noarch.rpm (IP: 162.255.226.75)
[MIRROR] dnf-plugins-core-4.0.21-25.el8.noarch.rpm: Status code: 404 for http://mirror.servaxnet.com/almalinux/8.10/BaseOS/x86_64/os/Packages/d/dnf-plugins-core-4.0.21-25.el8.noarch.rpm (IP: 162.255.226.75)
[MIRROR] dbus-glib-0.110-2.el8.x86_64.rpm: Status code: 404 for http://aws.repo.almalinux.org/8.10/BaseOS/x86_64/os/Packages/d/dbus-glib-0.110-2.el8.x86_64.rpm (IP: 3.171.76.72)
[MIRROR] dnf-plugins-core-4.0.21-25.el8.noarch.rpm: Status code: 404 for http://mirror.linux.duke.edu/almalinux/8.10/BaseOS/x86_64/os/Packages/d/dnf-plugins-core-4.0.21-25.el8.noarch.rpm (IP: 152.3.80.210)
[MIRROR] python3-dateutil-2.6.1-6.el8.noarch.rpm: Status code: 404 for http://mirror.linux.duke.edu/almalinux/8.10/BaseOS/x86_64/os/Packages/p/python3-dateutil-2.6.1-6.el8.noarch.rpm (IP: 152.3.80.210)
[MIRROR] dnf-plugins-core-4.0.21-25.el8.noarch.rpm: Status code: 404 for http://den.aws.repo.almalinux.org/8.10/BaseOS/x86_64/os/Packages/d/dnf-plugins-core-4.0.21-25.el8.noarch.rpm (IP: 3.171.76.96)
[MIRROR] python3-dateutil-2.6.1-6.el8.noarch.rpm: Status code: 404 for http://den.aws.repo.almalinux.org/8.10/BaseOS/x86_64/os/Packages/p/python3-dateutil-2.6.1-6.el8.noarch.rpm (IP: 3.171.76.96)
[MIRROR] dbus-glib-0.110-2.el8.x86_64.rpm: Status code: 404 for http://mirror.servaxnet.com/almalinux/8.10/BaseOS/x86_64/os/Packages/d/dbus-glib-0.110-2.el8.x86_64.rpm (IP: 162.255.226.75)
[MIRROR] dnf-plugins-core-4.0.21-25.el8.noarch.rpm: Status code: 404 for http://ohioix.mm.fcix.net/almalinux/8.10/BaseOS/x86_64/os/Packages/d/dnf-plugins-core-4.0.21-25.el8.noarch.rpm (IP: 134.195.207.11)
[MIRROR] python3-dateutil-2.6.1-6.el8.noarch.rpm: Status code: 404 for http://ohioix.mm.fcix.net/almalinux/8.10/BaseOS/x86_64/os/Packages/p/python3-dateutil-2.6.1-6.el8.noarch.rpm (IP: 134.195.207.11)
[MIRROR] dnf-plugins-core-4.0.21-25.el8.noarch.rpm: Status code: 404 for http://nyc.almalinux.osuosl.org/8.10/BaseOS/x86_64/os/Packages/d/dnf-plugins-core-4.0.21-25.el8.noarch.rpm (IP: 64.50.233.100)
[MIRROR] python3-dateutil-2.6.1-6.el8.noarch.rpm: Status code: 404 for http://nyc.almalinux.osuosl.org/8.10/BaseOS/x86_64/os/Packages/p/python3-dateutil-2.6.1-6.el8.noarch.rpm (IP: 64.50.233.100)
[MIRROR] python3-dateutil-2.6.1-6.el8.noarch.rpm: Status code: 404 for https://mirror.alma.iad1.serverforge.org/8.10/BaseOS/x86_64/os/Packages/p/python3-dateutil-2.6.1-6.el8.noarch.rpm (IP: 23.136.233.151)
[MIRROR] dnf-plugins-core-4.0.21-25.el8.noarch.rpm: Status code: 404 for https://mirror.alma.iad1.serverforge.org/8.10/BaseOS/x86_64/os/Packages/d/dnf-plugins-core-4.0.21-25.el8.noarch.rpm (IP: 23.136.233.151)
[MIRROR] python3-dateutil-2.6.1-6.el8.noarch.rpm: Status code: 404 for http://mirror.vtti.vt.edu/almalinux/8.10/BaseOS/x86_64/os/Packages/p/python3-dateutil-2.6.1-6.el8.noarch.rpm (IP: 198.82.152.116)
[MIRROR] dnf-plugins-core-4.0.21-25.el8.noarch.rpm: Status code: 404 for http://mirror.vtti.vt.edu/almalinux/8.10/BaseOS/x86_64/os/Packages/d/dnf-plugins-core-4.0.21-25.el8.noarch.rpm (IP: 198.82.152.116)
[MIRROR] python3-dateutil-2.6.1-6.el8.noarch.rpm: Status code: 404 for https://mirror.interserver.net/almalinux/8.10/BaseOS/x86_64/os/Packages/p/python3-dateutil-2.6.1-6.el8.noarch.rpm (IP: 66.45.230.130)
[MIRROR] dnf-plugins-core-4.0.21-25.el8.noarch.rpm: Status code: 404 for https://mirror.interserver.net/almalinux/8.10/BaseOS/x86_64/os/Packages/d/dnf-plugins-core-4.0.21-25.el8.noarch.rpm (IP: 66.45.230.130)
[MIRROR] dnf-plugins-core-4.0.21-25.el8.noarch.rpm: Status code: 404 for http://mirror.pit.teraswitch.com/almalinux/8.10/BaseOS/x86_64/os/Packages/d/dnf-plugins-core-4.0.21-25.el8.noarch.rpm (IP: 204.16.246.250)
[FAILED] dnf-plugins-core-4.0.21-25.el8.noarch.rpm: No more mirrors to try - All mirrors were already tried without success
asked a month ago23 views
1 Answer
0

It seems like your CodeBuild process is encountering an issue with malformed URLs for AlmaLinux repositories, specifically with the inclusion of an additional directory that doesn't belong in the URL. This is causing 404 errors when trying to download dependencies, as the repository is trying to resolve packages from a path that doesn't exist.

This might not necessarily be a new bug but could be a configuration issue or a change in the repository structure. Here's how you can troubleshoot and potentially resolve this:

Steps to Resolve the Issue: Check the Base URL Configuration:

Review your yum or dnf repository configuration files (/etc/yum.repos.d/*) to ensure the base URLs are correct.

Ensure that no extra directory (/p/) is being appended to the package paths in the repository configuration.

Update Repository URLs:

If the URLs have changed or the repository configuration has somehow been updated to include that extra directory (/p/), you might need to modify the repository URLs to remove this incorrect part. For example, make sure that:

http://aws.repo.almalinux.org/8.10/BaseOS/x86_64/os/Packages/p/python3-dateutil-2.6.1-6.el8.noarch.rpm is changed to:

https://aws.repo.almalinux.org/8.10/BaseOS/x86_64/os/Packages/python3-dateutil-2.6.1-6.el8.noarch.rpm Check if Mirrors Are the Problem: Sometimes the mirrors themselves might be misconfigured or out-of-sync. You can try manually changing the mirror URL to a different one, or you could run a dnf clean all to clear the metadata and then attempt a fresh download.

For example, you can switch mirrors in the .repo files under /etc/yum.repos.d/.

Temporarily Use a Different Repository or Mirror: If you believe that the repository is not working properly, try switching to another mirror for a quick test. Use a URL that you know is valid, like the CentOS mirrors or a different AlmaLinux mirror.

Rebuild the Docker Image: After ensuring that your repository configuration is correct and mirrors are updated, try rebuilding the Docker image. This might help reset any cache that’s causing the issue.

Check for Changes in AlmaLinux Repositories: Look for any announcements or changes in the AlmaLinux repository setup that might have affected how dependencies are served. Sometimes updates to the repository configuration or new versions of the OS can cause issues like this.

Verify the Package Existence: Manually check if the package python3-dateutil-2.6.1-6.el8.noarch.rpm exists at the expected location. This can help confirm whether it’s a problem with the repository or with your build process.

regards m Zubair https://zeonedge.com

answered a month 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