Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1551396

Summary: Error updating system data on the server, see /var/log/rhsm/rhsm.log for more details.
Product: Red Hat Enterprise Linux 6 Reporter: Wei Liu <weiliu>
Component: subscription-managerAssignee: Jiri Hnidek <jhnidek>
Status: CLOSED DUPLICATE QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: high Docs Contact:
Priority: urgent    
Version: 6.10CC: csnyder, jhnidek, qianzhan, skallesh, weiliu, yuxisun
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-08 12:10:49 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:
Attachments:
Description Flags
the rhsm log none

Description Wei Liu 2018-03-05 03:17:24 UTC
Created attachment 1404102 [details]
the rhsm log

Description of problem:
Try to register the system to stage server,an error message was output as below:
Error updating system data on the server, see /var/log/rhsm/rhsm.log for more details.

Version-Release number of selected component (if applicable):
[root@dhcp-129-198 ~]# rpm -qa | egrep "subscription|rhsm"
subscription-manager-rhsm-1.20.10-2.el6.x86_64
subscription-manager-1.20.10-2.el6.x86_64
subscription-manager-firstboot-1.20.10-2.el6.x86_64
subscription-manager-rhsm-certificates-1.20.10-2.el6.x86_64
subscription-manager-gui-1.20.10-2.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1.Install build RHEL-6.10-DevelPhaseExit-1.0(RHEL-6.10-20180301.2)
2.Try to Register the system to Stage server and check the output
[root@dhcp-129-198 ~]# subscription-manager register
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: rnew_test
Password: 
The system has been registered with ID: 279c158c-9876-4f38-bcbc-477c74b2f12f
The registered system name is: dhcp-129-198.nay.redhat.com
Error updating system data on the server, see /var/log/rhsm/rhsm.log for more details.
3.Check the rhsm.log
2018-03-04 21:46:14,250 [INFO] subscription-manager:27902:MainThread @connection.py:586 - Response: status=200, request="GET /subscription/"
2018-03-04 21:46:14,384 [ERROR] subscription-manager:27902:MainThread @cache.py:181 - Error updating system data on the server
2018-03-04 21:46:14,384 [ERROR] subscription-manager:27902:MainThread @cache.py:182 - decode() takes no keyword arguments
Traceback (most recent call last):
  File "/usr/lib64/python2.6/site-packages/subscription_manager/cache.py", line 173, in update_check
    self._sync_with_server(uep, consumer_uuid)
  File "/usr/lib64/python2.6/site-packages/subscription_manager/cache.py", line 430, in _sync_with_server
    self.current_profile.collect())
  File "/usr/lib64/python2.6/site-packages/rhsm/profile.py", line 149, in collect
    pkg_dicts.append(pkg.to_dict())
  File "/usr/lib64/python2.6/site-packages/rhsm/profile.py", line 53, in to_dict
    'vendor': self._normalize_string(self.vendor),  # bz1519512 handle vendors that aren't utf-8
  File "/usr/lib64/python2.6/site-packages/rhsm/profile.py", line 79, in _normalize_string
    return value.decode('utf-8', errors='replace')
TypeError: decode() takes no keyword arguments
2018-03-04 21:46:14,412 [ERROR] subscription-manager:27902:MainThread @managercli.py:181 - exception caught in subscription-manager
2018-03-04 21:46:14,412 [ERROR] subscription-manager:27902:MainThread @managercli.py:182 - Error updating system data on the server, see /var/log/rhsm/rhsm.log for more details.
Traceback (most recent call last):
  File "/usr/sbin/subscription-manager", line 96, in <module>
    sys.exit(abs(main() or 0))
  File "/usr/sbin/subscription-manager", line 87, in main
    return managercli.ManagerCLI().main()
  File "/usr/lib64/python2.6/site-packages/subscription_manager/managercli.py", line 2622, in main
    ret = CLI.main(self)
  File "/usr/lib64/python2.6/site-packages/subscription_manager/cli.py", line 181, in main
    return cmd.main()
  File "/usr/lib64/python2.6/site-packages/subscription_manager/managercli.py", line 496, in main
    return_code = self._do_command()
  File "/usr/lib64/python2.6/site-packages/subscription_manager/managercli.py", line 1148, in _do_command
    profile_mgr.update_check(self.cp, consumer['uuid'], True)
  File "/usr/lib64/python2.6/site-packages/subscription_manager/cache.py", line 418, in update_check
    return CacheManager.update_check(self, uep, consumer_uuid, force)
  File "/usr/lib64/python2.6/site-packages/subscription_manager/cache.py", line 183, in update_check
    raise Exception(_("Error updating system data on the server, see /var/log/rhsm/rhsm.log "
Exception: Error updating system data on the server, see /var/log/rhsm/rhsm.log for more details.

Actual results:
As step 2&3.

Expected results:
Register to Stage server successfully without error message


Additional info:

Comment 2 Wei Liu 2018-03-05 03:27:58 UTC
By the way,the exit code after registration is 70,not 0.
[root@dhcp-129-198 rhsm]# subscription-manager register
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: rnew_test
Password: 
The system has been registered with ID: 9f53460d-045c-493f-b019-a5701f94c2ad
The registered system name is: dhcp-129-198.nay.redhat.com
Error updating system data on the server, see /var/log/rhsm/rhsm.log for more details.
[root@dhcp-129-198 rhsm]# echo $?
70

Comment 3 Shwetha Kallesh 2018-03-05 13:06:09 UTC
register with auto-attach fails to attach subscriptions but registers the system

[root@localhost ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.2.2-1
subscription management rules: 5.26
subscription-manager: 1.20.10-2.el6


[root@localhost ~]# subscription-manager register --force --auto-attach
Unregistering from: subscription.rhsm.stage.redhat.com:443/subscription
The system with UUID e0251cb2-a640-4ded-b1bb-ad4daeb3a795 has been unregistered
All local data removed
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: shwetha_tier1_test
Password: 
The system has been registered with ID: 83611b10-3d50-4c71-b887-eb10e8c74c8d
The registered system name is: localhost.localdomain
Error updating system data on the server, see /var/log/rhsm/rhsm.log for more details.
[root@localhost ~]# subscription-manager list --consumed
No consumed subscription pools were found.
[root@localhost ~]# subscription-manager identity
system identity: 83611b10-3d50-4c71-b887-eb10e8c74c8d
name: localhost.localdomain
org name: 11343157
org ID: 11343157

Comment 5 Shwetha Kallesh 2018-03-08 09:08:34 UTC
Chris,

    Its fixed with following version of RHSM build from master,

[root@localhost ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.2.2-1
subscription management rules: 5.26
subscription-manager: 1.20.10-3.git.0.05d130a.el6


[root@localhost ~]# subscription-manager register --force
Unregistering from: subscription.rhsm.stage.redhat.com:443/subscription
The system with UUID 7d7788f0-3133-4325-984d-b81f05e243f2 has been unregistered
All local data removed
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: shwetha_tier1_test
Password: 
The system has been registered with ID: fc29ef07-790f-41ea-90f3-d2a507464df6
The registered system name is: localhost.localdomain
[root@localhost ~]# subscription-manager register --force --auto-attach
Unregistering from: subscription.rhsm.stage.redhat.com:443/subscription
The system with UUID fc29ef07-790f-41ea-90f3-d2a507464df6 has been unregistered
All local data removed
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: shwetha_tier1_test
Password: 
The system has been registered with ID: 8aeb2866-adfb-4acd-b183-1fd7a23989c5
The registered system name is: localhost.localdomain
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

[root@localhost ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   Red Hat OpenStack Platform, Premium (2-sockets) L3-Only
Provides:            Red Hat Beta
                     Red Hat OpenStack
                     Red Hat Ceph Storage
                     Red Hat Enterprise Linux Atomic Host
                     Red Hat Enterprise Linux Atomic Host Beta
                     Oracle Java (for RHEL Server)
                     Red Hat Ceph Storage Calamari
                     Red Hat OpenStack Beta
                     Red Hat Ceph Storage MON
                     Red Hat CloudForms
                     Red Hat Single Sign-On
                     Red Hat Software Collections (for RHEL Server)
                     Oracle Java (for RHEL Server) - Extended Update Support
                     Red Hat Software Collections Beta (for RHEL Server)
                     Red Hat Enterprise MRG Messaging
                     dotNET on RHEL (for RHEL Server)
                     Red Hat Enterprise Linux Server - Extended Update Support
                     dotNET on RHEL Beta (for RHEL Server)
                     Red Hat Enterprise Linux High Availability (for RHEL Server)
                     Red Hat Enterprise Linux High Availability (for RHEL Server) - Extended Update Support
                     Red Hat Enterprise Linux Load Balancer (for RHEL Server)
                     Red Hat Enterprise Linux Load Balancer (for RHEL Server) - Extended Update Support
                     Red Hat Enterprise Linux Server
SKU:                 MCT2898
Contract:            
Account:             6114661
Serial:              4570919985344707929
Pool ID:             8a99f98961f90e410162007a34525e39
Provides Management: No
Active:              True
Quantity Used:       1
Service Level:       Premium
Service Type:        L3
Status Details:      Subscription is current
Subscription Type:   Standard
Starts:              03/07/2018
Ends:                03/21/2018
System Type:         Virtual

Comment 6 Jiri Hnidek 2018-03-08 12:10:49 UTC
I can confirm that this is duplicate of 1551465.

*** This bug has been marked as a duplicate of bug 1551465 ***