The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Yum error - Don't know how to fix

Discussion in 'General Discussion' started by rohit09, Jun 17, 2011.

  1. rohit09

    rohit09 Well-Known Member

    Joined:
    Dec 10, 2010
    Messages:
    59
    Likes Received:
    0
    Trophy Points:
    6
    When I try Yum update or any thing I got error . This is from my Dedicated Server

    -------------
    Unable to find pid
    Gathering header information file(s) from server(s)
    Server: Red Hat Linux 5 - x86_64 - Base
    Traceback (most recent call last):
    File "/usr/bin/yum", line 30, in ?
    yummain.main(sys.argv[1:])
    File "/usr/share/yum/yummain.py", line 233, in main
    clientStuff.get_package_info_from_servers(serverlist, HeaderInfo)
    File "/usr/share/yum/clientStuff.py", line 846, in get_package_info_from_servers
    progress_obj=None)
    File "/usr/share/yum/clientStuff.py", line 1327, in grab
    bandwidth, conf.retries, retrycodes, checkfunc)
    File "/usr/share/yum/urlgrabber.py", line 237, in retrygrab
    progress_obj, throttle, bandwidth)
    File "/usr/share/yum/urlgrabber.py", line 314, in urlgrab
    fo = urllib2.urlopen(url)
    File "/usr/lib64/python2.4/urllib2.py", line 130, in urlopen
    return _opener.open(url, data)
    File "/usr/lib64/python2.4/urllib2.py", line 358, in open
    response = self._open(req, data)
    File "/usr/lib64/python2.4/urllib2.py", line 376, in _open
    '_open', req)
    File "/usr/lib64/python2.4/urllib2.py", line 337, in _call_chain
    result = func(*args)
    File "/usr/share/yum/keepalive.py", line 176, in http_open
    return self.do_open(HTTPConnection, req)
    File "/usr/share/yum/keepalive.py", line 173, in do_open
    return self.parent.error('http', req, r, r.status, r.reason, r.msg)
    File "/usr/lib64/python2.4/urllib2.py", line 396, in error
    result = self._call_chain(*args)
    File "/usr/lib64/python2.4/urllib2.py", line 337, in _call_chain
    result = func(*args)
    File "/usr/lib64/python2.4/urllib2.py", line 565, in http_error_302
    return self.parent.open(new)
    File "/usr/lib64/python2.4/urllib2.py", line 358, in open
    response = self._open(req, data)
    File "/usr/lib64/python2.4/urllib2.py", line 376, in _open
    '_open', req)
    File "/usr/lib64/python2.4/urllib2.py", line 337, in _call_chain
    result = func(*args)
    File "/usr/share/yum/keepalive.py", line 176, in http_open
    return self.do_open(HTTPConnection, req)
    File "/usr/share/yum/keepalive.py", line 173, in do_open
    return self.parent.error('http', req, r, r.status, r.reason, r.msg)
    File "/usr/lib64/python2.4/urllib2.py", line 396, in error
    result = self._call_chain(*args)
    File "/usr/lib64/python2.4/urllib2.py", line 337, in _call_chain
    result = func(*args)
    File "/usr/lib64/python2.4/urllib2.py", line 565, in http_error_302
    return self.parent.open(new)
    File "/usr/lib64/python2.4/urllib2.py", line 358, in open
    response = self._open(req, data)
    File "/usr/lib64/python2.4/urllib2.py", line 376, in _open
    '_open', req)
    File "/usr/lib64/python2.4/urllib2.py", line 337, in _call_chain
    result = func(*args)
    File "/usr/share/yum/keepalive.py", line 176, in http_open
    return self.do_open(HTTPConnection, req)
    File "/usr/share/yum/keepalive.py", line 173, in do_open
    return self.parent.error('http', req, r, r.status, r.reason, r.msg)
    File "/usr/lib64/python2.4/urllib2.py", line 396, in error
    result = self._call_chain(*args)
    File "/usr/lib64/python2.4/urllib2.py", line 337, in _call_chain
    result = func(*args)
    File "/usr/lib64/python2.4/urllib2.py", line 565, in http_error_302
    return self.parent.open(new)
    File "/usr/lib64/python2.4/urllib2.py", line 358, in open
    response = self._open(req, data)
    File "/usr/lib64/python2.4/urllib2.py", line 376, in _open
    '_open', req)
    File "/usr/lib64/python2.4/urllib2.py", line 337, in _call_chain
    result = func(*args)
    File "/usr/share/yum/keepalive.py", line 176, in http_open
    return self.do_open(HTTPConnection, req)
    File "/usr/share/yum/keepalive.py", line 173, in do_open
    return self.parent.error('http', req, r, r.status, r.reason, r.msg)
    File "/usr/lib64/python2.4/urllib2.py", line 396, in error
    result = self._call_chain(*args)
    File "/usr/lib64/python2.4/urllib2.py", line 337, in _call_chain
    result = func(*args)
    File "/usr/lib64/python2.4/urllib2.py", line 565, in http_error_302
    return self.parent.open(new)
    File "/usr/lib64/python2.4/urllib2.py", line 358, in open
    response = self._open(req, data)
    File "/usr/lib64/python2.4/urllib2.py", line 376, in _open
    '_open', req)
    File "/usr/lib64/python2.4/urllib2.py", line 337, in _call_chain
    result = func(*args)
    File "/usr/share/yum/keepalive.py", line 176, in http_open
    return self.do_open(HTTPConnection, req)
    File "/usr/share/yum/keepalive.py", line 173, in do_open
    return self.parent.error('http', req, r, r.status, r.reason, r.msg)
    File "/usr/lib64/python2.4/urllib2.py", line 396, in error
    result = self._call_chain(*args)
    File "/usr/lib64/python2.4/urllib2.py", line 337, in _call_chain
    result = func(*args)
    File "/usr/lib64/python2.4/urllib2.py", line 565, in http_error_302
    return self.parent.open(new)
    File "/usr/lib64/python2.4/urllib2.py", line 358, in open
    response = self._open(req, data)
    File "/usr/lib64/python2.4/urllib2.py", line 376, in _open
    '_open', req)
    File "/usr/lib64/python2.4/urllib2.py", line 337, in _call_chain
    result = func(*args)
    File "/usr/share/yum/keepalive.py", line 176, in http_open
    return self.do_open(HTTPConnection, req)
    File "/usr/share/yum/keepalive.py", line 173, in do_open
    return self.parent.error('http', req, r, r.status, r.reason, r.msg)
    File "/usr/lib64/python2.4/urllib2.py", line 396, in error
    result = self._call_chain(*args)
    File "/usr/lib64/python2.4/urllib2.py", line 337, in _call_chain
    result = func(*args)
    File "/usr/lib64/python2.4/urllib2.py", line 565, in http_error_302
    return self.parent.open(new)
    File "/usr/lib64/python2.4/urllib2.py", line 364, in open
    response = meth(req, response)
    File "/usr/lib64/python2.4/urllib2.py", line 468, in http_response
    code, msg, hdrs = response.code, response.msg, response.info()
    AttributeError: HTTPResponse instance has no attribute 'code'
    You have new mail in /var/spool/mail/root
    -----------------------------------------------
    How to fix it :(
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Do you have the following directory?

    Code:
    ls -lah /var/cache/yum
    If not, try creating the directory:

    Code:
    mkdir -p /var/cache/yum
    Otherwise, please post the output of these commands:

    Code:
    rpm -q yum
    cat /etc/yum.conf
    ls -1 /etc/yum.repos.d/
     
  3. rohit09

    rohit09 Well-Known Member

    Joined:
    Dec 10, 2010
    Messages:
    59
    Likes Received:
    0
    Trophy Points:
    6
    [root@node]# ls -lah /var/cache/yum
    total 16K
    drwxr-xr-x 3 root root 4.0K Jun 18 22:10 .
    drwxr-xr-x 7 root root 4.0K Jun 18 22:08 ..
    drwxr-xr-x 3 root root 4.0K Jun 18 22:11 base
    -rw-r--r-- 1 root root 0 Jun 18 22:10 .gpgkeyschecked.yum
    You have new mail in /var/spool/mail/root
    [root@node]#
     
  4. rohit09

    rohit09 Well-Known Member

    Joined:
    Dec 10, 2010
    Messages:
    59
    Likes Received:
    0
    Trophy Points:
    6
    But when i Try yum update

     
  5. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    This is an entirely new error you are posting. Please post the output of the other commands I indicated earlier:

    Code:
    rpm -q yum
    cat /etc/yum.conf
    ls -1 /etc/yum.repos.d/
    Additionally, please post the output of this command:

    Code:
    cat /etc/yum.repos.d/CentOS-Base.repo
     
  6. kbob

    kbob Member

    Joined:
    May 30, 2011
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    @rohit09

    Speaking from my own experience, the primary error yum has provided you wtih is usually known to happen for one of the following reasons :

    1) You have added invalid repository which is inactive and not even browse-able.
    2) You have updated or removed a python library or module which is breaking the overall configuration for yum

    And the last error you provided is for an invalid repository which is no longer activee :

    I am guessing you have this repository added as a secondary one in your /etc/yum.repos.d/ , please make sure to remove it and clear all of the currently cached informaton using :

    Although @Tristan is correct and you may have invalid URLs inside the rhel-base.repo file ( as much as i can see you are using RHEL release not CentOS )
     
  7. rohit09

    rohit09 Well-Known Member

    Joined:
    Dec 10, 2010
    Messages:
    59
    Likes Received:
    0
    Trophy Points:
    6
    After this I use the other command
     
  8. kbob

    kbob Member

    Joined:
    May 30, 2011
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    The error seems to be from the yum.conf file the following lines need to be removed :

    After the removal please run again :

    And you should be good to go.
     
  9. rohit09

    rohit09 Well-Known Member

    Joined:
    Dec 10, 2010
    Messages:
    59
    Likes Received:
    0
    Trophy Points:
    6
    Thank You
    Code:
    cPanelTristan and kbob 
    and other guys who thought about to help me... Problem solve :)
     
  10. kbob

    kbob Member

    Joined:
    May 30, 2011
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    @rohit09 you are most welcome !

    Only one thing, i would recommend not using RPMForge repositories for an OpenVZ main node setup since you will experience conflicts during the overall installation of most packages. And OpenVZ uses it's own repository to add properly rpm packages to the system and run updates.
     
Loading...

Share This Page