LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-02-2010, 12:36 PM   #1
bluethundr
Member
 
Registered: Jun 2003
Location: Summit, NJ
Distribution: CentOS 5.4
Posts: 124

Rep: Reputation: 15
Question yum repository not serving it's xml file


I have created a yum repo on my home machine using a tutorial I found on howtoforge.com

http://www.howtoforge.com/setting-up...sitory-fedora8

This article talks about fedora 8 however I changed it just enough to be fedora 12.


The commands that I adapted for this release are these:

Code:
mkdir -p /var/www/html/yum/base/12/i386
mkdir -p /var/www/html/yum/updates/12/i386
Code:
createrepo /var/www/html/yum/base/12/i386
I then verified that the repo had been created
Code:
[root@lcent5-1 base]# ls -l /var/www/html/yum/base/12/i386/repodata/
total 16
-rw-r--r-- 1 root root 181 Apr  2 11:21 filelists.xml.gz
-rw-r--r-- 1 root root 176 Apr  2 11:21 other.xml.gz
-rw-r--r-- 1 root root 188 Apr  2 11:21 primary.xml.gz
-rw-r--r-- 1 root root 951 Apr  2 11:21 repomd.xml
I then went to my local fedora box and added the yum repo I created:

Code:
[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
metadata_expire=1800
installonly_limit=2

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d

[base-local]
name=Fedora $releasever - $basearch
failovermethod=priority
baseurl=http://lcent5-1.ath.cx/yum/base/$releasever/$basearch
#mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
enabled=1
gpgcheck=0

[updates-local]
name=Fedora $releasever - $basearch - Updates
failovermethod=priority
baseurl=http://lcent5-1.ath.cx/yum/updates/$releasever/$basearch/
#mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f$releasever&arch=$basearch
gpgcheck=1
gpgkey=http://mirror.yellowfiber.net/fedora/releases/12/Fedora/i386/os/RPM-GPG-KEY-fedora-12-primary
However, when I try to run yum, this is the message I get...

Code:
[root@harmony yum.repos.d]# yum search httpd
Loaded plugins: presto, refresh-packagekit
http://lcent5-1.ath.cx/yum/updates/12/i386/repodata/repomd.xml: [Errno 14] HTTP Error 404 : http://lcent5-1.ath.cx/yum/updates/12/i386/repodata/repomd.xml 
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: updates-local. Please verify its path and try again
Yum still works, obviously. But I would like to actually use this yum server if I can figure out how to do this...

Apache is running.. and I can access a website here:

My Yum Server

I would suspect that this file is the missing link here:

Code:
-rw-r--r-- 1 root root 951 Apr  2 11:21 repomd.xml
The above file can be found here...
Code:
/var/www/html/yum/base/12/i386/repodata/
Any thoughts on this would be appreciated...
 
Old 04-02-2010, 12:47 PM   #2
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 164Reputation: 164
Check your apache logs, there's something wrong with that, if you can't download the file in your webbrowser ( http://lcent5-1.ath.cx/yum/updates/1...ata/repomd.xml ) then the repo won't work either.

In the case of that particular url its fine up to repodata then doesn't exist. The file exists under BASE but not under UPDATES.

Last edited by rweaver; 04-02-2010 at 12:51 PM.
 
Old 04-02-2010, 12:58 PM   #3
bluethundr
Member
 
Registered: Jun 2003
Location: Summit, NJ
Distribution: CentOS 5.4
Posts: 124

Original Poster
Rep: Reputation: 15
Post my apache logs

hmmm.. this is a rather interesting entry in my log file..

Code:
[Fri Apr 02 12:54:04 2010] [error] [client 65.46.72.90] File does not exist: /var/www/html/yum/updates/12/i386/repodata, referer: http://www.linuxquestions.org/questions/showthread.php?p=3921901
 
Old 04-05-2010, 11:55 AM   #4
bluethundr
Member
 
Registered: Jun 2003
Location: Summit, NJ
Distribution: CentOS 5.4
Posts: 124

Original Poster
Rep: Reputation: 15
Code:
createrepo /path/to/correctrepo
did it!!! :-)
 
Old 04-06-2010, 12:31 PM   #5
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 164Reputation: 164
Yeap, using the correct path is an absolute essential
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
yum Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. glowe Linux - Newbie 8 01-13-2016 11:55 PM
yum fails with error: Cannot retrieve repository metadata (repomd.xml) for repository dmendonsa Fedora 6 02-10-2010 08:23 PM
Fedora 3: yum fails with message Cannot open/read repomd.xml file for repository AndrewShanks Linux - Newbie 1 07-02-2009 09:22 AM
Cannot open/read repomd.xml file for repository - HELP petruha1983 Linux - Software 0 02-23-2009 10:23 AM
yum + Cannot open/read repomd.xml file for repository: update aeby Red Hat 1 12-19-2007 10:14 AM


All times are GMT -5. The time now is 06:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration