Possible duplicate entries in the Lookup Service Registration Database detected"VMware vCenter server 7.x
VMware vCenter server 8.x
Steps to check stale registrations on vCenter Server:
/usr/lib/vmware-lookupsvc/tools/lstool.py list --url https://localhost/lookupservice/sdk --no-check-cert > /tmp/psc.txt
less /tmp/psc.txt | grep -i "Service Type: " | sort | uniq -c
For an environment with two vCenters in Enhanced Linked Mode (ELM), there would be two service registrations for each service. If there are more than two, then these can be potentially stale ones.
/etc/vmware/install-defaults/vmdir.ldu-guid to compare Node ID from above file (/tmp/psc.txt):
/etc/vmware/install-defaults/vmdir.ldu-guid.Scenario 1: When the Node ID is same between service registrations which needs to be removed.
For Example:
Below 2 service registration have the same Node ID, Service Type, Owner ID.
Name: ServiceName Description: ServiceDescription Service Product: com.vmware.cis Service Type: ServiceType Service ID: 1f10XX8f-438d-XXb-90f8-XXXd6XXa94f Site ID: default-first-site Node ID: b2b7XX1e-5XX9-4a55-88XX-699fXXeb1d6f Owner ID: vpxd-extension@sso_domain
Name: ServiceName Description: ServiceDescription Service Product: com.vmware.cis Service Type: ServiceType Service ID: 789XXXXfg-64e3-XXb-32u9-XXX862XXX Site ID: default-first-site Node ID: b2b7XX1e-5XX9-4a55-88XX-699fXXeb1d6f Owner ID: vpxd-extension@sso_domain
In this case we need to identify the stale entry to be removed using the vCenter server logs.
1. Firsboot log will have all the registered service registration entries which are downloaded during the vCenter server installation, from here we can get the valid service ID which was installed in vCenter server.
2. Go to the location /var/log/firstboot in the vCenter server logs and run the command grep -i "Service ID" * | less (service ID for which the duplicate entry is detected)
3. If you get an output as below for the service ID, which means that service ID is currently installed in the vCenter server and it is a valid one which should not be removed.
vmidentity-firstboot.py_2##3_stdout.log:XXXX-0x-XXTXX:XX:XX.XXXZ Running command: ['/usr/lib/vmware-lookupsvc/tools/lstool.py', 'register', '--id', 'Service ID', '--user', 'Administrator@sso_domain', '--password', '*******', '--spec', '/var/lib/lookupsvc/lookupsvc syaas.service.spec', '--url', 'https://vCenter server FQDN.au:443/lookupservice/sdk']
Following steps need to be performed to remove the stale entries identified above:
1. Take a no memory snapshot of the vCenter server if it is standalone or powered off snapshots of vCenter servers if in linked mode
2. Take SSH access to the vCenter server and run the following command to unregister the stale service ID:
/usr/lib/vmware-lookupsvc/tools/lstool.py unregister --url http://localhost:7090/lookupservice/sdk --id Stale_Service_ID --user 'administrator@sso_domain' --password 'sso_password' --no-check-cert
Scenario 2: When the Node ID is different between duplicate service registrations which needs to be removed
Refer the following KB to remove stale entry using a script when the Node ID's are different:
Scenario 3: When the Node ID is not present to validate the duplicate service registrations. Also, we do not see any firstboot logs related to the specific service.
/usr/lib/vmware-lookupsvc/tools/lstool.py list --url https://localhost/lookupservice/sdk --no-check-cert > /tmp/psc.txt
Note: Please ensure that a proper snapshot is taken for the vCenter before making any changes.