Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

yum install hit HTTP 403 error?

Tags:

http

yum

centos7

Issue description:

Install package on CentOS7 with below command:

yum install <package_name>

error:

# yum install  httpd
Loaded plugins: fastestmirror
http://centos-distro.1gservers.com/7.2.1511/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 403 - Forbidden
Trying other mirror.
To address this issue, please refer to the below knowledge base article

https://access.redhat.com/solutions/69319

If above article doesn't help to resolve this issue, please create a bug on https://bugs.centos.org/

Other info

>* I can be sure I did not have a proxy setting in /etc/yum.conf. 
>* The firewall is closed. 
>* I already try yum clean all

Something may relate

I have added the following two to config in /etc/yum.conf

timeout=9999
minrate=0

I added them because sometimes I will hit too slow or timeout error. If I remove this two from config, the error will be replaced by

# yum install  httpd
Loaded plugins: fastestmirror
http://centos-distro.1gservers.com/7.2.1511/os/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://centos-distro.1gservers.com/7.2.1511/os/x86_64/repodata/repomd.xml: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
Trying other mirror.

The error message did give a link. But that link can only be read by RedHat support accounts. I tried googling this, but the result either none related or can not solve my problem. Stack overflow also had one post about this. But it is also not helping.

Can anyone give some advice?

like image 636
Kramer Li Avatar asked Feb 12 '26 23:02

Kramer Li


1 Answers

I solved this issue. This is because some external, third party firewall of my lab is blocking me.

Although the root cause is not very meaningful, but the way to trouble shoot should worth mention to reference.

Trouble shooting

It said 403 for some url. So I will access that url from my compute with below command.

curl -i <url>

The output contains http header. It is 403. Then I copy the html body to some text file. Use a web Broswer to open it. I found some information like:

your orgainization firewall block you

So... it is a network problem of my lab

like image 107
Kramer Li Avatar answered Feb 15 '26 12:02

Kramer Li