How you fix url grabber error on yum update/upgrade/install on CentOS7( SSH and Yum don’t work in CentOS 7)

There is an error of python-urlgrabber that is generally used by yum
Transaction Summary
=======================================================================
Install    8 Packages (+30 Dependent packages)
Upgrade  500 Packages

Total size: 556 M
Total download size: 548 M
Is this ok [y/d/N]: y
Downloading packages:
No Presto metadata available for base
Delta RPMs reduced 30 M of updates to 1.3 M (95% saved)
(1/524): freerdp-libs-1.0.2-5.el7_1.0.2-5.el7_1.1.x86_64.d |  26 kB   00:21     
(2/524): flac-libs-1.3.0-4.el7_1.3.0-5.el7_1.x86_64.drpm   |  27 kB   00:23     
iputils-20121221-6.el7_2012122 FAILED                                           
http://mirror.digistar.vn/centos/7.1.1503/updates/x86_64/drpms/iputils-20121221-6.el7_20121221-6.el7_1.1.x86_64.drpm: [Errno 14] curl#18 – “transfer closed with 111475 bytes remaining to read”
Trying other mirror.
(3/524): gdk-pixbuf2-2.28.2-4.el7_2.28.2-5.el7_1.x86_64.dr |  75 kB   00:03     
(4/524): centos-logos-70.0.6-1.el7.centos_70.0.6-2.el7.cen |  53 kB   00:26     
(5/524): libuser-0.60-5.el7_0.60-7.el7_1.x86_64.drpm       | 122 kB   00:01     
(6/524): python-2.7.5-16.el7_2.7.5-18.el7_1.1.x86_64.drpm  |  58 kB   00:01     
(7/524): freetype-2.4.11-9.el7_2.4.11-10.el7_1.1.x86_64.dr |  62 kB   00:26     
(8/524): python-chardet-2.0.1-7.el7_2.2.1-1.el7_1.noarch.d |  42 kB   00:02     
(9/524): python-libs-2.7.5-16.el7_2.7.5-18.el7_1.1.x86_64. | 506 kB   00:03     
(10/524): freerdp-plugins-1.0.2-5.el7_1.0.2-5.el7_1.1.x86_ |  27 kB   00:31     
(11/524): unzip-6.0-13.el7_6.0-15.el7.x86_64.drpm          | 119 kB   00:02     
(12/524): NetworkManager-adsl-1.0.0-16.git20150121.b4ea599 | 122 kB   00:03     
sqlite-3.7.17-4.el7_3.7.17-6.e FAILED                                           
http://mirrors.vinahost.vn/centos/7.1.1503/updates/x86_64/drpms/sqlite-3.7.17-4.el7_3.7.17-6.el7_1.1.x86_64.drpm: [Errno -1] Package does not match intended download. Suggestion: run yum –enablerepo=updates clean metadata
Trying other mirror.
(13/524): NetworkManager-bluetooth-1.0.0-16.git20150121.b4 | 141 kB   00:03     
(14/524): NetworkManager-1.0.0-16.git20150121.b4ea599c.el7 | 1.9 MB   00:09     
Traceback (most recent call last):              ] 224 kB/s | 3.3 MB   39:18 ETA 
  File “/usr/libexec/urlgrabber-ext-down”, line 75, in
    main()
  File “/usr/libexec/urlgrabber-ext-down”, line 61, in main
    fo = PyCurlFileObject(opts.url, opts.filename, opts)
  File “/usr/lib/python2.7/site-packages/urlgrabber/grabber.py”, line 1258, in __init__
    self._do_open()
  File “/usr/lib/python2.7/site-packages/urlgrabber/grabber.py”, line 1589, in _do_open
    self._do_grab()
  File “/usr/lib/python2.7/site-packages/urlgrabber/grabber.py”, line 1723, in _do_grab
    self._do_perform()
  File “/usr/lib/python2.7/site-packages/urlgrabber/grabber.py”, line 1517, in _do_perform
    raise KeyboardInterrupt
KeyboardInterrupt
(15/524): NetworkManager-glib-1.0.0-16.git20150121.b4ea599 | 376 kB   00:02     
(16/524): libuser-python-0 0% [                 ] 299 kB/s | 4.0 MB   29:27 ETA 

Exiting on user cancel
[root@localhost ~]# 


To Fix This issue:

To fix this issue you edit grabber.py file 
File Path:  /usr/lib/python2.7/site-packages/urlgrabber/
 
[root@localhost ~]# vim /usr/lib/python2.7/site-packages/urlgrabber/grabber.py

 goto the line no. 1510 and
 Replace   elif errcode in (42, 55, 56):  with  elif errcode == 42: 
After this change save file and exit from editor

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s