Symptoms:
While starting up, the vCenter services lookupsvc and/or vpxd-svcs fail to start.
/var/log/vmware/lookupsvc/lookupserver-default.log:
[YYYY-MM-DDTHH:MM:SS] pool-2-thread-4 WARN com.vmware.vim.lookup.impl.LdapStorage] Failed search with base DN cn=ServiceRegistrations,cn=LookupService,cn=Granite,cn=Sites,cn=Configuration,dc=vsphere,dc=local'
com.vmware.sso.interop.ldap.NoSuchObjectLdapException: No such object
at com.vmware.sso.interop.ldap.LdapErrorChecker$22.RaiseLdapError(LdapErrorChecker.java:336) ~[ldap-lib-0.0.1-SNAPSHOT.jar:?]
at com.vmware.sso.interop.ldap.LdapErrorChecker.CheckError(LdapErrorChecker.java:863) ~[ldap-lib-0.0.1-SNAPSHOT.jar:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_351]
at java.lang.Thread.run(Thread.java:750) [?:1.8.0_351]
[YYYY-MM-DDTHH:MM:SS] pool-2-thread-4 WARN com.vmware.vim.lookup.impl.LdapStorage] Empty list returned with filter: com.vmware.vim.lookup.ServiceRegistrationTypes$Filter@1332c25e[siteId=granite,nodeId=<null>,serviceProduct=com.vmware.cis,serviceType=cs.identity,endpointType=<null>,endpointProtocol=<null>,endpointTrustAnchor=<null>]
[YYYY-MM-DDTHH:MM:SS] pool-2-thread-4 ERROR com.vmware.vim.lookup.vlsi.util.VmodlEnhancer] SSO service record not found
java.lang.IllegalStateException: SSO service record not found
[YYYY-MM-DDTHH:MM:SS] localhost-startStop-1 ERROR com.vmware.sync.subscribe.SusbscribeDbStore] SusbscribeDbStore intialized with dbUserName: lookupsvc_sync_db
[YYYY-MM-DDTHH:MM:SS] localhost-startStop-1 ERROR com.vmware.vim.lookup.impl.LdapStorage] LDAP action failed; host=XX.XX.XX.XX, port=389
com.vmware.sso.interop.ldap.NoSuchObjectLdapException: No such object
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.vmware.vim.lookup.impl.ServiceRegistrationImpl]: Constructor threw exception; nested exception is com.vmware.vim.lookup.exception.StorageException: No such object
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serviceRegistration' defined in ServletContext resource [/WEB-INF/tomcat-ls.xml]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.vmware.vim.lookup.impl.ServiceRegistrationImpl]: Constructor threw exception; nested exception is com.vmware.vim.lookup.exception.StorageException: No such object/var/log/vmware/vpxd-svcs/vpxd-svcs.log:
[YYYY-MM-DDTHH:MM:SS] [cache-sync-task [] WARN com.vmware.identity.interop.ldap.LdapErrorChecker opId=] Error received by LDAP client: com.vmware.identity.interop.ldap.OpenLdapClientLibrary, error code: -1
[YYYY-MM-DDTHH:MM:SS] [cache-sync-task [] ERROR com.vmware.identity.interop.ldap.OpenLdapClientLibrary opId=] Exception when calling ldap_search_s: base=, scope=0, filter=(objectClass=*), attrs=[objectGUID, null], attrsonly=1
com.vmware.identity.interop.ldap.ServerDownLdapException: Can't contact LDAP server
[YYYY-MM-DDTHH:MM:SS] [cache-sync-task [] WARN com.vmware.cis.core.tagging.internal.impl.SyncManagerImpl opId=] Unable to get object guid of ldap root DSE entry
[YYYY-MM-DDTHH:MM:SS] [cache-sync-task [] ERROR com.vmware.cis.core.tagging.internal.impl.SyncManagerImpl opId=] Failed to get deleted objects from Lotus:
[YYYY-MM-DDTHH:MM:SS] [tomcat-exec-52 [] INFO com.vmware.vim.vcauthenticate.servlets.AuthenticationServlet opId=] Sending security error because of: com.vmware.vim.vcauthenticate.exception.NotAuthenticatedException Msg: null
[YYYY-MM-DDTHH:MM:SS] [pool-14-thread-1 [] WARN com.vmware.cis.lotus.LdapUtils opId=] Error on ldapSearch:VMware vCenter Server 6.7.x
VMware vCenter Server 7.x
VMware vCenter Server 8.x
VMware vCenter Server 9.0.x
This issue may occur when the LookupService container is missing from the vmdird database.
<SSO_PWD> is the SSO password.ldapsearch -x -h localhost -b "cn=Default-First-Site,cn=Sites,cn=Configuration,dc=vsphere,dc=local" -s sub "(objectClass=container)" -D "cn=Administrator,cn=Users,dc=vsphere,dc=local" -w <SSO_PWD>' dn
Expected Output : # extended LDIF## LDAPv3# base <cn=Default-First-Site,cn=Sites,cn=Configuration,dc=vsphere,dc=local> with scope subtree# filter: (objectClass=container)# requesting: dn## Default-First-Site, Sites, Configuration, vsphere.localdn: cn=Default-First-Site,cn=Sites,cn=Configuration,dc=vsphere,dc=local# Servers, Default-First-Site, Sites, Configuration, vsphere.localdn: cn=Servers,cn=Default-First-Site,cn=Sites,cn=Configuration,dc=vsphere,dc=local# Replication Agreements, XX.XX.XX.XX, Servers, Default-First-Site, Sites, Configuration, vsphere.localdn: cn=Replication Agreements,cn=XX.XX.XX.XX,cn=Servers,cn=Default-First-Site,cn=Sites,cn=Configuration,dc=vsphere,dc=local# LookupService, Default-First-Site, Sites, Configuration, vsphere.localdn: cn=LookupService,cn=Default-First-Site, cn=Sites,cn=Configuration,dc=vsphere,dc=local# Configuration, LookupService, Default-First-Site, Sites, Configuration, vsphere.localdn: cn=Configuration,cn=LookupService,cn=Default-First-Site, cn=Sites,cn=Configuration,dc=vsphere,dc=local# ServiceRegistrations, LookupService, Default-First-Site, Sites, Configuration, vsphere.localdn: cn=ServiceRegistrations,cn=LookupService,cn=Default-First-Site, cn=Sites,cn=Configuration,dc=vsphere,dc=local# search resultsearch: 2result: 0 Success# numResponses: 7# numEntries: 6
If missing, the output will be like below: # extended LDIF## LDAPv3# base <cn=Default-First-Site,cn=Sites,cn=Configuration,dc=vsphere,dc=local> with scope subtree# filter: (objectClass=container)# requesting: dn## Default-First-Site, Sites, Configuration, vsphere.localdn: cn=Default-First-Site,cn=Sites,cn=Configuration,dc=vsphere,dc=local# Servers, Default-First-Site, Sites, Configuration, vsphere.localdn: cn=Servers,cn=Default-First-Site,cn=Sites,cn=Configuration,dc=vsphere,dc=local# Replication Agreements, 10.0.0.1, Servers, Default-First-Site, Sites, Configuration, vsphere.localdn: cn=Replication Agreements,cn=10.0.0.1,cn=Servers,cn=Default-First-Site,cn=Sites,cn=Configuration,dc=vsphere,dc=local# search resultsearch: 2result: 0 Success# numResponses: 4# numEntries: 3
Workaround:
To recreate the missing Container, copy the attached script to the vCenter Server Appliance. Then run python recreatecontainer.py
The script will automatically recreate the missing containers. After the script runs successfully, stop and start vCenter services:
service-control --stop --all && service-control --start --all
Some services may fail to start since Service Registrations are missing. If so, use lsdoctor to recreate the service registrations:
Run python lsdoctor.py -r and select Option 2 : Replace all services with new services.
Once done, restart all services:
service-control --stop --all && service-control --start --all