LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Yum issue - looks like it's getting an HTML page for the mirrorlist (http://www.linuxquestions.org/questions/linux-software-2/yum-issue-looks-like-its-getting-an-html-page-for-the-mirrorlist-694720/)

stangdano 01-03-2009 12:54 PM

Yum issue - looks like it's getting an HTML page for the mirrorlist
 
Hi all,
I'm having a problem using Yum. It did work previously and I have found a crummy workaround, but I really want Yum to work properly. This is on a CentOS 5 machine. Here is the output of the "yum list updates" command
Code:

[root@computer yum.repos.d]# yum list updates
Loading "downloadonly" plugin
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
YumRepo Warning: not using ftp, http[s], or file for repos, skipping - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
YumRepo Warning: not using ftp, http[s], or file for repos, skipping - <HTML>
YumRepo Warning: not using ftp, http[s], or file for repos, skipping - <HEAD>
YumRepo Warning: not using ftp, http[s], or file for repos, skipping -  <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
YumRepo Warning: not using ftp, http[s], or file for repos, skipping -  <TITLE>mirrorlist.centos.org</TITLE>
YumRepo Warning: not using ftp, http[s], or file for repos, skipping - </HEAD>
YumRepo Warning: not using ftp, http[s], or file for repos, skipping - <FRAMESET rows="100%,*" border=0 frameborder=0 framespacing=0>
YumRepo Warning: not using ftp, http[s], or file for repos, skipping -  <FRAME name=top src="http://www.searchnut.com/?domain=centos.org&registrar=directnic&affiliate=internal&aff_txt=This+domain+is+under+construction.&aff_url=" noresize>
YumRepo Warning: not using ftp, http[s], or file for repos, skipping - </FRAMESET>
YumRepo Warning: not using ftp, http[s], or file for repos, skipping - </HTML>
removing mirrorlist with no valid mirrors: //var/cache/yum/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base

It looks like it's pulling down a web page and trying to parse that to use it as the mirror list for yum. What confuses me even more is that I can either go the http link in a web browser or use wget and the proper file is retrieved. As I said, I've used the wget to pull down a file and then point the mirrorlist to that file, but it's a kludgey workaround for something that should work properly.
Here it the repo file used by yum:
Code:

[root@computer yum.repos.d]# cat CentOS-Base.repo
# CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# 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=file:/etc/yum/basemirrors.txt
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
proxy=_none_

#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=file:/etc/yum/updatesmirror.txt
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
enabled=1

#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
mirrorlist=file:/etc/yum/updatesmirror.txt
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
#baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
enabled=1

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=file:/etc/yum/updatesmirror.txt
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
enabled=1

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

And here is the /etc/yum.conf file:
Code:

[root@computer etc]# cat yum.conf
[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1

# Note: yum-RHN-plugin doesn't honor this.
metadata_expire=1h

# Default.
# installonly_limit = 3

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

I'm wondering if there is a proxy somewhere that is messing with my request, but I don't know how to check for that. Thanks for any help!

Simon Bridge 01-04-2009 02:16 AM

GIYF:
http://www.linuxquestions.org/questi...r-repo-478600/
http://forums.fedoraforum.org/showthread.php?t=189857

You can normally check with the sysadmin for details of a proxy.

stangdano 01-04-2009 10:16 PM

Quote:

Originally Posted by Simon Bridge (Post 3396474)
GIYF:
http://www.linuxquestions.org/questi...r-repo-478600/
http://forums.fedoraforum.org/showthread.php?t=189857

You can normally check with the sysadmin for details of a proxy.

Thanks for the response. I had been looking into this issue for many days now. I actually figured it out late last night. I had a search domain entry in my /etc/sysconfig/networking/profiles/default/resolv.conf
under the search heading which was longer relevant. I commented it out and my problem was resolved.
Thanks again for the feedback!

Simon Bridge 01-07-2009 07:03 AM

Well done and thanks for posting the fix.


All times are GMT -5. The time now is 10:49 AM.