錯誤:無法啟動 TLS。請檢查您的 LDAP 伺服器配置。在 PhpLdapAdmin 上

錯誤:無法啟動 TLS。請檢查您的 LDAP 伺服器配置。在 PhpLdapAdmin 上

我們有一個 LDAP 伺服器,我們使用 phpldapadmin 來管理它。我已經很久沒有使用它了,當我嘗試使用管理員用戶登入時,我得到以下資訊:

Could not start TLS. (LDAP Server)
Error: Could not start TLS. Please check your LDAP server configuration.

error   Unable to connect to LDAP server LDAP Server
Error: Can't contact LDAP server (-1) for user

error   Failed to Authenticate to server
Invalid Username or Password.

LDAP 伺服器運作正常,我還驗證了使用者的密碼,它是正確的。我可以使用該使用者在命令列上的伺服器上進行 ldapsearch。

我最近在這台伺服器上唯一改變的是一些 iptables 規則。它曾經工作得很好,所以我不太明白問題出在哪裡。我們使用 Let's Encrypt 憑證連接到 LDAP 伺服器。伺服器在 Debian 9 下,phpldapadmin 使用 nginx。

編輯

我已將 PLA 日誌置於調試模式,但沒有獲得比以前更多的資訊。 Nginx 的日誌中也沒有給我任何錯誤。我嘗試過以下命令:

ldapsearch -ZZ -H ldap://ldap.mydomain.com -W -D cn=adminuser,dc=mydomain,dc=com -b dc=mydomain,dc=com

而且效果很好。也可以使用以下命令檢查 ssl 連線:

openssl s_client -connect ldap.mydomain.com:636

返回證書。

我不知道PLA是否可以讀取ldap.conf

答案1

解決方案是如此簡單,我什至無法思考。我重新啟動 php7.0-fpm 並解決了問題。

相關內容