vCenter Server Fails to Join Active Directory with IDM Client Exception Error Code 40118
book
Article ID: 389459
calendar_today
Updated On:
Products
VMware vCenter Server
Issue/Introduction
When attempting to join a vCenter Server to Active Directory, the operation fails with the error message "idm client exception error trying to join AD error code 40118." This prevents the vCenter Server from successfully joining the domain and utilizing Active Directory for authentication and identity management.
The Active Directory Domain tab in the vSphere web client shows the following error message:
mesg: Node didn't join any Active Directory.
Log entries in /var/log/vmware/vmdir/vmafdvmdirclient.log typically show errors similar to:
ERROR: VmDirAnonymousLDAPBindEx to (ldap://domaincontroller.domain.com:389) failed. (-1)(Can't contact LDAP server) ERROR: _VmDirGetDSERootAttributeEx failed with error (9127)
Additionally, the /var/log/vmware/vmafdd/vmafdd.log file may contain entries like:
Failed to join AD. Error(2453)
Environment
VMware vCenter Server 7.0 and later versions
Microsoft Active Directory domain environment
The issue typically occurs during the initial domain join process in the vCenter Server management interface
Cause
This error occurs primarily due to connectivity issues between the vCenter Server and the Active Directory domain controller. Based on log analysis, the most common causes are:
Network connectivity problems preventing LDAP communication on port 389
Firewall rules blocking required ports for Active Directory communication or which permit UDP traffic but block TCP connections for required services
DNS configuration issues causing domain controller resolution failures
LDAP service unavailability on the target domain controller
Resolution
Follow these steps to resolve the vCenter Server Active Directory join failure:
Verify basic network connectivity to the domain controller:
Log in to the vCenter Server Appliance shell
Test basic connectivity using ping. (substitute the actual domain controller FQDN for "domaincontroller.domain.com":)
ping domaincontroller.domain.com
If ping fails, address basic network connectivity issues first
Test specific LDAP port connectivity:
Use curl to test connectivity to the LDAP port (again, substitute the actual domain controller FQDN for "domaincontroller.domain.com")::
curl -v ldap://domaincontroller.domain.com:389
A successful connection will show "Connected to" in the output
If connection is refused or times out, troubleshoot network connectivity issues
Verify DNS configuration:
Check the current DNS settings:
cat /etc/resolv.conf
Ensure the DNS servers listed are the same as the Active Directory DNS servers
If DNS resolution fails, update DNS settings appropriately
Check and adjust firewall settings:
Verify that the following ports are open between vCenter Server and domain controllers: - 53 (DNS - both TCP and UDP), - 88 (Kerberos - both TCP and UDP) - 389/636 (LDAP/LDAPS - TCP only) - 445 (SMB - TCP only) - 3268/3269 (Global Catalog - TCP only)