LDAP Bind error when one of multiple LDAP Servers goes down
How to solve Error: Could not bind to any LDAP server: Can't contact LDAP server when multiple ldap servers are added?
Overview: This article provides a solution for the error "Could not bind to any LDAP server: Can't contact LDAP server" that occurs when multiple LDAP servers are configured and one of them goes down.
Under Users -> LDAP, the below error occurs when multiple LDAP servers are configured and one of them goes down.
Step 1: Check the latest application logs for the errors. Navigate to the log directory and tail the latest log.
root@gateway:~# cd $(awk '/^system_folder/ {print $2}' /usr/local/etc/ezlogin/ez.conf)/application/logs/
Refer below example to tail the latest error messages:
root@gateway:/var/www/ezlogin/application/logs# ls
log-2025-03-27.php log-2025-03-28.php
root@gateway:/var/www/ezlogin/application/logs#
log-2025-03-28.php log-2025-03-29.php
root@gateway:/var/www/ezlogin/application/logs# tail -f log-2025-03-29.php
DEBUG - 2025-03-29 12:54:38 --> Get license from cache -
DEBUG - 2025-03-29 12:54:38 --> parse license
DEBUG - 2025-03-29 12:54:38 --> Local time: 1743252878
DEBUG - 2025-03-29 12:54:38 --> uris: Array
(
[0] => ldap://192.168.1.61
)
DEBUG - 2025-03-29 12:54:38 --> LDAP verify cert disabled
DEBUG - 2025-03-29 12:54:38 --> uri: ldap://192.168.1.61
DEBUG - 2025-03-29 12:54:38 --> Connected: ldap://192.168.1.61
DEBUG - 2025-03-29 12:54:38 --> No StartTLS
DEBUG - 2025-03-29 12:54:38 --> Bind as: cn=Administrator,cn=users,dc=ezldap,dc=com
ERROR - 2025-03-29 12:54:48 --> LDAP bind error: Can't contact LDAP server
DEBUG - 2025-03-29 12:54:48 --> Headers: Array
Step 2: To resolve the above error, navigate to Settings -> LDAP and deactivate the LDAP server that is down.
Step 3: Once the server is up, the LDAP server can be reactivated.
Related Articles: