virt-who failed to register the VMware hypervisor "WebFault: Server raised fault: 'Cannot complete login due to an incorrect user name or password.'
Environment
- Subscription Management
- virt-who
- VMware ESX host
- Red Hat Enterprise Linux
- Red Hat Satellite 6
Issue
- Failed to register the VMware hypervisor in Subscription Management after starting virt-who service.
Traceback error as follows:
Traceback (most recent call last):
File "/usr/share/virt-who/virt-who.py", line 178, in _send
self.checkConnections()
File "/usr/share/virt-who/virt-who.py", line 157, in checkConnections
self.initVirt()
File "/usr/share/virt-who/virt-who.py", line 107, in initVirt
self.virt = VSphere(self.logger, self.options.server, self.options.username, self.options.password)
File "/usr/share/virt-who/vsphere.py", line 129, in __init__
self.client.service.Login(_this=self.sc.sessionManager, userName=username, password=password)
File "/usr/lib/python2.6/site-packages/suds/client.py", line 542, in __call__
return client.invoke(args, kwargs)
File "/usr/lib/python2.6/site-packages/suds/client.py", line 602, in invoke
result = self.send(soapenv)
File "/usr/lib/python2.6/site-packages/suds/client.py", line 657, in send
result = self.failed(binding, e)
File "/usr/lib/python2.6/site-packages/suds/client.py", line 712, in failed
r, p = binding.get_fault(reply)
File "/usr/lib/python2.6/site-packages/suds/bindings/binding.py", line 265, in get_fault
raise WebFault(p, faultroot)
WebFault: Server raised fault: 'Cannot complete login due to an incorrect user name or password.'
2014-05-30 11:27:09,796 [ERROR] @virt-who.py:184 - Unable to recover, retry in 60 seconds.
Resolution
- Configure
/etc/virt-who.d/virt-who.confwith the correct information as follows:
# vi /etc/virt-who.d/config.conf
[config]
type=<hypervisor_type>
server=<vcenter/esx host>
username=<vcenter/esx_username> >> VCenter FQDN
password=<password> >> Vcenter admin password
owner=<owner>
env=Library
rhsm_hostname=<satellite hostname>
rhsm_username=admin >> Vcenter admin User
rhsm_encrypted_password=<encypted-password>
rhsm_prefix=/rhsm
hypervisor_id=hostname
filter_hosts=host1.example.com,host2.example.com OR
exclude_hosts=host1.example.com,host2.example.com
Note: Ensure the "username" has a read-only role set and is not an "admin" user otherwise you'll get the error message 'Cannot complete login due to an incorrect user name or password.'
- Start the virt-who service:
# systemctl start virt-who
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
- virt-who config file is wrongly configured.
- If using
Windowsdomain user for vCenter authentication then make sure it configured properly as per KCS 1270223
Diagnostic Steps
- Check the virt-who service status
● virt-who.service - Daemon for reporting virtual guest IDs to subscription-manager
Loaded: loaded (/usr/lib/systemd/system/virt-who.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2023-12-12 11:32:18 CET; 3s ago
Main PID: 15XXX2 (virt-who)
Tasks: 6
CGroup: /system.slice/virt-who.service
└─15XXX2 /usr/bin/python /usr/bin/virt-who
Dec 12 11:32:18 example.com /usr/bin/virt-who[15332]: 2023-12-12 11:32:18,253 [virtwho.rhsm_log INFO] MainProcess(15332):MainThread @executor.py:__init__:54 - Using config named 'virt-who-config-4'
Dec 12 11:32:18 example.com /usr/bin/virt-who[15332]: 2023-12-12 11:32:18,254 [virtwho.rhsm_log INFO] MainProcess(15332):MainThread @executor.py:__init__:54 - Using config named 'virt-who-config-3'
Dec 12 11:32:18 example.com /usr/bin/virt-who[15332]: 2023-12-12 11:32:18,254 [virtwho.rhsm_log INFO] MainProcess(15332):MainThread @main.py:main:176 - Using configuration "virt-who-config-4" ("esx" mode)
Dec 12 11:32:18 example.com /usr/bin/virt-who[15332]: 2023-12-12 11:32:18,254 [virtwho.rhsm_log INFO] MainProcess(15332):MainThread @main.py:main:176 - Using configuration "virt-who-config-3" ("esx" mode)
Dec 12 11:32:18 example.com /usr/bin/virt-who[15332]: 2023-12-12 11:32:18,254 [virtwho.rhsm_log INFO] MainProcess(15332):MainThread @main.py:main:178 - Using reporter_id='example.com-972aebeb0ce042678a9319c9cf1aa503'
Dec 12 11:32:18 example.com systemd[1]: Started Daemon for reporting virtual guest IDs to subscription-manager.
Dec 12 11:32:21 example.com /usr/bin/virt-who[15332]: 2023-12-12 11:32:21,599 [virtwho.main ERROR] MainProcess(15332):Thread-3 @esx.py:login:398 - Unable to login to ESX
WebFault: Server raised fault: 'Cannot complete login due to an incorrect user name or password.'
Dec 12 11:32:21 example.com /usr/bin/virt-who[15332]: 2023-12-12 11:32:21,599 [virtwho.main ERROR] MainProcess(15332):Thread-3 @virt.py:run:416 - Thread 'virt-who-config-3' fails with error: Server raised fault: 'Cannot complete login due to an incorrect user name or password.'
Dec 12 11:32:21 example.com /usr/bin/virt-who[15332]: 2023-12-12 11:32:21,600 [virtwho.main INFO] MainProcess(15332):Thread-3 @virt.py:_send_data:981 - Report for config "virt-who-config-3" gathered, placing in datastore
Dec 12 11:32:21 example.com /usr/bin/virt-who[15332]: 2023-12-12 11:32:21,604 [virtwho.main INFO] MainProcess(15332):Thread-3 @virt.py:run:440 - Waiting 7200 seconds before performing action again 'virt-who-config-3'
SBR
Product(s)
Components
Category
Tags
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.