Bug 1266574

Summary: yum fails with codec error in iso-8859-2 locale
Product: Red Hat Enterprise Linux 6 Reporter: Mikuláš Patočka <mpatocka>
Component: rhn-client-toolsAssignee: Grant Gainey <ggainey>
Status: CLOSED ERRATA QA Contact: Pavel Studeník <pstudeni>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.8CC: ggainey, james.antill, jhutar, pstudeni, rdrazny, tlestach
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rhn-client-tools-1.0.0.1-34-el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-11 00:57:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mikuláš Patočka 2015-09-25 16:57:50 UTC
Description of problem:
When yum is running in iso-8859-2 locale, it reports this error when it can't reach the satellite server:

Zavedeny zásuvné moduly: product-id, refresh-packagekit, rhnplugin,
                       : subscription-manager
Chybná volba: 'utf8' codec can't decode byte 0xed in position 43: invalid continuation byte


Version-Release number of selected component (if applicable):
yum-3.2.29-69.el6.noarch

How reproducible:
Always

Steps to Reproduce:
1. Set iso-8859-2 locale: "export LANG=cs_CZ.iso-8859-2"
2. Make sure that the Red Hat Satellite server is down
3. Run "yum upgrade"

Actual results:
An error "Chybná volba: 'utf8' codec can't decode byte 0xed in position 43: invalid continuation byte" is reported

Expected results:
Yum should not report an error in utf8 codec.

Additional info:

Comment 2 Valentina Mukhamedzhanova 2015-09-29 14:27:49 UTC
The real traceback:

Traceback (most recent call last):
  File "/usr/share/yum-plugins/rhnplugin.py", line 138, in init_hook
    svrChannels = rhnChannel.getChannelDetails(timeout=timeout)
  File "/usr/share/rhn/up2date_client/rhnChannel.py", line 71, in getChannelDetails
    sourceChannels = getChannels(timeout=timeout)
  File "/usr/share/rhn/up2date_client/rhnChannel.py", line 98, in getChannels
    up2dateChannels = s.up2date.listChannels(up2dateAuth.getSystemId())
  File "/usr/share/rhn/up2date_client/rhnserver.py", line 51, in __call__
    return rpcServer.doCall(method, *args, **kwargs)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 217, in doCall
    e, attempt_count))
  File "/usr/share/rhn/up2date_client/up2dateLog.py", line 36, in log_me
    i = unicode(str(i), 'utf-8')
UnicodeDecodeError: 'utf8' codec can't decode byte 0xed in position 43: invalid continuation byte

Comment 5 Pavel Studeník 2016-01-26 15:29:31 UTC
Reproducer with rhn-client-tools-1.0.0.1-32.el6.noarch

Set bad hostname for serverURL in /etc/sysconfig/rhn/up2date

>> export LANG=cs_CZ.iso-8859-2

>> export echo LC_ALL=cs_CZ

>> yum upgrade
Zavedeny z�suvn� moduly: product-id, rhnplugin, security, subscription-manager
Chybn� volba: 'utf8' codec can't decode byte 0xe1 in position 40: invalid continuation byte


Verified with rhn-client-tools-1.0.0.1-38.el6.noarch.rpm

>> yum upgrade
Zavedeny z�suvn� moduly: product-id, rhnplugin, security, subscription-manager
There was an error communicating with RHN.
RHN Satellite or RHN Classic support will be disabled.
rhn-plugin: Chyba p�i komunikaci se serverem. Zpr�va byla:
Neznm jmno nebo sluba
Uspo��d�v� se pr�b�h aktualizace
��dn� bal��ky ozna�en� k aktualizaci

Comment 7 errata-xmlrpc 2016-05-11 00:57:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0939.html