Solved

Problem with yum update on Centos 5.4 32bit

Posted on 2013-11-10
12
506 Views
Last Modified: 2014-01-05
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
0
Comment
Question by:JCTDD
  • 7
  • 3
  • 2
12 Comments
 
LVL 44

Expert Comment

by:Darr247
Comment Utility
Try
# yum clean all
then try your update again.
0
 
LVL 34

Expert Comment

by:Seth Simmons
Comment Utility
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
 

Author Comment

by:JCTDD
Comment Utility
How can I determine how many and what versions of yum is currently installed?

# which python
/usr/bin/python
0
 

Author Comment

by:JCTDD
Comment Utility
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
 

Author Comment

by:JCTDD
Comment Utility
#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
 
LVL 44

Expert Comment

by:Darr247
Comment Utility
Next, run these 2

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

then do your yum update again.
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:JCTDD
Comment Utility
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
 
LVL 34

Expert Comment

by:Seth Simmons
Comment Utility
what happens when you do python -V ?
0
 

Author Comment

by:JCTDD
Comment Utility
# python -V
Python 2.4.3
0
 

Author Comment

by:JCTDD
Comment Utility
Anyone
0
 
LVL 44

Accepted Solution

by:
Darr247 earned 500 total points
Comment Utility
Shut down (stop) all the services you can, then try running
# yum --noplugins --disablerepo=\* --enablerepo=base,updates update
0
 

Author Closing Comment

by:JCTDD
Comment Utility
Don't know if this is the correct solution. I don't have time for Linux.
0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
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.:

763 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

6 Experts available now in Live!

Get 1:1 Help Now