Yum repo update got HTTPS 403

Using Amazon linux and adds influx yum repo, when run yum update, it got HTTPS 403.

We run RLGRABBER_DEBUG=1,debug.log yum update to see details and got this error message


https://repos.influxdata.com/stable/x86_64/main/repodata/repomd.xml: [Errno 14] HTTPS Error 403 - Forbidden
Trying other mirror.


 One of the configured repositories failed (InfluxDB Repository),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:

     1. Contact the upstream for the repository and get them to fix the problem.

     2. Reconfigure the baseurl/etc. for the repository, to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).

     3. Run the command with the repository temporarily disabled
            yum --disablerepo=influxdb ...

     4. Disable the repository permanently, so yum won't use it by default. Yum
        will then just ignore the repository until you permanently enable it
        again or use --enablerepo for temporary usage:

            yum-config-manager --disable influxdb
        or
            subscription-manager repos --disable=influxdb

     5. Configure the failing repository to be skipped, if it is unavailable.
        Note that yum will try to contact the repo. when it runs most commands,
        so will have to try and fail each time (and thus. yum will be be much
        slower). If it is a very temporary problem though, this is often a nice
        compromise:

            yum-config-manager --save --setopt=influxdb.skip_if_unavailable=true

failure: repodata/repomd.xml from influxdb: [Errno 256] No more mirrors to try.
https://repos.influxdata.com/stable/x86_64/main/repodata/repomd.xml: [Errno 14] HTTPS Error 403 - Forbidden

We found that this was caused by the user agent being blocked by Cloudfront.
curl -v -H 'User-Agent: urlgrabber/5 yum/3.4.3' https://repos.influxdata.com/stable/x86_64/main/repodata/repomd.xml

> GET /stable/x86_64/main/repodata/repomd.xml HTTP/2
> Host: repos.influxdata.com
> Accept: */*
> User-Agent: urlgrabber/5 yum/3.4.3
>
< HTTP/2 403
< server: CloudFront
< date: Fri, 26 Jan 2024 04:22:34 GMT
< content-type: text/html
< content-length: 919
< x-cache: Error from cloudfront
< via: 1.1 18dbd2329039604c730862b3b85e7c0e.cloudfront.net (CloudFront)
< x-amz-cf-pop: CDG50-C1
< x-amz-cf-id: l9hYm2Mk7gKufdDEQYaURY82BlILG23ph2yyy8ddAneC_DS2dQQ-zQ==
<
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>ERROR: The request could not be satisfied</TITLE>
</HEAD><BODY>
<H1>403 ERROR</H1>
<H2>The request could not be satisfied.</H2>
<HR noshade size="1px">
Request blocked.
We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
<BR clear="all">
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
<BR clear="all">
<HR noshade size="1px">
<PRE>
Generated by cloudfront (CloudFront)
Request ID: l9hYm2Mk7gKufdDEQYaURY82BlILG23ph2yyy8ddAneC_DS2dQQ-zQ==
</PRE>
<ADDRESS>
</ADDRESS>
* Connection #0 to host repos.influxdata.com left intact
</BODY></HTML>

How can we mitigate this.

2 Likes

Hi tanapoln, I am using kolla to build OpenStack docker images and I am having the same problems HTTPS 403 as you.

https://repos.influxdata.com/rhel/7/x86_64/stable/repodata/repomd.xml: [Errno 14] HTTPS Error 403 - Forbidden

This is surely something wrong

We are also getting the same issue.

[sa ~]$ sudo yum info chronograf
Loaded plugins: extras_suggestions, fastestmirror, langpacks, s3, update-motd
Determining fastest mirrors
amzn2-core                                                                                                                                                                                                                             | 3.6 kB  00:00:00
amzn2extra-docker                                                                                                                                                                                                                      | 2.9 kB  00:00:00
amzn2extra-epel                                                                                                                                                                                                                        | 3.0 kB  00:00:00
epel                                                                                                                                                                                                                                   | 4.7 kB  00:00:00
https://repos.influxdata.com/stable/x86_64/main/repodata/repomd.xml: [Errno 14] HTTPS Error 403 - Forbidden
Trying other mirror.


 One of the configured repositories failed (InfluxData Repository - Stable),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:

     1. Contact the upstream for the repository and get them to fix the problem.

     2. Reconfigure the baseurl/etc. for the repository, to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).

     3. Run the command with the repository temporarily disabled
            yum --disablerepo=influxdb ...

     4. Disable the repository permanently, so yum won't use it by default. Yum
        will then just ignore the repository until you permanently enable it
        again or use --enablerepo for temporary usage:

            yum-config-manager --disable influxdb
        or
            subscription-manager repos --disable=influxdb

     5. Configure the failing repository to be skipped, if it is unavailable.
        Note that yum will try to contact the repo. when it runs most commands,
        so will have to try and fail each time (and thus. yum will be be much
        slower). If it is a very temporary problem though, this is often a nice
        compromise:

            yum-config-manager --save --setopt=influxdb.skip_if_unavailable=true

failure: repodata/repomd.xml from influxdb: [Errno 256] No more mirrors to try.
https://repos.influxdata.com/stable/x86_64/main/repodata/repomd.xml: [Errno 14] HTTPS Error 403 - Forbidden

we can connect to the repository.

[sa$ curl https://repos.influxdata.com/centos/7/x86_64/stable/repodata/repomd.xml
<?xml version="1.0" encoding="UTF-8"?>
<repomd xmlns="http://linux.duke.edu/metadata/repo" xmlns:rpm="http://linux.duke.edu/metadata/rpm">
  <revision>1705678990</revision>
  <data type="primary">
    <checksum type="sha256">17d0b7d9338a9286e608e457940df7156ec90ee17c29c8d09f0fde73b09f7a8e</checksum>
    <open-checksum type="sha256">b5d99404497d5eab5f251ae4df21589f2e48b62987b278a717fbf4371cf39200</open-checksum>
    <location href="repodata/17d0b7d9338a9286e608e457940df7156ec90ee17c29c8d09f0fde73b09f7a8e-primary.xml.gz"/>
    <timestamp>1705678990</timestamp>
    <size>37575</size>
    <open-size>498962</open-size>
  </data>
  <data type="filelists">
    <checksum type="sha256">e2cf9c5ecf63a48dd5248aa51e013834d7e9cd105c43e2c84026fa42cc3895d0</checksum>
    <open-checksum type="sha256">ec4a5f812bab264dd6a956ddcfdaa638a35f4344215dcba7804be03cb9b97277</open-checksum>
    <location href="repodata/e2cf9c5ecf63a48dd5248aa51e013834d7e9cd105c43e2c84026fa42cc3895d0-filelists.xml.gz"/>
    <timestamp>1705678990</timestamp>
    <size>20266</size>
    <open-size>368524</open-size>
  </data>
  <data type="other">
    <checksum type="sha256">9aee6be93aa9c8118da0bdb0a0cbad033d4d39435214276ff453222ad9d55755</checksum>
    <open-checksum type="sha256">b951c7a370007e7d04f3766200f8a484abbf13d52dada43b79d01c1f4d73aab4</open-checksum>
    <location href="repodata/9aee6be93aa9c8118da0bdb0a0cbad033d4d39435214276ff453222ad9d55755-other.xml.gz"/>
    <timestamp>1705678990</timestamp>
    <size>14924</size>
    <open-size>56116</open-size>
  </data>
  <data type="primary_db">
    <checksum type="sha256">d3994eb7054fd1eb686c52c0db3ec64196205362e0b2d046d1ce6ecfe27a0ca4</checksum>
    <open-checksum type="sha256">3be2ca2e63b3a7e9935c6be642bb46d437d2a9b93cd4107a9a0d29347c87031a</open-checksum>
    <location href="repodata/d3994eb7054fd1eb686c52c0db3ec64196205362e0b2d046d1ce6ecfe27a0ca4-primary.sqlite.bz2"/>
    <timestamp>1705678990</timestamp>
    <size>90755</size>
    <open-size>520192</open-size>
    <database_version>10</database_version>
  </data>
  <data type="filelists_db">
    <checksum type="sha256">9c20b310bad75f2a88255b82fb3942bc38f858e8b36323a6c9a881f9bf37d6cf</checksum>
    <open-checksum type="sha256">4f21afb524e2401d8387ed2066babb55ac5b4bb09987e9c307dcdbf055d1068c</open-checksum>
    <location href="repodata/9c20b310bad75f2a88255b82fb3942bc38f858e8b36323a6c9a881f9bf37d6cf-filelists.sqlite.bz2"/>
    <timestamp>1705678990</timestamp>
    <size>55029</size>
    <open-size>303104</open-size>
    <database_version>10</database_version>
  </data>
  <data type="other_db">
    <checksum type="sha256">7b73b40d881bfdff25b829eea6a2652838d3881e82b6a0e7c5bdb6f60f0d629e</checksum>
    <open-checksum type="sha256">b5014dcba5adcfb2dce4f29aed9606b3a79b9afae07b6040e38cfde8920eb6ac</open-checksum>
    <location href="repodata/7b73b40d881bfdff25b829eea6a2652838d3881e82b6a0e7c5bdb6f60f0d629e-other.sqlite.bz2"/>
    <timestamp>1705678990</timestamp>
    <size>20251</size>
    <open-size>73728</open-size>
    <database_version>10</database_version>
  </data>
</repomd>

Same issue here.

2024-01-26 01:18:02,197 [ERROR] Yum makecache failed. Output: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
https://repos.influxdata.com/stable/x86_64/main/repodata/repomd.xml: [Errno 14] HTTPS Error 403 - Forbidden
Trying other mirror.

Same here

https://repos.influxdata.com/centos/7/x86_64/stable/repodata/repomd.xml: [Errno 14] HTTPS Error 403 - Forbidden

Guys this issue still hasn’t been fixed yet? I just tried and still running into the same issue. Any updates anyone?

Hi!

We’ve seen some issues with clients downloading packages far more often than they ought to on the repo and have implemented some mitigations. Most folks who had issues specifically with yum should no longer see their systems blocked with a 403 error.

If you’re still having trouble, please send me a note with the IP(s) of impacted systems so that I can investigate further. You can send them to me directly here or if you’re on the Influx community Slack, I’m tky over there as well and can work with you in real-time.

Thanks, all!