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 1167238 - Error in communication with subscription manager
Summary: Error in communication with subscription manager
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-who
Version: 7.1
Hardware: x86_64
OS: All
unspecified
high
Target Milestone: rc
: ---
Assignee: Radek Novacek
QA Contact: Li Bin Liu
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel72
TreeView+ depends on / blocked
 
Reported: 2014-11-24 09:34 UTC by Liushihui
Modified: 2016-12-01 00:33 UTC (History)
6 users (show)

Fixed In Version: virt-who-0.14-2.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 11:55:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
rhsm.log (887.05 KB, text/plain)
2014-11-24 09:35 UTC, Liushihui
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2370 0 normal SHIPPED_LIVE virt-who bug fix and enhancement update 2015-11-19 10:39:27 UTC

Description Liushihui 2014-11-24 09:34:54 UTC
Description of problem:
When system have registered to stage candlepin, virt-who will show many error message when communicate with subscription-manager

Version-Release number of selected component (if applicable):
subscription-manager-1.13.8-1.el7.x86_64
python-rhsm-1.13.7-1.el7.x86_64
virt-who-0.11-3.el7.noarch

How reproducible:
50%

Steps to Reproduce:
1. Register to stage candlepin with stage_virtwho_test_oct/redhat 
2. Configure virt-who run at default mode(libvirt)
3. Check the virt-who log:
# tail -f /var/log/rhsm/rhsm.log

Actual results:
It will show error log as the following, please see detail in the attachment
2014-11-24 09:25:45,667 [ERROR]  @virtwho.py:134 - Error in communication with subscription manager, trying to recover:
Traceback (most recent call last):
  File "/usr/share/virt-who/virtwho.py", line 126, in _send
    self._sendGuests(virt, virtualGuests)
  File "/usr/share/virt-who/virtwho.py", line 152, in _sendGuests
    manager.sendVirtGuests(virtualGuests)
  File "/usr/share/virt-who/manager/subscriptionmanager/subscriptionmanager.py", line 112, in sendVirtGuests
    self.connection.updateConsumer(self.uuid(), guest_uuids=domains)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 815, in updateConsumer
    ret = self.conn.request_put(method, params)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 579, in request_put
    return self._request("PUT", method, params)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 498, in _request
    self.validateResponse(result, request_type, handler)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 540, in validateResponse
    raise RestlibException(response['status'], error_msg)
RestlibException: Runtime Error Guice provision errors:

Expected results:
It shouldn't show any error exception in the rhsm log.

Additional info:
It hasn't this problem when system registered to SAM

Comment 1 Liushihui 2014-11-24 09:35:55 UTC
Created attachment 960629 [details]
rhsm.log

Comment 3 Liushihui 2014-11-24 09:39:32 UTC
And some error log as the following:
2014-11-24 11:37:16,177 [ERROR]  @virtwho.py:134 - Error in communication with subscription manager, trying to recover:
Traceback (most recent call last):
  File "/usr/share/virt-who/virtwho.py", line 126, in _send
    self._sendGuests(virt, virtualGuests)
  File "/usr/share/virt-who/virtwho.py", line 152, in _sendGuests
    manager.sendVirtGuests(virtualGuests)
  File "/usr/share/virt-who/manager/subscriptionmanager/subscriptionmanager.py", line 97, in sendVirtGuests
    self._connect()
  File "/usr/share/virt-who/manager/subscriptionmanager/subscriptionmanager.py", line 75, in _connect
    if not self.connection.ping()['result']:
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 725, in ping
    return self.conn.request_get("/status/")
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 570, in request_get
    return self._request("GET", method)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 498, in _request
    self.validateResponse(result, request_type, handler)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 540, in validateResponse
    raise RestlibException(response['status'], error_msg)
RestlibException: The proxy server received an invalid response from an upstream server

Comment 4 Radek Novacek 2014-11-24 09:56:59 UTC
Looks like the problem is higher in the stack, reassigning to python-rhsm for investigation.

Comment 7 William Poteat 2015-05-12 18:45:58 UTC
please provide an rhsm-debug file.

sudo rhsm-debug system

Comment 8 Liushihui 2015-06-01 08:29:20 UTC
Use the latest rhel7.1 and stage candlepin, do the same test as bug's description, it hasn't reproduced.

Checked version:                                        
virt-who-0.11-5.el7.noarch                                        
subscription-manager-1.13.22-1.el7.x86_64
python-rhsm-1.13.10-1.el7.x86_64
Latest stage candelpin

Comment 9 Adrian Likins 2015-07-09 14:09:31 UTC
(In reply to Liushihui from comment #3)
> And some error log as the following:
> 2014-11-24 11:37:16,177 [ERROR]  @virtwho.py:134 - Error in communication
> with subscription manager, trying to recover:
> Traceback (most recent call last):
>   File "/usr/share/virt-who/virtwho.py", line 126, in _send
>     self._sendGuests(virt, virtualGuests)
>   File "/usr/share/virt-who/virtwho.py", line 152, in _sendGuests
>     manager.sendVirtGuests(virtualGuests)
>   File
> "/usr/share/virt-who/manager/subscriptionmanager/subscriptionmanager.py",
> line 97, in sendVirtGuests
>     self._connect()
>   File
> "/usr/share/virt-who/manager/subscriptionmanager/subscriptionmanager.py",
> line 75, in _connect
>     if not self.connection.ping()['result']:
>   File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 725, in
> ping
>     return self.conn.request_get("/status/")
>   File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 570, in
> request_get
>     return self._request("GET", method)
>   File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 498, in
> _request
>     self.validateResponse(result, request_type, handler)
>   File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 540, in
> validateResponse
>     raise RestlibException(response['status'], error_msg)
> RestlibException: The proxy server received an invalid response from an
> upstream server

That looks like what I'd expect python-rhsm to do if it got a 502 error from the server. For reasons unknown to me, stage is very prone to throwing 502 errors, and those will end up as rhsm.connection.RestlibExceptions. So virt-who needs to understand how to handle those. Or more generically, rhsm.connection.ConnectionException  that is the base class of RestlibException

So bouncing back to virt-who

Comment 11 Radek Novacek 2015-07-16 15:40:46 UTC
virt-who didn't failed to operate when it saw this kind of error, it just dropped the report it tried to post. I've added check for these kind of error and virt-who will try to resend the report a couple of times.

It will still print the backtraces for this error to the log file because it can't know if it sends incorrect data or there is only some temporary error.

This change is present in virt-who-0.14-2.el7.

Comment 13 Liushihui 2015-09-06 06:20:38 UTC
Verified it on virt-who-0.14-7.el7 since it won't generate RestlibException. Therefore, verify it.

Verified version:
virt-who-0.14-7.el7.noarch
subscription-manager-1.15.9-7.el7.x86_64
python-rhsm-1.15.4-4.el7.x86_64
Latest stage candlepin

Verified process:
1. Register system to stage candlepin
2. Configure virt-who run at default mode(libvirt)
3. Check the virt-who log:
# tail -f /var/log/rhsm/rhsm.log

Result:
It hasn't show any RestlibException in the log file.

Comment 14 errata-xmlrpc 2015-11-19 11:55:51 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.

https://rhn.redhat.com/errata/RHBA-2015-2370.html


Note You need to log in before you can comment on or make changes to this bug.