Red Hat Satellite engineering is moving the tracking of its product development work on Satellite 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 "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. 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 "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-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 1252338 - Communication with server failed as RestlibException and RemoteServerException
Summary: Communication with server failed as RestlibException and RemoteServerException
Keywords:
Status: CLOSED DUPLICATE of bug 1276241
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Candlepin
Version: Unspecified
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Li Bin Liu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-11 08:21 UTC by Liushihui
Modified: 2019-10-10 10:03 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-26 15:30:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Liushihui 2015-08-11 08:21:11 UTC
Description of problem:
When unregister system to satellite, it will show "Communication with server failed" as "RestlibException: undefined method `inject' for nil:NilClass" and "RemoteServerException: Server error attempting a POST to /rhsm/hypervisors?owner=ACME_Corporation&env=Library returned status 500"

Version-Release number of selected component (if applicable):
virt-who-0.14-3.el7.noarch
subscription-manager-1.15.9-2.el7.x86_64
python-rhsm-1.15.4-2.el7.x86_64
Satellite 6.1.0-20150731.0

How reproducible:
70%

Steps to Reproduce:
1. Register system to satellite
2. Configure virt-who run at esx mode and refresh interval is 5s, then restart virt-who service
3. Unregister system to satellite, then check the virt-who's log

Actual results:
There are two kinds of failed phenomenon when communicate with server. Sometime it will show "RestlibException", the log as the following
2015-08-11 14:33:29,801 [DEBUG] rhsmd:13892 @ga_loader.py:99 - ga_loader class GaImporterGtk3 loading virtual module subscription_manager.ga from None
2015-08-11 14:33:29,801 [DEBUG] rhsmd:13892 @ga_loader.py:99 - ga_loader class GaImporterGtk3 loading virtual module subscription_manager.ga.GObject from ['gi.repository', 'GObject']
2015-08-11 14:33:29,811 [DEBUG] rhsmd:13892 @ga_loader.py:99 - ga_loader class GaImporterGtk3 loading virtual module subscription_manager.ga.GLib from ['gi.repository', 'GLib']
2015-08-11 14:33:29,827 [ERROR]  @subscriptionmanager.py:171 - Communication with server failed:
Traceback (most recent call last):
  File "/usr/share/virt-who/manager/subscriptionmanager/subscriptionmanager.py", line 167, in hypervisorCheckIn
    result = self.connection.hypervisorCheckIn(config.owner, config.env, serialized_mapping)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 860, in hypervisorCheckIn
    res = self.conn.request_post(url, host_guest_mapping)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 612, in request_post
    return self._request("POST", method, params)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 537, in _request
    self.validateResponse(result, request_type, handler)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 579, in validateResponse
    raise RestlibException(response['status'], error_msg)
RestlibException: undefined method `inject' for nil:NilClass
2015-08-11 14:33:29,829 [ERROR]  @virtwho.py:170 - Unable to send data: Communication with subscription manager failed with code 500: undefined method `inject' for nil:NilClass
==============================================================
Sometimes it will show "RemoteServerException" , the failed log as the following:
2015-08-11 14:38:11,985 [ERROR]  @subscriptionmanager.py:171 - Communication with server failed:
Traceback (most recent call last):
  File "/usr/share/virt-who/manager/subscriptionmanager/subscriptionmanager.py", line 167, in hypervisorCheckIn
    result = self.connection.hypervisorCheckIn(config.owner, config.env, serialized_mapping)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 860, in hypervisorCheckIn
    res = self.conn.request_post(url, host_guest_mapping)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 612, in request_post
    return self._request("POST", method, params)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 537, in _request
    self.validateResponse(result, request_type, handler)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 585, in validateResponse
    handler=handler)
RemoteServerException: Server error attempting a POST to /rhsm/hypervisors?owner=ACME_Corporation&env=Library returned status 500

Expected results:
It shouldn't show these error in the rhsm.log.virt-who should communicate with satellite normally.

Additional info:

Comment 1 Radek Novacek 2015-08-18 11:53:48 UTC
Reassigning to candlepin. Are these errors intentional? Should be virt-who modified to handle this kind of errors silently or is it something that candlepin or python-rhsm should handle?

Comment 2 Barnaby Court 2016-02-29 19:52:44 UTC
Are you still able to replicate this issue? If you are, please attach the candlepin and katello log files when this issue occurs.

Comment 3 Liushihui 2016-03-01 08:57:01 UTC
It hasn't reproduced on the two latest rhel6.8 against two latest satellite6.1 since virt-who minimum refresh interval update to 60s. 
Can we continually track it on two new rhel6.8 and satellite6.1 version? if it can't reproduce, I will close it.

Comment 5 Bryan Kearney 2016-05-26 15:30:35 UTC
Although this is older, the dupe item has more data.

*** This bug has been marked as a duplicate of bug 1276241 ***


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