Skip to main content

YUM repository problem


I was trying to install a few packages on a compute node using yum, when I encountered the following problem:-
“IOError: <urlopen error unknown url type: media>”
Here is how it happened:
[root@localhost yum.repos.d]# yum install opensm
Loading “rhnplugin” plugin
Loading “security” plugin
Loading “installonlyn” plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Setting up repositories
rhel51                    100% |=========================| 1.3 kB    00:00
Reading repository metadata in from local files
primary.xml.gz            100% |=========================| 780 kB    00:00
################################################## 2857/2857
Parsing package install arguments
Resolving Dependencies
–> Populating transaction set with selected packages. Please wait.
—> Downloading header for opensm to pack into transaction set.
media://1192663619.181374%233/opensm-3.0.3-6.el5.x86_64.rpm: [Errno 4] IOError: <urlopen error unknown url type: media>
Trying other mirror.
Error: failed to retrieve opensm-3.0.3-6.el5.x86_64.rpm from rhel51
error was [Errno 4] IOError: <urlopen error unknown url type: media>
[root@localhost yum.repos.d]#
Here is the setup:
A master node and two compute nodes were installed from the CD directly. On the master node, I copied the entire RHEL 5.1 cds in a directory tree and made that available through apache:-
Master Node (192.168.20.100) :-
[root@headnode ~]# cat /etc/httpd/conf.d/rhel51.conf
Alias /rhel51 /data/RHEL_5.1
<Location /rhel51>
Order deny,allow
Allow from all
</Location>
[root@headnode ~]#
On my compute node side, I setup the yum repository as follows:-
[root@localhost firmware]# cat /etc/yum.repos.d/rhel51.repo
[rhel51]
name=Red Hat Enterprise Linux 5.1
baseurl=http://192.168.20.100/rhel51/Server/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[root@localhost firmware]#
The moment I tried to install a package, I got the error, as shown in the beginning. The error comes because the files were directly copied from the CD set into the /data/RHEL_5.1 directory. It should have worked without a problem, but for some unknown reason (bug), the files still think that they are on a CD media, named “media://1192663619.181374%233″ . To fix this, we need to recreate / update the repository on the master node.
Here is how:
Goto the master node / headnode and into the directory where you can see the subdirectory named repodata. Do not go inside repodata directory. Just stay one level up outside, in the “Server” or “Packages” directory. Then, issue the createrepo command. You need to have createrepo pakcage installed on your system before you do it.
[root@headnode ~]# yum -y install createrepo
[root@headnode ~]# cd /data/RHEL_5.1/Server
[root@headnode Server]# createrepo  -v  .
or simply:
[root@headnode Server]# createrepo .
That is all on the server side. Now go to the client node, and do the following:-
[root@localhost firmware]# yum clean all
Loading “rhnplugin” plugin
Loading “installonlyn” plugin
Loading “security” plugin
This system is not registered with RHN.
RHN support will be disabled.
Cleaning up Everything
[root@localhost firmware]#
Now you can install your packages:-
[root@localhost yum.repos.d]# yum install opensm
Loading “rhnplugin” plugin
Loading “security” plugin
Loading “installonlyn” plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Setting up repositories
rhel51                    100% |=========================|  951 B    00:00
Reading repository metadata in from local files
primary.xml.gz            100% |=========================| 979 kB    00:00
################################################## 2857/2857
Parsing package install arguments
Resolving Dependencies
–> Populating transaction set with selected packages. Please wait.
—> Downloading header for opensm to pack into transaction set.
opensm-3.0.3-6.el5.x86_64 100% |=========================| 9.5 kB    00:00
—> Package opensm.x86_64 0:3.0.3-6.el5 set to be updated
–> Running transaction check
–> Processing Dependency: libibcommon.so.1()(64bit) for package: opensm


–> Restarting Dependency Resolution with new changes.
–> Populating transaction set with selected packages. Please wait.
—> Downloading header for openib to pack into transaction set.
openib-1.2-6.el5.x86_64.r 100% |=========================|  12 kB    00:00
—> Package openib.x86_64 0:1.2-6.el5 set to be updated
–> Running transaction check
Dependencies Resolved
=============================================================================
Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
opensm                  x86_64     3.0.3-6.el5      rhel51            281 k
Installing for dependencies:
libibcommon             x86_64     1.0.3-6.el5      rhel51             13 k
libibumad               x86_64     1.0.5-6.el5      rhel51             18 k
openib                  x86_64     1.2-6.el5        rhel51            113 k
opensm-libs             x86_64     3.0.3-6.el5      rhel51             70 k
Transaction Summary
=============================================================================
Install      5 Package(s)
Update       0 Package(s)
Remove       0 Package(s)
Total download size: 495 k
Is this ok [y/N]: y
Downloading Packages:
(1/5): opensm-libs-3.0.3- 100% |=========================|  70 kB    00:00
(2/5): libibumad-1.0.5-6. 100% |=========================|  18 kB    00:00
(3/5): openib-1.2-6.el5.x 100% |=========================| 113 kB    00:00
(4/5): opensm-3.0.3-6.el5 100% |=========================| 281 kB    00:00
(5/5): libibcommon-1.0.3- 100% |=========================|  13 kB    00:00
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 37017186
Importing GPG key 0×37017186 “Red Hat, Inc. (release key) <security@redhat.com>”
Is this ok [y/N]: y
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: openib                       ######################### [1/5]
Installing: libibcommon                  ######################### [2/5]
Installing: libibumad                    ######################### [3/5]
Installing: opensm-libs                  ######################### [4/5]
Installing: opensm                       ######################### [5/5]
Installed: opensm.x86_64 0:3.0.3-6.el5
Dependency Installed: libibcommon.x86_64 0:1.0.3-6.el5 libibumad.x86_64 0:1.0.5-6.el5 openib.x86_64 0:1.2-6.el5 opensm-libs.x86_64 0:3.0.3-6.el5
Complete!
[root@localhost yum.repos.d]#

Comments

Popular posts from this blog

How to reset HP ILO password without reboot when you forgot the admin (root) password: ESX, Windows & Linux

How to reset HP ILO password without reboot when you forgot the admin (root) password: ESX, Windows & Linux This is still a test subject and i gathered all the methods and pasting it here for future reference & need to check whether the below steps are working or not on ESX and ESXI.  I am sure its working for Linux and Windows if the ILO drivers installed. ESX: You can configure the ILO board when you reboot your server and press <F8> but all your VM’s will be powered down. The other way is installing hponcfg in the service console.First we need to download the below three rpm files from HP site. Then copy files to the tmp folder of your server console. Install the rpm files using the following command. [root@esxhost tmp]# rpm -ihv hponcfg-version.linux.rpm hpasm-version.rhel3.i386.rpm hprsm-version.rhel3.i386.rpm Create a Password_ILO_reset.xml file and copy it to your tmp folder. <RIBCL VERSION=”2.0″> <LOGIN USER_LOGIN=”Administ

Veritas cluster Interview Questions-2

Please go through questions and answers. Let me know if you have any doubt by leaving comment. Adding and removing cluster node  Q-1 How to add a node in an existing cluster? Ans:    Adding a node into an existing cluster is a multi steps process. 1:       Set up the hardware Before adding a node to an existing cluster, node must be physically connected with the cluster.       1: Connect the VCS private Ethernet controllers       2: Connect the node to the shared storage 2:       Install the VCS software in the node           Install the VCS software and install the license. 3:       Configure LLT and GAB Create the LLT & GAB configuration files (/etc/llthosts, /etc/llttab and /etc/gabtab) in the new node and update the files on the existing node. 4:       Add the node to an existing cluster We have to perform below given tasks in any of the existing node of a cluster          1:Make to cluster configuration R/W           # haconf –makerw           2:Add the new node to the cl