RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1483746 - UTF-8 encoding issues in D-Bus services
Summary: UTF-8 encoding issues in D-Bus services
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Jiri Hnidek
QA Contact: Jan Stavel
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-21 20:40 UTC by Kevin Howell
Modified: 2021-09-09 12:31 UTC (History)
7 users (show)

Fixed In Version: subscription-manager-1.20.2-1
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 09:51:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github RedHatQE rhsm-qe pull 684 0 None None None 2020-05-29 02:23:13 UTC
Github candlepin subscription-manager pull 1703 0 None closed 1483746: Force UTF-8 encoding in rhsm-service 2020-05-29 02:23:13 UTC
Red Hat Bugzilla 1480395 0 high CLOSED After updating to latest subscription manager, abrt dumps seen for servers with "System Locale: LANG=ja_JP.UTF-8" 2022-09-13 04:38:03 UTC
Red Hat Product Errata RHBA-2018:0681 0 None None None 2018-04-10 09:51:43 UTC

Internal Links: 1480395

Description Kevin Howell 2017-08-21 20:40:02 UTC
Description of problem:

ERROR in (PoolAttach-test) (attach_tests.clj:121)
Uncaught exception, not in assertion.
expected: nil
  actual: java.lang.AssertionError: Verification failed: (= stderr "")
	stderr : Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/dbus/service.py", line 707, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "<string>", line 2, in PoolAttach
  File "/usr/lib/python2.7/site-packages/rhsmlib/dbus/util.py", line 43, in dbus_handle_exceptions
    six.reraise(exceptions.RHSM1DBusException, "%s: %s" % (type(e).__name__, str(e)), trace)
  File "/usr/lib/python2.7/site-packages/rhsmlib/dbus/util.py", line 35, in dbus_handle_exceptions
    ret = func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/rhsmlib/dbus/objects/attach.py", line 87, in PoolAttach
    raise dbus.DBusException(str(e))
RHSM1DBusException: com.redhat.RHSM1.Error: UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-3: ordinal not in range(128)


Steps to Reproduce:
1. set system encoding to ja_JP.UTF-8
2. Use D-Bus services to try to attach to a pool.

Actual results:
Attach should succeed.

Expected results:
RHSM1DBusException: com.redhat.RHSM1.Error: UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-3: ordinal not in range(128)

Comment 7 Jan Stavel 2017-10-04 12:08:09 UTC
I have verified this bug.

[root@jstavel-rhel7-server-01 ~]# rpm -qa | egrep 'subscription|rhsm|cockpit'
   
   subscription-manager-plugin-container-1.20.1-1.git.73.4b01c26.el7.x86_64
   python-rhsm-1.20.1-1.git.42.4b01c26.el7.x86_64
   python-rhsm-certificates-1.20.1-1.git.42.4b01c26.el7.x86_64
   subscription-manager-initial-setup-addon-1.20.1-1.git.73.4b01c26.el7.x86_64
   cockpit-system-138-9.el7.noarch
   cockpit-dashboard-148-1.el7.x86_64
   subscription-manager-migration-data-2.0.37-1.git.0.d45a6c7.el7.noarch
   subscription-manager-gui-1.20.1-1.git.73.4b01c26.el7.x86_64
   subscription-manager-plugin-ostree-1.20.1-1.git.73.4b01c26.el7.x86_64
   cockpit-bridge-138-9.el7.x86_64
   subscription-manager-1.20.1-1.git.73.4b01c26.el7.x86_64
   subscription-manager-migration-1.20.1-1.git.73.4b01c26.el7.x86_64
   cockpit-ws-138-9.el7.x86_64


systemctl edit rhsm.service

  [Service]
  Environment="LANG=ja_JP.UTF-8"
  Environment="LC_ALL=ja_JP.UTF-8"

systemctl daemon-reload
systemctl restart rhsm.service

subscription-manager register

systemctl restart rhsm.service # the service knows older state. It needs to be refreshed.

 busctl call com.redhat.RHSM1 /com/redhat/RHSM1/Attach com.redhat.RHSM1.Attach AutoAttach 'sa{sv}' Standard 0

   I see s list of subscriptions.

and I see a japaness letters in journalctl.



   10月 04 08:01:01 jstavel-rhel7-server-01.usersys.redhat.com rhsm-service[12162]: INFO [rhsm.connection:556] Response: status=200, requestUuid=9022903f-c5cc-4ced-bc7d-59b9fad53f45, request="G
   10月 04 08:01:01 jstavel-rhel7-server-01.usersys.redhat.com rhsm-service[12162]: INFO [subscription_manager.entcertlib:131] certs updated:
   10月 04 08:01:01 jstavel-rhel7-server-01.usersys.redhat.com rhsm-service[12162]: 全ての更新: 1
   10月 04 08:01:01 jstavel-rhel7-server-01.usersys.redhat.com rhsm-service[12162]: 見付かった (ローカル) シリアル # []
   10月 04 08:01:01 jstavel-rhel7-server-01.usersys.redhat.com rhsm-service[12162]: 予期される (UEP) シリアル# [4528066276740481154]
   10月 04 08:01:01 jstavel-rhel7-server-01.usersys.redhat.com rhsm-service[12162]: 追加 (新規)
   10月 04 08:01:01 jstavel-rhel7-server-01.usersys.redhat.com rhsm-service[12162]: [sn:4528066276740481154 (Red Hat Beta,) @ /etc/pki/entitlement/4528066276740481154.pem]
   10月 04 08:01:01 jstavel-rhel7-server-01.usersys.redhat.com rhsm-service[12162]: [sn:4528066276740481154 (Red Hat Hardware Certification Test Suite,) @ /etc/pki/entitlement/45280662767404811
   10月 04 08:01:01 jstavel-rhel7-server-01.usersys.redhat.com rhsm-service[12162]: [sn:4528066276740481154 (Red Hat Software Collections Beta (for RHEL Server),) @ /etc/pki/entitlement/4528066
   10月 04 08:01:01 jstavel-rhel7-server-01.usersys.redhat.com rhsm-service[12162]: [sn:4528066276740481154 (Oracle Java (for RHEL Server),) @ /etc/pki/entitlement/4528066276740481154.pem]
   10月 04 08:01:01 jstavel-rhel7-server-01.usersys.redhat.com rhsm-service[12162]: [sn:4528066276740481154 (Red Hat Enterprise Linux Server,) @ /etc/pki/entitlement/4528066276740481154.pem]
   10月 04 08:01:01 jstavel-rhel7-server-01.usersys.redhat.com rhsm-service[12162]: [sn:4528066276740481154 (Red Hat Enterprise Linux Resilient Storage (for RHEL Server),) @ /etc/pki/entitlemen
   10月 04 08:01:01 jstavel-rhel7-server-01.usersys.redhat.com rhsm-service[12162]: [sn:4528066276740481154 (Red Hat Enterprise Linux High Availability (for RHEL Server),) @ /etc/pki/entitlemen
   10月 04 08:01:01 jstavel-rhel7-server-01.usersys.redhat.com rhsm-service[12162]: [sn:4528066276740481154 (Red Hat Enterprise Linux Load Balancer (for RHEL Server),) @ /etc/pki/entitlement/45
   10月 04 08:01:01 jstavel-rhel7-server-01.usersys.redhat.com rhsm-service[12162]: 削除済み (変異品):
   10月 04 08:01:01 jstavel-rhel7-server-01.usersys.redhat.com rhsm-service[12162]: <NONE>
   10月 04 08:01:01 jstavel-rhel7-server-01.usersys.redhat.com subscription-manager[12162]: Added subscription for 'Red Hat Enterprise Linux AS, Standard' contract '11480566'
   10月 04 08:01:01 jstavel-rhel7-server-01.usersys.redhat.com subscription-manager[12162]: Added subscription for product 'Red Hat Beta'

Comment 8 Jan Stavel 2017-10-04 12:59:58 UTC
verified. It works now.

Comment 11 errata-xmlrpc 2018-04-10 09:51:13 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://access.redhat.com/errata/RHBA-2018:0681


Note You need to log in before you can comment on or make changes to this bug.