LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 03-08-2008, 10:29 AM   #1
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Rep: Reputation: 60
Centos 5 YUM/Proxy


Here is my yum.conf:

PHP Code:
[main]
cachedir=/var/cache/yum
keepcache
=1
debuglevel
=2
logfile
=/var/log/yum.log
pkgpolicy
=newest
distroverpkg
=redhat-release
tolerant
=1
exactarch
=1
obsoletes
=1
gpgcheck
=1
plugins
=1
metadata_expire
=1800
proxy
="http://192.168.3.1:8080"
#export http_proxy
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d 
when I perform yum update O get this:

PHP Code:
yum update
Loading 
"installonlyn" plugin
Setting up Update Process
Setting up repositories
rpmforge                  100
% |=========================| 1.1 kB    00:00     
Reading repository metadata in from local files
primary
.xml.gz            100% |=========================| 1.6 MB    00:14     
################################################## 6516/6516
Resolving Dependencies
--> Populating transaction set with selected packagesPlease wait.
---> 
Downloading header for perl-IO-Socket-INET6 to pack into transaction set.
perl-IO-Socket-INET6-2.54 100% |=========================|    0 B    00:29     
http
://mirror.cpsc.ucalgary.ca/mirror/dag/redhat/el5/en/i386/dag/RPMS/perl-IO-Socket-INET6-2.54-1.el5.rf.noarch.rpm: [Errno 4] Socket Error: timed out
Trying other mirror.
perl-IO-Socket-INET6-2.54 100% |=========================|    0 B    00:29     
http
://mirrors.ircam.fr/pub/dag/redhat/el5/en/i386/dag/RPMS/perl-IO-Socket-INET6-2.54-1.el5.rf.noarch.rpm: [Errno 4] Socket Error: timed out
Trying other mirror.
http://ftp2.lcpe.uni-sofia.bg/freshrpms/pub/dag/redhat/el5/en/i386/dag/RPMS/perl-IO-Socket-INET6-2.54-1.el5.rf.noarch.rpm: [Errno 12] Timeout: <urlopen error timed out>
Trying other mirror.
perl-IO-Socket-INET6-2.54 100% |=========================|    0 B    00:29     
http
://apt.sw.be/redhat/el5/en/i386/dag/RPMS/perl-IO-Socket-INET6-2.54-1.el5.rf.noarch.rpm: [Errno 4] Socket Error: timed out
Trying other mirror.
perl-IO-Socket-INET6-2.54 100% |=========================|    0 B    00:29     
http
://ftp-stud.fht-esslingen.de/dag/redhat/el5/en/i386/dag/RPMS/perl-IO-Socket-INET6-2.54-1.el5.rf.noarch.rpm: [Errno 4] Socket Error: timed out
Trying other mirror.
perl-IO-Socket-INET6-2.54 100% |=========================|    0 B    00:29     
http
://rpmfind.net/linux/dag/redhat/el5/en/i386/dag/RPMS/perl-IO-Socket-INET6-2.54-1.el5.rf.noarch.rpm: [Errno 4] Socket Error: timed out
Trying other mirror.
perl-IO-Socket-INET6-2.54 100% |=========================|    0 B    00:29     
http
://apt.sw.be/redhat/el5/en/i386/dag/RPMS/perl-IO-Socket-INET6-2.54-1.el5.rf.noarch.rpm: [Errno 4] Socket Error: timed out
Trying other mirror.
perl-IO-Socket-INET6-2.54 100% |=========================|    0 B    00:29     
http
://rh-mirror.linux.iastate.edu/pub/dag/redhat/el5/en/i386/dag/RPMS/perl-IO-Socket-INET6-2.54-1.el5.rf.noarch.rpm: [Errno 4] Socket Error: timed out
Trying other mirror
I have tried in my yum.conf and nothing works but I can browse the internet!

PHP Code:
http_proxy="http://192.168.3.1:8080"
export http_proxy 
I have run out of options. help!
 
Old 03-08-2008, 07:13 PM   #2
zQUEz
Member
 
Registered: Jun 2007
Distribution: Fedora, RHEL, Centos
Posts: 294

Rep: Reputation: 54
My immediate thought regarding your 'proxy' statement in yum.conf, is have you tried without the "" surrounding the proxy url? I wouldn't think this would help, though I have never used them and I don't recall seeing in doco this way. Shouldn't be too hard to test. Also, try a `yum clean all` command to flush all the cached yum data.

Next thought, is do you have access to the proxy server logs? If so, have you checked them to confirm that your yum is in fact trying to use the proxy. Also, check any other obvious errors from the proxy server side.

Further troubleshooting you could do, is either iptables logs (assuming you are using iptables) to see where the traffic is going and/or tcpdump to see what the http headers are reporting.

Also I know for a fact the yum.conf, proxy, entry does work, but don't know if it takes precedance over the http_proxy environment variable. If you have it set, try clearing it, do make sure only the yum.conf setting is being used.

Finally, have you added a "logfile" parameter to your yum.conf? This is not on by default, but will allow you to have yum write to a log file. This may give you some more clues as to the source of the problem. Check out `man yum.conf` for further details on logging.
 
Old 03-10-2008, 05:30 AM   #3
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Original Poster
Rep: Reputation: 60
I set a port on my switch for SPAN and I have collected data that I will analyize tonight. I will also look at the firewall logs and well as the squids logs as well. I have other machines on the same subnet that do have any problems at all downloading and uploading things going through the proxy. So it wouldnt supprise me if I dont see anything abnormal. It has to be something on that server.
 
Old 03-11-2008, 04:07 AM   #4
zQUEz
Member
 
Registered: Jun 2007
Distribution: Fedora, RHEL, Centos
Posts: 294

Rep: Reputation: 54
Did you try any of the easy stuff I mentioned?
I went an did a quick test on my Fedora8 PC which isn't going to be too much different from a yum standpoint, and found that if I have "" around my proxy line in yum.conf, I do get an error when I try to run yum. SO ... did you remove the quotes and test?

Here is a text log from my quick test:
[root@fedora ~]# cat /etc/yum.conf |grep proxy
proxy="http://192.168.1.200:3128"
[root@fedora ~]# yum list
Options Error: Error parsing '"http://192.168.1.200:3128"': URL must be http, ftp or https not ""
[root@fedora ~]# cat /etc/yum.conf |grep proxy
proxy=http://192.168.1.200:3128
[root@fedora ~]# yum list
livna 100% |=========================| 2.1 kB 00:00
fedora 2.1 kB 00:00
adobe-linux-i386 100% |=========================| 951 B 00:00
updates 100% |=========================| 2.3 kB 00:00
.
.
.
.
.
[and so on]
 
Old 03-11-2008, 09:14 AM   #5
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Original Poster
Rep: Reputation: 60
I will try it this evening. I will give you an update soon. thanks
 
Old 11-17-2008, 07:22 AM   #6
riaanl
LQ Newbie
 
Registered: Nov 2008
Posts: 2

Rep: Reputation: 0
You have to also add a trailing slash or you might get:
Code:
Loading "fastestmirror" plugin
Determining fastest mirrors
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=x86_64&repo=os error was
[Errno 4] IOError: <urlopen error nonnumeric port: '8080?'>
 
Old 01-30-2009, 11:53 AM   #7
unixmen
Member
 
Registered: Jan 2009
Posts: 39

Rep: Reputation: 16
just add this line to you yum.conf
proxy=http://come.com:80/


[root@localhost ~]# yum update
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package nfs-utils.i386 1:1.0.9-35z.el5_2 set to be updated
---> Package openoffice.org-draw.i386 1:2.3.0-6.5.4.el5_2 set to be updated
---> Package libxml2-devel.i386 0:2.6.26-2.1.2.7 set to be updated
---> Package OpenIPMI.i386 0:2.0.6-6.el5_2.2 set to be updated
---> Package kernel-headers.i386 0:2.6.18-92.1.22.el5 set to be updated
---> Package nss.i386 0:3.12.2.0-2.el5.centos set to be updated
---> Package desktop-printing.i386 0:0.19-20.2.el5 set to be updated
---> Package dmraid.i386 0:1.0.0.rc13-15.el5_2.1 set to be updated
---> Package pam_krb5.i386 0:2.2.14-1.el5_2.1 set to be updated
---> Package krb5-devel.i386 0:1.6.1-25.el5_2.2 set to be updated


its works for me
 
  


Reply



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
error yum centos 5 crosswing Linux - Distributions 1 04-24-2007 03:34 PM
Centos: Using Yum and Tomcat Swakoo Linux - General 2 03-28-2007 12:46 AM
CENTOS 4.4 and YUM metallica1973 Linux - Software 9 11-14-2006 02:51 PM
Problem with yum in CentOS 4.3 combilli Linux - Software 2 10-31-2006 03:39 AM
update centos 4 rc1 to centos 4 trou yum? maxut cAos 2 03-04-2005 02:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 10:43 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
Open Source Consulting | Domain Registration