Bug 888790

Summary: Not able to register client to katello using activationkey with subscription-manager-gui.
Product: Red Hat Enterprise Linux 6 Reporter: spandey
Component: subscription-managerAssignee: Alex Wood <awood>
Status: CLOSED ERRATA QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: high Docs Contact:
Priority: high    
Version: 6.4CC: jmolet, jsefler, kbanerje, omaciel, skallesh, spandey, tlavigne, tomckay
Target Milestone: rcKeywords: QA-Closed
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 09:04:46 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:
Bug Depends On:    
Bug Blocks: 771481    
Attachments:
Description Flags
error screenshot
none
rhsm.log output none

Description spandey 2012-12-19 13:39:36 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:
4/4

Prerequisites :
Rhel6.4 with following subscription-manager rpm 
subscription-manager-migration-1.1.18-1.el6.x86_64 
subscription-manager-migration-data-1.12.2.6-1.el6.noarch 
subscription-manager-gui-1.1.18-1.el6.x86_64 
subscription-manager-1.1.18-1.el6.x86_64 
subscription-manager-firstboot-1.1.18-1.el6.x86_64 


Steps to Repro : 
Login to client and launch subsription-manager-gui. 
Register client to katello using valid activationkey from subscription-manager-gui.


Expected Result : 
Client should register to katello and no error should display on screen. 

Actual Result :  
Registration process failed with errorbox with following error message 
“Error updating system data on the server,”


Error message recorded in rhsm.log 

2012-12-19 17:59:28,482 [DEBUG]  @connection.py:342 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2012-12-19 17:59:28,486 [DEBUG]  @connection.py:381 - Making request: PUT /katello/api/consumers/3fb1b788-0fa4-40eb-a9fa-f7b120308081/packages
2012-12-19 17:59:29,064 [DEBUG]  @connection.py:394 - Response status: 401
2012-12-19 17:59:29,065 [ERROR]  @connection.py:411 - No JSON object could be decoded
Traceback (most recent call last):
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 409, in validateResponse
    parsed = json.loads(response['content'], object_hook=self._decode_dict)
  File "/usr/lib64/python2.6/site-packages/simplejson/__init__.py", line 318, in loads
    return cls(encoding=encoding, **kw).decode(s)
  File "/usr/lib64/python2.6/site-packages/simplejson/decoder.py", line 335, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib64/python2.6/site-packages/simplejson/decoder.py", line 353, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
2012-12-19 17:59:29,068 [ERROR]  @connection.py:412 - Response: {'content': 'No Credentials provided', 'status': 401}
2012-12-19 17:59:29,069 [ERROR]  @cache.py:170 - Error updating system data on the server
2012-12-19 17:59:29,069 [ERROR]  @cache.py:171 - Network error code: 401
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/cache.py", line 164, in update_check
    self._update_server(uep, consumer_uuid)
  File "/usr/share/rhsm/subscription_manager/cache.py", line 230, in _update_server
    self.current_profile.collect())
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 674, in updatePackageProfile
    ret = self.conn.request_put(method, pkg_dicts)
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 446, in request_put
    return self._request("PUT", method, params)
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 399, in _request
    self.validateResponse(result)
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 417, in validateResponse
    raise NetworkException(response['status'])
NetworkException: Network error code: 401
2012-12-19 17:59:29,077 [ERROR]  @utils.py:68 - Error updating system data on the server, see /var/log/rhsm/rhsm.log for more details.
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/gui/registergui.py", line 309, in _on_registration_finished_cb
    raise error
Exception: Error updating system data on the server, see /var/log/rhsm/rhsm.log for more details.


Attached error screenshot , and rhsm.log output

Comment 1 spandey 2012-12-19 13:42:29 UTC
Created attachment 666085 [details]
error screenshot

Comment 2 spandey 2012-12-19 13:42:57 UTC
Created attachment 666086 [details]
rhsm.log output

Comment 4 Alex Wood 2012-12-20 14:07:57 UTC
commit b6f50e078fd79410ff7479ba70f7909a787e578d
Author: Alex Wood <awood>
Date:   Wed Dec 19 16:50:53 2012 -0500

    888790: Rebuild UEP connection after registering with activation keys.

Comment 7 spandey 2013-01-09 11:50:09 UTC
Verified using following rpm 

subscription-manager-1.1.19-1.el6.x86_64
subscription-manager-migration-1.1.19-1.el6.x86_64
subscription-manager-firstboot-1.1.19-1.el6.x86_64
subscription-manager-gui-1.1.19-1.el6.x86_64


Working fine resolving defect as verified

Comment 9 errata-xmlrpc 2013-02-21 09:04:46 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.

http://rhn.redhat.com/errata/RHBA-2013-0350.html