Improper decommissioning of the 6.x PSC node or any vCenter from ELM might leave stale service registrations on the vCenter which leads to other issues.
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
/etc/vmware/install-defaults/vmdir.ldu-guid to compare Node ID from above file (/tmp/psc.txt):Name: ServiceName
Description: ServiceDescription
Service Product: com.vmware.cis
Service Type: ServiceType
Service ID: 1f10##8f-438d-##b-90f8-47e7d6##a94f
Site ID: default-first-site
Node ID: b2b7##1e-5##9-4a55-88##-699f##eb1d6f
Owner ID: [email protected]
Version: 1.0
Endpoints:
Type: com.vmware.cis.data.provider
Protocol: vmomi
URL: https://VC_PNID:443/sdk
SSL trust:
Endpoint Attributes:
cis.common.ep.localurl: http://localhost:11080/sdk
Attributes:
com.vmware.cis.cm.HostId: 603b3##1-f##b-4##2-a##5-81517##8f47a
/etc/vmware/install-defaults/vmdir.ldu-guid.Improper decommissioning of external PSC or vCenter in Enhanced Linked Mode (ELM).
Follow the below steps to remove the stale service registrations from vCenter Server using the service_unregister_stalenode.sh script.
./service_unregister_stalenode.sh <Node_ID of stale node>bash: ./service_unregister_stalenode.sh: /bin/bash^M: bad interpreter: No such file or directoryRun the command
sed -i -e 's/\r$//' service_unregister_stalenode.sh
Note: This script will not remove service registrations that do not have node IDs; example: sso:groupcheck, sso:admin.