Description of problem: No status check and response from server after addition and deletion of product from /etc/pki/product/ Version-Release number of selected component (if applicable): [root@rhel64 product]# subscription-manager version server type: Red Hat Subscription Management subscription management server: 0.8.0-1 subscription-manager: 1.1.23.1-1.el6_4 python-rhsm: 1.1.8-1.el6 How reproducible: Steps to Reproduce: 1.[root@rhel64 product]# subscription-manager register --org=admin Username: admin Password: The system has been registered with id: 8e934166-5906-4a6e-91fc-9b9a4016d1f5 [root@rhel64 product]# subscription-manager list --installed +-------------------------------------------+ Installed Product Status +-------------------------------------------+ Product Name: Shared File System Bits Product ID: 88888 Version: 1.0 Arch: ALL Status: Not Subscribed Starts: Ends: [root@rhel64 product]# curl -k -u admin:admin --request GET https://10.70.1.188:8443/candlepin/consumers/8e934166-5906-4a6e-91fc-9b9a4016d1f5/compliance | python -m simplejson/tool | grep status % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 115 231 0 231 0 0 2064 0 --:--:-- --:--:-- --:--:-- 3121 "status": "invalid" [root@rhel64 product]# subscription-manager attach --auto Installed Product Current Status: Product Name: Shared File System Bits Status: Subscribed [root@rhel64 product]# curl -k -u admin:admin --request GET https://10.70.1.188:8443/candlepin/consumers/8e934166-5906-4a6e-91fc-9b9a4016d1f5/compliance | python -m simplejson/tool | grep status % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 101 1819 0 1819 0 0 16175 0 --:--:-- --:--:-- --:--:-- 23934 "status": "valid" [root@rhel64 product]# ls /etc/pki/product/ 88888.pem 100% 1237 1.2KB/s 00:00 [root@rhel64 product]# mv /root/tmp/27060.pem /etc/pki/product/ [root@rhel64 product]# curl -k -u admin:admin --request GET https://10.70.1.188:8443/candlepin/consumers/8e934166-5906-4a6e-91fc-9b9a4016d1f5/compliance | python -m simplejson/tool | grep status % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 101 1819 0 1819 0 0 16135 0 --:--:-- --:--:-- --:--:-- 23934 "status": "valid" [root@rhel64 product]# curl -k -u admin:admin --request GET https://10.70.1.188:8443/candlepin/consumers/8e934166-5906-4a6e-91fc-9b9a4016d1f5/compliance | python -m simplejson/tool | grep status % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 101 1819 0 1819 0 0 14924 0 --:--:-- --:--:-- --:--:-- 22456 "status": "valid" [root@rhel64 product]# ls /etc/pki/product/ 27060.pem 88888.pem [root@rhel64 product]# subscription-manager list --installed +-------------------------------------------+ Installed Product Status +-------------------------------------------+ Product Name: Awesome OS Workstation Bits Product ID: 27060 Version: 6.1 Arch: ALL Status: Not Subscribed Starts: Ends: Product Name: Shared File System Bits Product ID: 88888 Version: 1.0 Arch: ALL Status: Subscribed Starts: 03/13/2013 Ends: 03/13/2014 Actual results: [root@rhel64 product]# curl -k -u admin:admin --request GET https://10.70.1.188:8443/candlepin/consumers/8e934166-5906-4a6e-91fc-9b9a4016d1f5/compliance | python -m simplejson/tool | grep status % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 101 1819 0 1819 0 0 14924 0 --:--:-- --:--:-- --:--:-- 22456 "status": "valid" Expected results: Expecting the status to be invalid after adding the cert 27060.pem to /etc/pki/product/ Additional info:
Not A bug... Had a chat with Devan and he told me that I should be restarting rhsmcertd service. [root@rhel7 product]# ll total 4 -rw-r--r--. 1 root root 1229 Mar 15 11:56 88888.pem [root@rhel7 product]# subscription-manager register --org=admin Username: admin Password: The system has been registered with id: f47e3613-98cb-45d1-aa0f-18fc1c06025e [root@rhel7 product]# subscription-manager attach --auto Installed Product Current Status: Product Name: Shared File System Bits Status: Subscribed [root@rhel7 product]# curl -k -u admin:admin --request GET https://10.70.1.188:8443/candlepin/consumers/f47e3613-98cb-45d1-aa0f-18fc1c06025e/compliance | python -m simplejson/tool | grep status % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1818 0 1818 0 0 16255 0 --:--:-- --:--:-- --:--:-- 16378 "status": "valid" [root@rhel7 product]# scp 10.70.1.188:/root/candlepin/generated_certs/100000000000002.pem /etc/pki/product/ reverse mapping checking getaddrinfo for unused [10.70.1.188] failed - POSSIBLE BREAK-IN ATTEMPT! root.1.188's password: 100000000000002.pem 100% 1269 1.2KB/s 00:00 [root@rhel7 product]# service rhsmcertd restart Redirecting to /bin/systemctl restart rhsmcertd.service [root@rhel7 product]# curl -k -u admin:admin --request GET https://10.70.1.188:8443/candlepin/consumers/f47e3613-98cb-45d1-aa0f-18fc1c06025e/compliance | python -m simplejson/tool | grep status % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1818 0 1818 0 0 20703 0 --:--:-- --:--:-- --:--:-- 21139 "status": "valid" [root@rhel7 product]# subscription-manager list --installed +-------------------------------------------+ Installed Product Status +-------------------------------------------+ Product Name: Awesome OS for x86_64 Bits Product ID: 100000000000002 Version: 3.11 Arch: x86_64 Status: Not Subscribed Starts: Ends: Product Name: Shared File System Bits Product ID: 88888 Version: 1.0 Arch: ALL Status: Subscribed Starts: 03/15/2013 Ends: 03/15/2014 [root@rhel7 product]# curl -k -u admin:admin --request GET https://10.70.1.188:8443/candlepin/consumers/f47e3613-98cb-45d1-aa0f-18fc1c06025e/compliance | python -m simplejson/tool | grep status % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 231 0 231 0 0 2341 0 --:--:-- --:--:-- --:--:-- 2381 "status": "invalid" [root@rhel7 product]# subscription-manager version server type: Red Hat Subscription Management subscription management server: 0.8.0-1 subscription-manager: 1.8.4-1.el7 python-rhsm: 1.8.7-1.el7
Re-opening the bug, [root@rhel7 product]# subscription-manager version server type: Red Hat Subscription Management subscription management server: 0.8.0-1 subscription-manager: 1.8.4-1.el7 python-rhsm: 1.8.7-1.el7 [root@rhel7 product]# subscription-manager attach --auto Installed Product Current Status: Product Name: Awesome OS for x86_64 Bits Status: Subscribed [root@rhel7 product]# curl -k -u admin:admin --request GET https://10.70.35.179:8443/candlepin/consumers/b1cd65bf-a47e-4479-b864-3c80902f6024/compliance | python -m simplejson/tool | grep status % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1971 0 1971 0 0 18906 0 --:--:-- --:--:-- --:--:-- 19135 "status": "valid" [root@rhel7 product]# scp 10.70.35.179:/root/candlepin/generated_certs/801.pem /etc/pki/product/ root.35.179's password: 801.pem 100% 1224 1.2KB/s 00:00 [root@rhel7 product]# curl -k -u admin:admin --request GET https://10.70.35.179:8443/candlepin/consumers/b1cd65bf-a47e-4479-b864-3c80902f6024/compliance | python -m simplejson/tool | grep status % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1971 0 1971 0 0 12060 0 --:--:-- --:--:-- --:--:-- 12554 "status": "valid" [root@rhel7 product]# date Tue Mar 26 06:50:55 UTC 2013 [root@rhel7 product]# service rhsmcertd restart Redirecting to /bin/systemctl rest[root@rhel7 product]# date Tue Mar 26 06:53:02 UTC 2013 [root@rhel7 product]# curl -k -u admin:admin --request GET https://10.70.35.179:8443/candlepin/consumers/b1cd65bf-a47e-4479-b864-3c80902f6024/compliance | python -m simplejson/tool | grep status % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1971 0 1971 0 0 19023 0 --:--:-- --:--:-- --:--:-- 19323 "status": "valid" root@rhel7 product]# subscription-manager list --installed +-------------------------------------------+ Installed Product Status +-------------------------------------------+ Product Name: RAM Limiting Product Product ID: 801 Version: 1.0 Arch: x86_64 Status: Not Subscribed Starts: Ends: Product Name: Awesome OS for x86_64 Bits Product ID: 100000000000002 Version: 3.11 Arch: x86_64 Status: Subscribed Starts: 03/21/2013 Ends: 03/21/2014 [root@rhel7 product]# tail -f /var/log/rhsm/rhsm.log -n 300 error: [Errno 13] Permission denied 2013-03-26 07:36:19,132 [WARNING] @certmgr.py:106 - Exception caught while running <subscription_manager.factlib.FactLib object at 0x25fbdd0> update 2013-03-26 07:36:19,133 [ERROR] @certmgr.py:107 - 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/certmgr.py", line 99, in update updates += lib.update() File "/usr/share/rhsm/subscription_manager/certlib.py", line 63, in update return self._do_update() File "/usr/share/rhsm/subscription_manager/factlib.py", line 50, in _do_update facts.update_check(self.uep, consumer_uuid) File "/usr/share/rhsm/subscription_manager/cache.py", line 178, 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. 2013-03-26 07:36:19,135 [DEBUG] @connection.py:394 - Loading CA PEM certificates from: /etc/rhsm/ca/ 2013-03-26 07:36:19,135 [DEBUG] @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/candlepin-ca.pem' 2013-03-26 07:36:19,136 [DEBUG] @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/10.pem' 2013-03-26 07:36:19,136 [DEBUG] @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem' 2013-03-26 07:36:19,137 [DEBUG] @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem' 2013-03-26 07:36:19,138 [DEBUG] @connection.py:415 - Making request: GET /candlepin/ 2013-03-26 07:36:19,138 [WARNING] @certmgr.py:106 - Exception caught while running <subscription_manager.cache.PackageProfileLib object at 0x25fbe90> update 2013-03-26 07:36:19,139 [ERROR] @certmgr.py:107 - [Errno 13] Permission denied Traceback (most recent call last): File "/usr/share/rhsm/subscription_manager/certmgr.py", line 99, in update updates += lib.update() File "/usr/share/rhsm/subscription_manager/certlib.py", line 63, in update return self._do_update() File "/usr/share/rhsm/subscription_manager/cache.py", line 53, in _do_update return profile_mgr.update_check(self.uep, consumer_uuid) File "/usr/share/rhsm/subscription_manager/cache.py", line 224, in update_check if not uep.supports_resource(PACKAGES_RESOURCE): File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 623, in supports_resource self._load_supported_resources() File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 610, in _load_supported_resources resources_list = self.conn.request_get("/") File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 481, in request_get return self._request("GET", method) File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 422, in _request conn.request(request_type, handler, body=body, headers=headers) File "/usr/lib64/python2.7/httplib.py", line 958, in request self._send_request(method, url, body, headers) File "/usr/lib64/python2.7/httplib.py", line 992, in _send_request self.endheaders(body) File "/usr/lib64/python2.7/httplib.py", line 954, in endheaders self._send_output(message_body) File "/usr/lib64/python2.7/httplib.py", line 814, in _send_output self.send(msg) File "/usr/lib64/python2.7/httplib.py", line 776, in send self.connect() File "/usr/lib64/python2.7/site-packages/M2Crypto/httpslib.py", line 73, in connect raise error error: [Errno 13] Permission denied 2013-03-26 07:36:19,145 [INFO] @cache.py:164 - Checking current system info against cache: /var/lib/rhsm/cache/installed_products.json 2013-03-26 07:36:19,145 [INFO] @cache.py:166 - System data has changed, updating server. 2013-03-26 07:36:19,146 [DEBUG] @connection.py:394 - Loading CA PEM certificates from: /etc/rhsm/ca/ 2013-03-26 07:36:19,146 [DEBUG] @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/candlepin-ca.pem' 2013-03-26 07:36:19,146 [DEBUG] @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/10.pem' 2013-03-26 07:36:19,147 [DEBUG] @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem' 2013-03-26 07:36:19,147 [DEBUG] @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem' 2013-03-26 07:36:19,148 [DEBUG] @connection.py:415 - Making request: PUT /candlepin/consumers/5e756617-2d60-4713-be62-32948a02c8f3 2013-03-26 07:36:19,149 [ERROR] @cache.py:176 - Error updating system data on the server 2013-03-26 07:36:19,149 [ERROR] @cache.py:177 - [Errno 13] Permission denied Traceback (most recent call last): File "/usr/share/rhsm/subscription_manager/cache.py", line 168, in update_check self._update_server(uep, consumer_uuid) File "/usr/share/rhsm/subscription_manager/cache.py", line 305, in _update_server installed_products=self.format_for_server()) File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 711, in updateConsumer ret = self.conn.request_put(method, params) File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 490, in request_put return self._request("PUT", method, params) File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 422, in _request conn.request(request_type, handler, body=body, headers=headers) File "/usr/lib64/python2.7/httplib.py", line 958, in request self._send_request(method, url, body, headers) File "/usr/lib64/python2.7/httplib.py", line 992, in _send_request self.endheaders(body) File "/usr/lib64/python2.7/httplib.py", line 954, in endheaders self._send_output(message_body) File "/usr/lib64/python2.7/httplib.py", line 814, in _send_output self.send(msg) File "/usr/lib64/python2.7/httplib.py", line 776, in send self.connect() File "/usr/lib64/python2.7/site-packages/M2Crypto/httpslib.py", line 73, in connect raise error error: [Errno 13] Permission denied 2013-03-26 07:36:19,153 [WARNING] @certmgr.py:106 - Exception caught while running <subscription_manager.cache.InstalledProductsLib object at 0x25fbe50> update 2013-03-26 07:36:19,153 [ERROR] @certmgr.py:107 - 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/certmgr.py", line 99, in update updates += lib.update() File "/usr/share/rhsm/subscription_manager/certlib.py", line 63, in update return self._do_update() File "/usr/share/rhsm/subscription_manager/cache.py", line 68, in _do_update return mgr.update_check(self.uep, consumer_uuid) File "/usr/share/rhsm/subscription_manager/cache.py", line 178, 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.
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux release for currently deployed products. This request is not yet committed for inclusion in a release.
(root@lenovo /etc/pki/product) $ subscription-manager register --username=admin --password=admin --force --org=admin --autosubscribe The system has been registered with ID: 9dc7767e-5736-4728-b66e-dd50c8ee8f3c Installed Product Current Status: Product Name: Awesome OS Server Bits Status: Subscribed (root@lenovo /etc/pki/product) $ subscription-manager list --installed +-------------------------------------------+ Installed Product Status +-------------------------------------------+ Product Name: Awesome OS Server Bits Product ID: 37060 Version: 6.1 Arch: ALL Status: Subscribed Status Details: Starts: 05/16/2013 Ends: 05/16/2014 (root@lenovo /etc/pki/product) $ subscription-manager list --status +-------------------------------------------+ System Status Details +-------------------------------------------+ Overall Status: Current Installing a new product cert: (root@lenovo /etc/pki/product) $ cp bak/32060.pem ./ (root@lenovo /etc/pki/product) $ subscription-manager list --installed +-------------------------------------------+ Installed Product Status +-------------------------------------------+ Product Name: Awesome OS Instance Server Bits Product ID: 32060 Version: 6.1 Arch: ALL Status: Not Subscribed Status Details: Starts: Ends: Product Name: Awesome OS Server Bits Product ID: 37060 Version: 6.1 Arch: ALL Status: Subscribed Status Details: Starts: 05/16/2013 Ends: 05/16/2014 (root@lenovo /etc/pki/product) $ subscription-manager list --status +-------------------------------------------+ System Status Details +-------------------------------------------+ Overall Status: Current This is ok because we haven't checked in to report the new installed product yet. Wait for next rhsmcertd checkin: (root@lenovo /etc/pki/product) $ subscription-manager list --status +-------------------------------------------+ System Status Details +-------------------------------------------+ Overall Status: Invalid Awesome OS Instance Server Bits: - Not covered by a valid subscription. Be careful that healing doesn't run in the meantime, that could cause it to still show valid because you also got an entitlement for the new product. The errors in comment #2 indicate some other kind of problem talking to the server. It looks like a consumer deleted or server re-installed or something like this. Shwetha is this still reproducible? I cannot get it to happen here.
Marking verified!! [root@localhost ~]# subscription-manager version server type: Red Hat Subscription Management subscription management server: 0.8.10-1 subscription-manager: 1.8.9-1.el5 python-rhsm: 1.8.12-1.el5 [root@localhost ~]# subscription-manager register --username=admin --password=admin --force --org=admin --autosubscribe The system with UUID ca529c80-beb3-4fb0-9f95-da87afa78052 has been unregistered The system has been registered with ID: 04ad4472-4774-48a8-bca7-75662632374e Installed Product Current Status: Product Name: Awesome OS Server Bits Status: Subscribed [root@localhost ~]# subscription-manager +-------------------------------------------+ System Status Details +-------------------------------------------+ Overall Status: Current [root@localhost ~]# mv /root/88888.pem /etc/pki/product/ [root@localhost ~]# subscription-manager list --installed +-------------------------------------------+ Installed Product Status +-------------------------------------------+ Product Name: Awesome OS Server Bits Product ID: 37060 Version: 6.1 Arch: ALL Status: Subscribed Status Details: Starts: 05/30/2013 Ends: 05/30/2014 Product Name: Shared File System Bits Product ID: 88888 Version: 1.0 Arch: ALL Status: Not Subscribed Status Details: Not covered by a valid subscription. Starts: Ends: [root@localhost ~]# subscription-manager status +-------------------------------------------+ System Status Details +-------------------------------------------+ Overall Status: Current [root@localhost ~]# service rhsmcertd restart Stopping rhsmcertd... [ OK ] Starting rhsmcertd... [root@localhost ~]# ls /etc/pki/entitlement/ 6689043196612279065-key.pem 6689043196612279065.pem 8706864461481222715-key.pem 8706864461481222715.pem [root@localhost ~]# subscription-manager list --installed +-------------------------------------------+ Installed Product Status +-------------------------------------------+ Product Name: Awesome OS Server Bits Product ID: 37060 Version: 6.1 Arch: ALL Status: Subscribed Status Details: Starts: 05/30/2013 Ends: 05/30/2014 Product Name: Shared File System Bits Product ID: 88888 Version: 1.0 Arch: ALL Status: Subscribed Status Details: Starts: 05/30/2013 Ends: 05/30/2014
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-1332.html