/cloudapi/1.0.0/sessions/provider sometimes fails./opt/vmware/vcloud-director/logs/vcloud-container-debug.log the following errors show in the VCD logs when receiving the HTTP 401 response:ERROR | pool-jetty-### | LdapProviderImpl | Error logging into LDAP. | requestId=########,request=POST https://<VCD_FQDN>/cloudapi/1.0.0/sessions,requestTime=####,remoteAddress=#.#.#.#:#,userAgent=<USER_STRING> ...,accept=application/json;version 39.0javax.naming.CommunicationException: simple bind failed: <LDAP_FQDN>:636 [Root exception is java.net.SocketException: Connection reset] at java.naming/com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:219)[....]Caused by: java.net.SocketException: Connection resetINFO | pool-jetty-### | EmailManager | No addresses to send email : LDAP connection error. | requestId=<REQUEST_ID>,request=POST https://<VCD_FQDN>/cloudapi/1.0.0/sessions/provider,requestTime=#####,remoteAddress=##.##.##.##,userAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 ...,accept=application/json;version 39.1
DEBUG | pool-jetty-### | SecurityServiceImpl | Cannot authenticate user | requestId=########,request=POST https://<VCD_FQDN>/cloudapi/1.0.0/sessions,requestTime=####,remoteAddress=#.#.#.#:##,userAgent=<USER_STRING> ...,accept=application/json;version 39.0
com.vmware.ssdc.backendbase.ldap.UninitializedLdapContextException: LDAP context not initialized. Error connecting to LDAP. at com.vmware.ssdc.backendbase.ldap.LdapProviderImpl.search(LdapProviderImpl.java:1044)
This only occurs for LDAP login and not for local VCD users such as administrator@system
VMware Cloud Director 10.6.x
This issue will occur when there is a connection issue to the configured LDAP endpoint, an active directory domain controller or equivalent. Inconsistency may be seen where there is an issue with the load balancer or only one/some of the LDAP servers behind it.
To resolve this issue investigate the configured LDAP server(s) to isolate where the connection is dropped. Engage with your LDAP team to confirm that the LDAP service is active and correctly configured on the LDAP server(s) in use. Additionally verify with your network team if there are any firewall rules, load balancer configurations, or ACLs preventing traffic from any of the VCD Cells to the LDAP server(s).
The following steps can be performed to assist diagnosis:
server' and 'port' fields.For additional information see Edit, Test, and Synchronize an LDAP Connection Using Your VMware Cloud Director Service Provider Admin Portal
server' and 'port' value identified earlier when reviewing the configuration.To workaround this issue you can login using the default local account administrator@system or alternative create a new local user in the Provider UI for login purposes with the desired permission role.