Satellite 6 : virt-who is unable to send host-guest mapping data , fails with Error code 500
Environment
- Red Hat Satellite 6.x
Issue
- virt-who is unable to send host-guest mapping data to the Satellite server, it fails with below error:
raise ManagerError("Communication with subscription manager failed with code %d: %s" % (e.code, str(e)))
ManagerError: Communication with subscription manager failed with code 500:
Resolution
Make sure the Satellite username and password and the Organization name are set correctly in the virt-who configuration files: /etc/virt-who.d/*
owner=Org_Label
rhsm_hostname= satellite FQDN
rhsm_username= Satellite Username (not satellite server ssh user)
rhsm_encrypted_password=xxxxxxxxxxxxxxxxxxx (or)
rhsm_password=password (not satellite server ssh password)
rhsm_prefix=/rhsm
For more KB articles/solutions related to Virt-who and Virtual Datacenter (VDC) Subscriptions Issues, please refer to the Consolidated Troubleshooting Article for Virt-who and Virtual Datacenter (VDC) Subscriptions Issues
Root Cause
Incorrect Satellite username/password was configured in virt-who configuration. Please note, rhsm_username and rhsm_password is the credential of Satellite (application), not the ssh user for satellite server.
Diagnostic Steps
-
You can try to login in Satellite UI using the username and password provided in virt-who config file to verify if the credential is working
-
Check rhsm log in the system where virt-who is running :
$ more /var/log/rhsm/rhsm.log
2018-10-30 08:12:22,545 [rhsm.connection INFO] MainProcess(23321):Thread-3 @connection.py:_request:551 - Response: status=500, request="POST /rhsm/hypervisors/ORGNAME?reporter_id=hostname.fqdn-xxxxxxxxxxxxxx e1c&cloaked=False&env=Library"
2018-10-30 08:12:22,546 [virtwho.destination_xxxxxx ERROR] MainProcess(23321):Thread-3 @virt.py:_send_data:633 - Error during hypervisor checkin:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/virtwho/virt/virt.py", line 617, in _send_data
options=self.options)
File "/usr/lib/python2.7/site-packages/virtwho/manager/subscriptionmanager/subscriptionmanager.py", line 207, in hypervisorCheckIn
raise ManagerError("Communication with subscription manager failed with code %d: %s" % (e.code, str(e)))
ManagerError: Communication with subscription manager failed with code 500:
In some cases, you can get access denied error as well :
$ more /var/log/rhsm/rhsm.log
[katello/cp_proxy] [W] SSO failed
[app] [I] Rendered api/v2/errors/unauthorized.json.rabl within api/v2/layouts/error_layout (0.7ms)
[katello/cp_proxy] [E] *** ERROR: Access denied (403) ***
[katello/cp_proxy] [E] REQUEST URL: /rhsm/hypervisors?owner=Default_Organization&env=Library
[katello/cp_proxy] [E] Katello::HttpErrors::Forbidden: Access denied
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.