无法连接到 LDAP 服务器 ERRNO=0

无法连接到 LDAP 服务器 ERRNO=0

我有一个 php 应用程序(apache,redhat,selinux 已禁用),并且我正在努力进行 ldap 配置。我尝试连接到 ldap 服务器,但在 apache 日志中收到此错误:

ldap_bind(): Unable to bind to server: Can't contact LDAP server

运行 ldapsearch 命令时:我也收到此错误:

ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)

我尝试调试并使用 openssl 命令:openssl s_client -connect xx.com:636 -debug 并得到以下结果:

CONNECTED(00000003)
write:errno=0
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 322 bytes
Verification: OK
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 0 (ok)
---
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 322 bytes
Verification: OK
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 0 (ok)

有人遇到过同样的问题吗?我以为可能是防火墙的问题,但我打开了端口 636,所以我认为这不是问题所在。/etc/openldap/ldap.conf 也已配置,文件中提到了证书,并且确实存在正确的权限,所以我也不确定这是否是证书的问题。我有点迷茫。任何帮助都非常感谢。谢谢

相关内容