Answer the question
In order to leave comments, you need to log in
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 -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
[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
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
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question