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