Why is there an exception while LDAP connection to AEM?
There are a couple of things to check before troubleshooting the LDAP issues:
1. Please check if there is some mismatch with the configuration at the ldap side and the ldap server configuration.
2. Please confirm the binding information at both the ends hold good.
3. Enable logging to see if there are any entries.
4. Create a debug level log for com.day.crx.security.ldap.
In addition, read the following article: Top issues | Integrating CQ with LDAP.