M
M
maniac_by2019-11-10 16:59:08
linux
maniac_by, 2019-11-10 16:59:08

Yum works differently on two machines, what should I do?

More precisely, on one it works, but on the second it does not. The machines have the same settings, one OS version. And iptables is almost identical (a couple of lines in nata are different)
And on one of them - everything works, and on the second:

Cannot find a valid baseurl for repo: base/7/x86_64

curl
# curl -v 'http://mirrorlist.centos.org/?repo=os&arch=x86_64&release=7'
* About to connect() to mirrorlist.centos.org port 80 (#0)
*   Trying ...
* Connected to mirrorlist.centos.org () port 80 (#0)
> GET /?repo=os&arch=x86_64&release=7 HTTP/1.1
> User-Agent: curl/7.29.0
> Host: mirrorlist.centos.org
> Accept: */*
>
< HTTP/1.1 302
< Cache-Control: private
< Expires: Thu, 01 Jan 1970 03:00:00 MSK
< Location: https://mirrorlist.centos.org/?repo=os&arch=x86_64&release=7
< Content-Length: 0
< Date: Sun, 10 Nov 2019 13:41:30 GMT
<
* Connection #0 to host mirrorlist.centos.org left intact

repo.d
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
maniac_by, 2019-11-10
@maniac_by

The problem turned out to be in two lines (on which the machines differ) in the firewall.

-A OUTPUT -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080
-A OUTPUT -s 127.0.0.1/32 -d 127.0.0.1/32 -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 8443

D
Dmitry, 2019-11-10
@q2digger

Proxy not configured anywhere for yum?
grep proxy /etc/yum.conf

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question