problem with yum update

General support questions
luke2014
Posts: 13
Joined: 2014/04/17 13:15:28

problem with yum update

Post by luke2014 » 2014/04/17 13:29:58

Hi,

I'm new to centos and I'm experimenting installation and configuration of centos server on kvm (host: ubuntu 13.10).
I'm using CentOS-6.5-x86_64-minimal

After installation I tried to update the system but I got this error:

Code: Select all

yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. </html>/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base
I googled around but all the solutions I found didn't work.

So i tried the following command to check if the mirrorlist is available:

Code: Select all

curl 'http://mirrorlist.centos.org/?release=6.5&arch=x86_64&repo=os'
This command on my host OS gives me the list of the mirror sites, but on the centos virtual machine returns nothing.

But I can ping that server:

Code: Select all

 ping mirrotlist.centos.org
PING mirrotlist.centos.org (85.12.30.227) 56(84) bytes of data.
64 bytes from 85.12.30.227: icmp_seq=1 ttl=56 time=74.6 ms
64 bytes from 85.12.30.227: icmp_seq=2 ttl=56 time=75.1 ms
64 bytes from 85.12.30.227: icmp_seq=3 ttl=56 time=74.8 ms
64 bytes from 85.12.30.227: icmp_seq=4 ttl=56 time=75.2 ms
^C
--- mirrotlist.centos.org ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3140ms
rtt min/avg/max/mdev = 74.666/74.993/75.236/0.358 ms
This virtual machine is a clone of a machine I installed some days ago. I had the same problem with the original VM, but after a night yum started to work properly.

What could be the problem?

LuKe

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: problem with yum update

Post by avij » 2014/04/17 13:47:43

Try pinging mirrorlist.centos.org instead of mirrotlist.centos.org

luke2014
Posts: 13
Joined: 2014/04/17 13:15:28

Re: problem with yum update

Post by luke2014 » 2014/04/17 14:51:30

Ops...it was TYPO...

Code: Select all

# ping mirrorlist.centos.org
PING mirrorlist.centos.org (204.15.73.243) 56(84) bytes of data.
64 bytes from centos.at.multacom.com (204.15.73.243): icmp_seq=1 ttl=47 time=212 ms
64 bytes from centos.at.multacom.com (204.15.73.243): icmp_seq=2 ttl=47 time=211 ms
64 bytes from centos.at.multacom.com (204.15.73.243): icmp_seq=3 ttl=47 time=211 ms
64 bytes from centos.at.multacom.com (204.15.73.243): icmp_seq=4 ttl=47 time=210 ms
64 bytes from centos.at.multacom.com (204.15.73.243): icmp_seq=5 ttl=47 time=211 ms
^C
--- mirrorlist.centos.org ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4270ms
rtt min/avg/max/mdev = 210.801/211.487/212.592/0.790 ms


User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: problem with yum update

Post by avij » 2014/04/17 17:25:36

So what exactly does this output:

Code: Select all

curl 'http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os'
Notice 6 instead of 6.5. Also, /etc/yum.repos.d/CentOS-Base.repo should have release=$releasever and not any specific version number.

luke2014
Posts: 13
Joined: 2014/04/17 13:15:28

Re: problem with yum update

Post by luke2014 » 2014/04/17 19:44:29

Same output: nothing (on the host I got a list of mirrors).

Here my repo:
# cat CentOS-Base.repo
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

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

#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$ ... po=updates
#baseurl=http://mirror.centos.org/centos/$releas ... $basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$ ... epo=extras
#baseurl=http://mirror.centos.org/centos/$releas ... $basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$ ... centosplus
#baseurl=http://mirror.centos.org/centos/$releas ... $basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$ ... po=contrib
#baseurl=http://mirror.centos.org/centos/$releas ... $basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: problem with yum update

Post by TrevorH » 2014/04/17 19:46:22

What does /var/cache/yum/x86_64/6/base/mirrorlist.txt contain?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

luke2014
Posts: 13
Joined: 2014/04/17 13:15:28

Re: problem with yum update

Post by luke2014 » 2014/04/17 20:00:41

It doesn't exist.
]# cat /var/cache/yum/x86_64/6/base/mirrorlist.txt
cat: /var/cache/yum/x86_64/6/base/mirrorlist.txt: No such file or directory

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: problem with yum update

Post by TrevorH » 2014/04/17 20:02:07

What does `curl 'http://mirrorlist.centos.org/?release=6 ... 64&repo=os'` give you on your guest with the problem?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

luke2014
Posts: 13
Joined: 2014/04/17 13:15:28

Re: problem with yum update

Post by luke2014 » 2014/04/17 20:06:51

Nothing!

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: problem with yum update

Post by TrevorH » 2014/04/17 20:15:15

Right up the top, you said you could `ping mirrotlist.centos.org` and get a reply. Notice the typo there? mirrotlist != mirrorlist. They are different and resolve to different ip addresses. Try again with the correct name and tell us what that resolves to. Does it ping?

Do you have a web proxy between you and the internet?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply