Bug 1252338 - Communication with server failed as RestlibException and RemoteServerException
Communication with server failed as RestlibException and RemoteServerException
Status: CLOSED DUPLICATE of bug 1276241
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Candlepin (Show other bugs)
Unspecified
x86_64 Linux
unspecified Severity medium (vote)
: GA
: --
Assigned To: satellite6-bugs
Li Bin Liu
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-11 04:21 EDT by Liushihui
Modified: 2017-04-25 12:26 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-26 11:30:35 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Liushihui 2015-08-11 04:21:11 EDT
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 07:53:48 EDT
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 14:52:44 EST
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 03:57:01 EST
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 11:30:35 EDT
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.