Article ID: 113473, created on Mar 16, 2012, last review on Nov 20, 2014

  • Applies to:
  • Plesk for Linux/Unix
  • Virtuozzo containers for Linux

Symptoms

Using YUM:

When trying to update CentOS 4 packages on a physical server or on a Parallels Virtuozzo Containers (PVC) container (from the container directly), I get this error:
 
# yum update plesk9
Setting up Update Process
Setting up repositories
http://mirrors.stuhome.net/centos/4.9/updates/x86_64/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (111, 'Connection refused')>
Trying other mirror.

Trying other mirror.
Cannot open/read repomd.xml file for repository: update
failure: repodata/repomd.xml from update: [Errno 256] No more mirrors to try.
Error: failure: repodata/repomd.xml from update: [Errno 256] No more mirrors to try.

 

Using "vzpkg" (for PVC containers only):
 
When trying to install/update CentOS 4 templates on a PVC container, I get this error:

# vzpkg install 101 plesk9
...
Installing applications: plesk9 plesk9-postfix mod_ssl mod_perl
http://mirror.centos.org/centos-4/4/centosplus/x86_64/repodata/repomd.xml: [Errno 4] IOError: HTTP Error 404: Not Found
Trying other mirror.
Cannot open/read repomd.xml file for repository: plesk9-centosplus1
failure: repodata/repomd.xml from plesk9-centosplus1: [Errno 256] No more mirrors to try.
Error: failure: repodata/repomd.xml from plesk9-centosplus1: [Errno 256] No more mirrors to try.
Error: /usr/share/vzyum/bin/yum failed, exitcode=1
Error: Can not update metadata for plesk9-centosplus. Skipped.


or this one:

# vzpkg install 101 plesk9
...
Cannot find a valid baseurl for: http://mirrorlist.centos.org/?release=4&arch=i386&repo=os
Error: Cannot find a valid baseurl for: http://mirrorlist.centos.org/?release=4&arch=i386&repo=os

Cause

The issue occurs because the CentOS 4 operating system has been End-of-Lifed and is no longer available via old mirrors.
You may find the below EOL announcement on the main page of the CentOS site.

CentOS 4 EOL Announcement

The 7-year enterprise lifetime of CentOS-4 ends now. CentOS-4 has been copied to the CentOS Vault. The last released tree is available here.

All architectures of CentOS-4 (i386, x86_64, ppc, s390, and s390x) are
impacted. Support for the CentOS-4 Cluster Server and the CentOS-4
Global File Server (csgfs) is also ended.

The CentOS-4.8 and 4.9 trees will be emptied from the CentOS mirrors in
short order.

CentOS-4 will remain available in the CentOS Vault, along with CentOS-2
and CentOS-3, indefinitely. You can use the vault in the same way you
have used the CentOS mirrors in the past; however, no updates will be
released for CentOS-4 moving forward.

Accordingly, the CentOS Project strongly recommends that you migrate any
CentOS-4 installations to a newer version of CentOS (either CentOS-5 or
CentOS-6).

Read the complete EOL announcement.


Resolution

For a physical server:

Add the following mirror to your YUM configuration:

http://vault.centos.org/

This needs to be done by the server administrator; however, you may try doing it yourself by running the below commands which get rid of the old repository configuration and put the new repository configuration file for CentOS v. 4.9 into the YUM repositories configuration folder:

# mv /etc/yum.repos.d/CentOS-Base.repo /tmp
# yum clean all
# wget -P /etc/yum.repos.d/ http://kb.sp.parallels.com/Attachments/19328/Attachments/CentOSVault.repo

Now, commands like "yum install" and "yum update" should work on your server.

Note 1: You may need to remove other *.repo files from the /etc/yum.repos.d folder if you have additional repositories preventing YUM from using the new repository.

Note 2: If the above commands do not fix the issue, present the problem to your server administrator, as it is a pure server administration task.
 

For a PVC container:

1. Edit this file (example is for CentOS v. 4.9):

/vz/template/centos/4/x86_64/config/os/default/repositories
 
Instead of default repositories, specify direct links to the vault.centos.org along with the EZ template repositories:

# cat /vz/template/centos/4/x86_64/config/os/default/repositories
#$CE_SERVER/centos/4/os/x86_64
#$CE_SERVER/centos/4/updates/x86_64
http://vault.centos.org/4.9/os/x86_64
http://vault.centos.org/4.9/updates/x86_64

http://vzdownload.swsoft.com/ez/packages/centos/4/i386/os/
http://vzdownload.swsoft.com/ez/packages/centos/4/i386/updates/

NOTE: If there are application templates depending on CentOS 4.x repositories, make sure they have valid repository URLs too:
# grep . /vz/template/centos/4/x86_64/config/app/*/default/repositories

2. Remove or rename mirrorlist file:
# cd /vz/template/centos/4/x86_64/config/os/default
# mv mirrorlist mirrorlist.old


Note: If you are using Virtuozzo 3.0, stop here. Further steps are only for PVC 4.x.

3. Clean metadata for the OS template:
# vzpkg clean centos-4-x86_64 -a

4. Update metadata of the OS template using this command:
# vzpkg update metadata centos-4-x86_64 –r

5. Repeat steps 1-4 for the x86 architecture, if needed.

Attachments

29d1e90fd304f01e6420fbe60f66f838 a914db3fdc7a53ddcfd1b2db8f5a1b9c e8e50b42231236b82df27684e7ec0beb d02f9caf3e11b191a38179103495106f 2897d76d56d2010f4e3a28f864d69223 56797cefb1efc9130f7c48a7d1db0f0c

Email subscription for changes to this article
Save as PDF