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.
Description of problem:
There is incorrect error handling in subscription-manager. I have seen it to report "'exceptions.ValueError' object has no attribute 'msg'" instead of reasonable error message.
Version-Release number of selected component (if applicable):
subscription-manager-1.9.11-1.el6.x86_64
python-rhsm-1.9.6-1.el6.x86_64
How reproducible:
rarely
Steps to Reproduce:
1. I'm unable to reproduce the issue now. Seen it only once.
# subscription-manager register --force --username <user> --password <pass>
Actual results:
'exceptions.ValueError' object has no attribute 'msg'
The system has been registered with ID: <systemID>
Expected results:
Correct error should be displayed.
Additional info:
Relevant part from the log:
[...]
2014-06-17 04:29:55,516 [DEBUG] @connection.py:402 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2014-06-17 04:29:55,517 [DEBUG] @connection.py:441 - Making request: GET /subscription/consumers/d4aae02e-6638-42bd-8170-4d51f6fbc461/compliance
2014-06-17 04:29:58,228 [DEBUG] @connection.py:460 - Response status: 502
2014-06-17 04:29:58,228 [ERROR] @connection.py:489 - Response: 502
2014-06-17 04:29:58,229 [ERROR] @managercli.py:151 - exception caught in subscription-manager
2014-06-17 04:29:58,229 [ERROR] @managercli.py:152 - 'exceptions.ValueError' object has no attribute 'msg'
Traceback (most recent call last):
File "/usr/sbin/subscription-manager", line 82, in <module>
sys.exit(abs(main() or 0))
File "/usr/sbin/subscription-manager", line 73, in main
return managercli.ManagerCLI().main()
File "/usr/share/rhsm/subscription_manager/managercli.py", line 2253, in main
return CLI.main(self)
File "/usr/share/rhsm/subscription_manager/cli.py", line 166, in main
return cmd.main()
File "/usr/share/rhsm/subscription_manager/managercli.py", line 441, in main
return_code = self._do_command()
File "/usr/share/rhsm/subscription_manager/managercli.py", line 1115, in _do_command
self._request_validity_check()
File "/usr/share/rhsm/subscription_manager/managercli.py", line 244, in _request_validity_check
inj.require(inj.CERT_SORTER).force_cert_check()
File "/usr/share/rhsm/subscription_manager/injection.py", line 98, in require
return FEATURES.require(feature, *args, **kwargs)
File "/usr/share/rhsm/subscription_manager/injection.py", line 72, in require
self.providers[feature] = provider()
File "/usr/share/rhsm/subscription_manager/cert_sorter.py", line 321, in __init__
super(CertSorter, self).__init__()
File "/usr/share/rhsm/subscription_manager/cert_sorter.py", line 66, in __init__
self.load()
File "/usr/share/rhsm/subscription_manager/cert_sorter.py", line 116, in load
self._parse_server_status()
File "/usr/share/rhsm/subscription_manager/cert_sorter.py", line 135, in _parse_server_status
status = self.get_compliance_status()
File "/usr/share/rhsm/subscription_manager/cert_sorter.py", line 333, in get_compliance_status
return status_cache.load_status(self.cp_provider.get_consumer_auth_cp(), self.identity.uuid)
File "/usr/share/rhsm/subscription_manager/cache.py", line 216, in load_status
self._sync_with_server(uep, uuid)
File "/usr/share/rhsm/subscription_manager/cache.py", line 201, in _sync_with_server
self.server_status = uep.getCompliance(uuid)
File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 817, in getCompliance
return self.conn.request_get(method)
File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 541, in request_get
return self._request("GET", method)
File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 469, in _request
self.validateResponse(result, request_type, handler)
File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 490, in validateResponse
log.error("JSON parsing error: %s" % e.msg)
AttributeError: 'exceptions.ValueError' object has no attribute 'msg'
2014-06-17 04:29:58,452 [DEBUG] @plugins.py:519 - loaded plugin modules: []
2014-06-17 04:29:58,452 [DEBUG] @plugins.py:520 - loaded plugins: {}
[...]
(In reply to John Sefler from comment #1)
> I believe this bug was fixed here:
> https://bugzilla.redhat.com/show_bug.cgi?id=1008808#c10
> https://bugzilla.redhat.com/show_bug.cgi?id=1008808#c15
>
> Please re-test with the latest python-rhsm package version targeted for
> rhel6.6:
> python-rhsm-1.12.2-1.el6
Looking at the bug, it was filled against RHEL7, but traceback in it seems to be very similar to what I have seen.
I was unable to reproduce the faulty situation, so can not test python-rhsm-1.12.2-1.el6.
Moving to verified!
[root@dhcp-0-177 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.9.23-1
subscription management rules: 5.11
subscription-manager: 1.12.11-1.el6
python-rhsm: 1.12.5-1.el6
Tried registering with an invalid user :
[root@dhcp-0-177 ~]# subscription-manager register --org admin --force
Username: hello
Password:
Invalid username or password. To create a login, please visit https://www.redhat.com/wapps/ugc/register.html
Register with proper username :
[root@dhcp-0-177 ~]# subscription-manager register --force
The system with UUID 53fc150a-4261-47f1-8aaf-58954c2f26fd has been unregistered
Username: admin
Password:
Organization: admin
The system has been registered with ID: 6788a5cb-8d3d-45e7-aaed-93624ffa45a7
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-2014-1384.html
Description of problem: There is incorrect error handling in subscription-manager. I have seen it to report "'exceptions.ValueError' object has no attribute 'msg'" instead of reasonable error message. Version-Release number of selected component (if applicable): subscription-manager-1.9.11-1.el6.x86_64 python-rhsm-1.9.6-1.el6.x86_64 How reproducible: rarely Steps to Reproduce: 1. I'm unable to reproduce the issue now. Seen it only once. # subscription-manager register --force --username <user> --password <pass> Actual results: 'exceptions.ValueError' object has no attribute 'msg' The system has been registered with ID: <systemID> Expected results: Correct error should be displayed. Additional info: Relevant part from the log: [...] 2014-06-17 04:29:55,516 [DEBUG] @connection.py:402 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem' 2014-06-17 04:29:55,517 [DEBUG] @connection.py:441 - Making request: GET /subscription/consumers/d4aae02e-6638-42bd-8170-4d51f6fbc461/compliance 2014-06-17 04:29:58,228 [DEBUG] @connection.py:460 - Response status: 502 2014-06-17 04:29:58,228 [ERROR] @connection.py:489 - Response: 502 2014-06-17 04:29:58,229 [ERROR] @managercli.py:151 - exception caught in subscription-manager 2014-06-17 04:29:58,229 [ERROR] @managercli.py:152 - 'exceptions.ValueError' object has no attribute 'msg' Traceback (most recent call last): File "/usr/sbin/subscription-manager", line 82, in <module> sys.exit(abs(main() or 0)) File "/usr/sbin/subscription-manager", line 73, in main return managercli.ManagerCLI().main() File "/usr/share/rhsm/subscription_manager/managercli.py", line 2253, in main return CLI.main(self) File "/usr/share/rhsm/subscription_manager/cli.py", line 166, in main return cmd.main() File "/usr/share/rhsm/subscription_manager/managercli.py", line 441, in main return_code = self._do_command() File "/usr/share/rhsm/subscription_manager/managercli.py", line 1115, in _do_command self._request_validity_check() File "/usr/share/rhsm/subscription_manager/managercli.py", line 244, in _request_validity_check inj.require(inj.CERT_SORTER).force_cert_check() File "/usr/share/rhsm/subscription_manager/injection.py", line 98, in require return FEATURES.require(feature, *args, **kwargs) File "/usr/share/rhsm/subscription_manager/injection.py", line 72, in require self.providers[feature] = provider() File "/usr/share/rhsm/subscription_manager/cert_sorter.py", line 321, in __init__ super(CertSorter, self).__init__() File "/usr/share/rhsm/subscription_manager/cert_sorter.py", line 66, in __init__ self.load() File "/usr/share/rhsm/subscription_manager/cert_sorter.py", line 116, in load self._parse_server_status() File "/usr/share/rhsm/subscription_manager/cert_sorter.py", line 135, in _parse_server_status status = self.get_compliance_status() File "/usr/share/rhsm/subscription_manager/cert_sorter.py", line 333, in get_compliance_status return status_cache.load_status(self.cp_provider.get_consumer_auth_cp(), self.identity.uuid) File "/usr/share/rhsm/subscription_manager/cache.py", line 216, in load_status self._sync_with_server(uep, uuid) File "/usr/share/rhsm/subscription_manager/cache.py", line 201, in _sync_with_server self.server_status = uep.getCompliance(uuid) File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 817, in getCompliance return self.conn.request_get(method) File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 541, in request_get return self._request("GET", method) File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 469, in _request self.validateResponse(result, request_type, handler) File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 490, in validateResponse log.error("JSON parsing error: %s" % e.msg) AttributeError: 'exceptions.ValueError' object has no attribute 'msg' 2014-06-17 04:29:58,452 [DEBUG] @plugins.py:519 - loaded plugin modules: [] 2014-06-17 04:29:58,452 [DEBUG] @plugins.py:520 - loaded plugins: {} [...]