Solved

YUM timing out. Possible proxy issue

Posted on 2015-02-11
14
301 Views
Last Modified: 2015-02-11
Yum appears to be unable to connect out. This is centos 6.5 (final) edition. no matter what yum command I run I get the following output:
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: mirror.sanctuaryhost.com
 * extras: mirror.ash.fastserv.com
 * update: mirror.sanctuaryhost.com
http://mirror.centos.org/centos/6/addons/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: addons. Please verify its path and try again

Open in new window



For example when running the simple: #yum info kernel

We are behind an anonymous internal proxy so my yum.conf file is here:

[root@DSUBAND889 bin]# more /etc/yum.conf
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=5
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=16&ref=http://bugs.centos.org/bug_report_page.php?category=yum
distroverpkg=centos-release
proxy=http://10.***.***.***:**** (actual ip and port hidden for this post)

Open in new window


Any help would be appreciated.
0
Comment
Question by:DITGUY
  • 7
  • 7
14 Comments
 
LVL 1

Expert Comment

by:furetto
ID: 40603476
Hello, Please try to access the  repomd.xml without yum, for example executing:


wget  http://mirror.centos.org/centos/6/addons/x86_64/repodata/repomd.xml


If the above command does not work you need to find the issue on the proxy or firewall, and as a conseguence it is not a yum issue.
0
 

Author Comment

by:DITGUY
ID: 40603534
wget http://mirror.centos.org/centos/6/addons/x86_64/repodata/repomd.xml
--2015-02-11 16:04:52--  http://mirror.centos.org/centos/6/addons/x86_64/repodata/repomd.xml
Connecting to 10.227.81.232:8080... connected.
Proxy request sent, awaiting response... 404 Not Found
2015-02-11 16:04:52 ERROR 404: Not Found.
0
 

Author Comment

by:DITGUY
ID: 40603537
i'm not really sure how to troubleshoot that. the proxy ip and port are used all over the place in our environment and work fine. we don't have a gui installed so I can't see how a browser would respond. is there somewhere else I need to put the proxy aside from the yum.conf file?
0
 
LVL 1

Expert Comment

by:furetto
ID: 40603552
Not a network issue, that link does not work. edit /etc/yum.repos.d/CentOS-Base.repo and modify "mirror.centos.org" to "mirrorlist.centos.org". That should fix it.

Example:

mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra

do it for all the mirror.centos.org you find.
0
 
LVL 1

Expert Comment

by:furetto
ID: 40603572
Maybe you copied the .repo from an older release....
you can use this for a centos6 install:
http://jpst.it/wEfT
0
 

Author Comment

by:DITGUY
ID: 40603576
this is my CentOS-Base.repo contents. most look to be using mirrorlist.centos.org not mirror.centos.org. Am I missing something?

[root@hostname bin]# more /etc/yum.repos.d/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=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$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=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$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=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$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=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$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=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

Open in new window

0
 

Author Comment

by:DITGUY
ID: 40603580
I don't know how it affects things as I don't understand these files but the main difference is the link on the site you gave has each line ending with this whereas mine doesn't:

&infra=$infra
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 1

Accepted Solution

by:
furetto earned 500 total points
ID: 40603611
did you try a
# yum clean all
# yum clean metadata



if not enought, do :
#cd /etc/yum.repos.d/
# grep mirror.centos.org *

and paste the output please
0
 

Author Comment

by:DITGUY
ID: 40603617
They are all commented out:

[root@hostname yum.repos.d]# grep mirror.centos.org *
CentOS-Base.repo:#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
CentOS-Base.repo:#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
CentOS-Base.repo:#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
CentOS-Base.repo:#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
CentOS-Base.repo:#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/

Open in new window

0
 
LVL 1

Expert Comment

by:furetto
ID: 40603648
try using my content on your centos-base, make a backup of the original file
0
 

Author Comment

by:DITGUY
ID: 40603654
I think the yum clean lines may have fixed it. waiting for all clear to run the commands originally intended. the yum info kernel command came back successfully after doing that. hadn't changed the centos-base content yet.
0
 
LVL 1

Expert Comment

by:furetto
ID: 40603684
ok, let me know.
0
 

Author Closing Comment

by:DITGUY
ID: 40603857
The cleanup did the trick though not sure why.
0
 
LVL 1

Expert Comment

by:furetto
ID: 40603858
because itw was searching the file in the wrong content, this way you "cleaned the cache"
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VMWARE Vcenter GUI defaults question about networks 10 85
Guacamole cut and paste issue 3 42
Guacamole and browser performance 1 62
Changing passwords in Linux Systems 3 39
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now