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 800121

Summary: 'NoneType' object has no attribute 'getCertificateSerials' when attempting to unregister
Product: Red Hat Enterprise Linux 6 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: Chris Duryee <cduryee>
Status: CLOSED ERRATA QA Contact: Entitlement Bugs <entitlement-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.3CC: cduryee, skallesh, spandey
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 13:06:40 UTC Type: ---
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: 738066    

Description John Sefler 2012-03-05 19:28:48 UTC
Description of problem:

Version-Release number of selected component (if applicable):
[root@jsefler-r63-server ~]# rpm -q subscription-manager
subscription-manager-0.99.8-1.git.18.1b5abbd.el6.x86_64
[root@jsefler-r63-server ~]# rpm -q python-rhsm
python-rhsm-0.99.4-1.git.3.130c21c.el6.noarch


How reproducible:


Steps to Reproduce:
[root@jsefler-r63-server ~]# subscription-manager register --user testuser1 --password password --org admin --force
The system has been registered with id: 1a0b7582-9aee-415a-beaa-7d50310d16c6 
[root@jsefler-r63-server ~]# subscription-manager unregister
'NoneType' object has no attribute 'getCertificateSerials'
System has been un-registered.
[root@jsefler-r63-server ~]# 
  

Did NOT expect the 'NoneType' object to get thrown to stdout


Additional info:

I do NOT see any obvious in the rhsm.log...

[root@jsefler-r63-server ~]# tail -f /var/log/rhsm/rhsm.log
2012-03-05 14:17:41,588 [INFO]  @connection.py:389 - Using certificate authentication: key = /etc/pki/consumer/key.pem, cert = /etc/pki/consumer/cert.pem, ca = /etc/rhsm/ca/, insecure = False
2012-03-05 14:17:41,588 [INFO]  @connection.py:400 - Connection Built: host: jsefler-f14-candlepin.usersys.redhat.com, port: 8443, handler: /candlepin
2012-03-05 14:17:41,592 [DEBUG]  @connection.py:217 - Loading CA PEM certificates from: /etc/rhsm/ca/
2012-03-05 14:17:41,593 [DEBUG]  @connection.py:200 - Loading CA certificate: '/etc/rhsm/ca/jsefler-f14-candlepin.pem'
2012-03-05 14:17:41,593 [DEBUG]  @connection.py:200 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2012-03-05 14:17:41,594 [DEBUG]  @connection.py:200 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2012-03-05 14:17:41,594 [DEBUG]  @connection.py:238 - Making request: DELETE /candlepin/consumers/1a0b7582-9aee-415a-beaa-7d50310d16c6
2012-03-05 14:17:41,837 [DEBUG]  @connection.py:252 - Response status: 204
2012-03-05 14:17:41,839 [INFO]  @managerlib.py:784 - Successfully un-registered.
2012-03-05 14:17:41,843 [INFO]  @cache.py:112 - Deleting cache: /var/lib/rhsm/facts/facts.json
2012-03-05 14:17:41,844 [INFO]  @cache.py:112 - Deleting cache: /var/lib/rhsm/cache/installed_products.json
2012-03-05 14:17:42,111 [DEBUG]  @cert_sorter.py:106 - Sorting product and entitlement cert status for: 2012-03-05 19:17:42.111396+00:00
2012-03-05 14:17:42,153 [DEBUG]  @cert_sorter.py:159 - Installed product IDs: ['100000000000060', '1000000000000023', '1144', '100000000000011', '100000000000010', '100000000000013', '100000000000012', '100000000000015', '27060', '69', '917571', '1', '37069', '37068', '37080', '37065', '37067', '37060', '37062', '100000000000006', '100000000000007', '100000000000004', '100000000000005', '100000000000002', '100000000000003', '100000000000000', '100000000000001', '100000000000020', '100000000000022', '100000000000009', '100000000000008', '37090', '37070']
2012-03-05 14:17:42,153 [DEBUG]  @cert_sorter.py:112 - valid entitled products: []
2012-03-05 14:17:42,154 [DEBUG]  @cert_sorter.py:113 - expired entitled products: []
2012-03-05 14:17:42,154 [DEBUG]  @cert_sorter.py:114 - partially entitled products: []
2012-03-05 14:17:42,154 [DEBUG]  @cert_sorter.py:115 - unentitled products: ['100000000000006', '1000000000000023', '1144', '100000000000011', '100000000000010', '100000000000013', '100000000000012', '100000000000015', '27060', '69', '37090', '1', '37069', '37068', '37080', '37065', '37067', '37060', '37062', '100000000000060', '100000000000007', '100000000000004', '100000000000005', '100000000000002', '100000000000003', '100000000000000', '100000000000001', '100000000000020', '100000000000022', '100000000000009', '100000000000008', '917571', '37070']
2012-03-05 14:17:42,154 [DEBUG]  @cert_sorter.py:116 - future products: []
2012-03-05 14:17:42,154 [DEBUG]  @cert_sorter.py:117 - partial stacks: []
2012-03-05 14:17:42,155 [DEBUG]  @cert_sorter.py:118 - valid stacks: []
2012-03-05 14:17:42,159 [INFO]  @repolib.py:129 - repos updated: 0
2012-03-05 14:17:42,159 [ERROR]  @cache.py:150 - Unable to read cache: /var/lib/rhsm/facts/facts.json
2012-03-05 14:17:42,288 [DEBUG]  @cert_sorter.py:106 - Sorting product and entitlement cert status for: 2012-03-05 19:17:42.288191+00:00
2012-03-05 14:17:42,334 [DEBUG]  @cert_sorter.py:159 - Installed product IDs: ['100000000000060', '1000000000000023', '1144', '100000000000011', '100000000000010', '100000000000013', '100000000000012', '100000000000015', '27060', '69', '917571', '1', '37069', '37068', '37080', '37065', '37067', '37060', '37062', '100000000000006', '100000000000007', '100000000000004', '100000000000005', '100000000000002', '100000000000003', '100000000000000', '100000000000001', '100000000000020', '100000000000022', '100000000000009', '100000000000008', '37090', '37070']
2012-03-05 14:17:42,335 [DEBUG]  @cert_sorter.py:112 - valid entitled products: []
2012-03-05 14:17:42,335 [DEBUG]  @cert_sorter.py:113 - expired entitled products: []
2012-03-05 14:17:42,335 [DEBUG]  @cert_sorter.py:114 - partially entitled products: []
2012-03-05 14:17:42,335 [DEBUG]  @cert_sorter.py:115 - unentitled products: ['100000000000006', '1000000000000023', '1144', '100000000000011', '100000000000010', '100000000000013', '100000000000012', '100000000000015', '27060', '69', '37090', '1', '37069', '37068', '37080', '37065', '37067', '37060', '37062', '100000000000060', '100000000000007', '100000000000004', '100000000000005', '100000000000002', '100000000000003', '100000000000000', '100000000000001', '100000000000020', '100000000000022', '100000000000009', '100000000000008', '917571', '37070']
2012-03-05 14:17:42,335 [DEBUG]  @cert_sorter.py:116 - future products: []
2012-03-05 14:17:42,335 [DEBUG]  @cert_sorter.py:117 - partial stacks: []
2012-03-05 14:17:42,336 [DEBUG]  @cert_sorter.py:118 - valid stacks: []
2012-03-05 14:17:42,336 [INFO]  @factlib.py:52 - Facts have not changed, skipping upload.

Comment 3 Chris Duryee 2012-03-05 20:18:06 UTC
c4b5c6a master 0.99.8+

Comment 4 Shwetha Kallesh 2012-03-06 12:53:25 UTC
Moving to verified.

RPM used:

[root@dhcp201-162 ~]# rpm -qa | grep subscription-manager
subscription-manager-migration-0.99.8-1.git.22.c4b5c6a.el6.x86_64
subscription-manager-gnome-0.99.8-1.git.22.c4b5c6a.el6.x86_64
subscription-manager-firstboot-0.99.8-1.git.22.c4b5c6a.el6.x86_64
subscription-manager-debuginfo-0.99.8-1.el6.x86_64
subscription-manager-0.99.8-1.git.22.c4b5c6a.el6.x86_64


[root@dhcp201-162 pki]# subscription-manager register --org=admin --force
WARNING

This system has already been registered with RHN using RHN Classic technology.

The tool you are using is attempting to re-register using RHN Certificate-Based technology. Red Hat recommends (except in a few cases) that customers only register with RHN once.

To learn more about RHN registration and technologies please consult this Knowledge Base Article: https://access.redhat.com/kb/docs/DOC-45563
Username: admin
Password: 
The system has been registered with id: 238d8db1-0627-4b2a-88a0-6b596b4f9a3b 
[root@dhcp201-162 pki]# subscription-manager unregister
System has been un-registered.

Comment 6 errata-xmlrpc 2012-06-20 13:06:40 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-2012-0804.html