Problem with yum update on Centos 5.4 32bit

I have a VM running Centos 5.4 (32bit). It's running GForge app server together with PostgreSQL.

I have not run yum update in years on this box.

As a result of very-high CPU usage by PostgresSQL, I ran yum update but got:

# yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in ?
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 309, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 178, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 345, in doCommands
    self._getTs(needTsRemove)
  File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 101, in _getTs
    self._getTsInfo(remove_only)
  File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 112, in _getTsInfo
    pkgSack = self.pkgSack
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 661, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 501, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.4/site-packages/yum/repos.py", line 232, in populateSack
    self.doSetup()
  File "/usr/lib/python2.4/site-packages/yum/repos.py", line 79, in doSetup
    self.ayum.plugins.run('postreposetup')
  File "/usr/lib/python2.4/site-packages/yum/plugins.py", line 179, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/lib/yum-plugins/fastestmirror.py", line 176, in postreposetup_hook
    if downgrade_ftp and _len_non_ftp(repo.urls) == 1:
  File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 676, in <lambda>
    urls = property(fget=lambda self: self._geturls(),
  File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 673, in _geturls
    self._baseurlSetup()
  File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 614, in _baseurlSetup
    mirrorurls.extend(self._getMirrorList())
  File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1622, in _getMirrorList
    fo = urlgrabber.grabber.urlopen(url, proxies=self.proxy_dict)
  File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 612, in urlopen
    return default_grabber.urlopen(url, **kwargs)
  File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 891, in urlopen
    return self._retry(opts, retryfunc, url)
  File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 852, in _retry
    r = apply(func, (opts,) + args, {})
  File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 890, in retryfunc
    return URLGrabberFileObject(url, filename=None, opts=opts)
  File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 1008, in __init__
    self._do_open()
  File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 1091, in _do_open
    fo, hdr = self._make_request(req, opener)
  File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 1204, in _make_request
    fo = opener.open(req)
  File "/usr/lib/python2.4/urllib2.py", line 358, in open
    response = self._open(req, data)
  File "/usr/lib/python2.4/urllib2.py", line 376, in _open
    '_open', req)
  File "/usr/lib/python2.4/urllib2.py", line 337, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.4/urllib2.py", line 573, in <lambda>
    lambda r, proxy=url, type=type, meth=self.proxy_open: \
  File "/usr/lib/python2.4/urllib2.py", line 580, in proxy_open
    if '@' in host:
TypeError: iterable argument required
[root@server1 ~]#


What's causing the yum update failure?

I can ping other servers in other subnets by name just and I know my proxy server works.

I have exported the relevanted HTTP_PROXY line in /etc/profile.d/proxy.sh
JCTDDAsked:
Who is Participating?
 
Darr247Connect With a Mentor Commented:
Shut down (stop) all the services you can, then try running
# yum --noplugins --disablerepo=\* --enablerepo=base,updates update
0
 
Darr247Commented:
Try
# yum clean all
then try your update again.
0
 
Seth SimmonsSr. Systems AdministratorCommented:
is there another python installation on the system?

i had this issue once where a legacy application was installed that used an older python library and because it was configured for the system path instead of the user path yum threw python errors as you see there.  once we changed that then yum used the correct, newer python version and it worked fine
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
JCTDDAuthor Commented:
How can I determine how many and what versions of yum is currently installed?

# which python
/usr/bin/python
0
 
JCTDDAuthor Commented:
I tried the 'yum clean all' and that appeared to run successfully.

But any other subsequent yum command fails with error like my original post.
0
 
JCTDDAuthor Commented:
#find / -name python
/usr/share/doc/m2crypto-0.16/demo/ZopeX3/install_dir/lib/python
/usr/share/doc/m2crypto-0.16/demo/Zope/lib/python
/usr/share/doc/m2crypto-0.16/demo/Zope27/install_dir/lib/python
/usr/lib/mailman/pythonlib/japanese/python
/usr/lib/mailman/pythonlib/korean/python
/usr/lib/python2.4/site-packages/japanese/python
/usr/bin/python
You have new mail in /var/spool/mail/root
0
 
Darr247Commented:
Next, run these 2

# rm /dev/urandom
# mknod -m 644 /dev/urandom c 1 9

then do your yum update again.
0
 
JCTDDAuthor Commented:
I took a snapshot of the VM.

# rm /dev/urandom
ran without a problem

# mknod -m 644 /dev/urandom c 1 9
complained that /dev/urandom already exists even though I just deleted it.

# yum update
failed as before.

I have since rolled back the snapshot.
0
 
Seth SimmonsSr. Systems AdministratorCommented:
what happens when you do python -V ?
0
 
JCTDDAuthor Commented:
# python -V
Python 2.4.3
0
 
JCTDDAuthor Commented:
Anyone
0
 
JCTDDAuthor Commented:
Don't know if this is the correct solution. I don't have time for Linux.
0
All Courses

From novice to tech pro — start learning today.