Hello OpenLDAPs,
Any LDAP search request with '-H ldap://<IP_LDAP_server>/' option returns 'Can't contact LDAP server (-1)' (see below). When the '-H ...' option is left out or when '-H ldap:///' is used, the expected result is returned (see below). The 'ldapsearch -x -H ldap://<IP_LDAP_server>/ ...' behaves the same from the server as from a client on the same LAN.
Thanks for helping me to get rid of this problem. Thierry
# ldapsearch -x -H ldap://192.168.100.11 -D "uid=thierry,ou=People,ou=linux,dc=be" -w password -b ou=linux,dc=be -LLL memberUid -v ldap_initialize( ldap://192.168.100.11:389/??base ) ldap_result: Can't contact LDAP server (-1)
# ldapsearch -x -D "uid=thierry,ou=People,ou=linux,dc=be" -w password -b ou=linux,dc=be -LLL memberUid -v ldap_initialize( <DEFAULT> ) filter: (objectclass=*) requesting: memberUid dn: cn=thierry,ou=Group,ou=linux,dc=be memberUid: thierry
# ldapsearch -x -H ldap:/// -D "uid=thierry,ou=People,ou=linux,dc=be" -w password -b ou=linux,dc=be -LLL memberUid -v ldap_initialize( ldap://:389/??base ) filter: (objectclass=*) requesting: memberUid memberUid: thierry
--On Tuesday, March 10, 2020 12:03 PM +0100 Thierry Debaene thierry.debaene@gmail.com wrote:
# ldapsearch -x -H ldap://192.168.100.11 -D # "uid=thierry,ou=People,ou=linux,dc=be" -w password -b ou=linux,dc=be # -LLL memberUid -v ldap_initialize( ldap://192.168.100.11:389/??base ) ldap_result: Can't contact LDAP server (-1)
Please provide evidence that slapd is listening to 192.168.100.11 on port 389 and that it can be accessed (i.e., no firewall etc blocking access).
For example on my local system:
nc -zv 10.2.0.74 389 Connection to 10.2.0.74 389 port [tcp/ldap] succeeded!
Regards, Quanah
--
Quanah Gibson-Mount Product Architect Symas Corporation Packaged, certified, and supported LDAP solutions powered by OpenLDAP: http://www.symas.com
openldap-technical@openldap.org