Solved

Problem with yum update on Centos 5.4 32bit

Posted on 2013-11-10
12
588 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 3
  • 2
12 Comments
 
LVL 44

Expert Comment

by:Darr247
ID: 39638798
Try
# yum clean all
then try your update again.
0
 
LVL 35

Expert Comment

by:Seth Simmons
ID: 39638972
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
ID: 39640763
How can I determine how many and what versions of yum is currently installed?

# which python
/usr/bin/python
0
Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

 

Author Comment

by:JCTDD
ID: 39640765
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
ID: 39640767
#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
ID: 39640787
Next, run these 2

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

then do your yum update again.
0
 

Author Comment

by:JCTDD
ID: 39640809
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 35

Expert Comment

by:Seth Simmons
ID: 39641926
what happens when you do python -V ?
0
 

Author Comment

by:JCTDD
ID: 39679161
# python -V
Python 2.4.3
0
 

Author Comment

by:JCTDD
ID: 39689003
Anyone
0
 
LVL 44

Accepted Solution

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

Author Closing Comment

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

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

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). …
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
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 get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Suggested Courses

623 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