我們有一個使用 ldap 來驗證用戶身份的應用程序。我們使用https://www.ldaptive.org/作為 ldap 客戶端,并通過 jaas 登錄配置文件對其進行配置。這是我們的 jaas 登錄配置文件的示例:ourApplication { org.ldaptive.jaas.LdapLoginModule required storePass="true" ldapUrl="ldap://ldapserver:10389" baseDn="ou=People,dc=example,dc=com" useStartTLS="false" bindDn="uid=admin,ou=People,dc=example,dc=com" bindCredential="password" userFilter="(uid={user})"; org.ldaptive.jaas.LdapRoleAuthorizationModule required useFirstPass="true" ldapUrl="ldap://ldapserver:10389" baseDn="ou=Roles,dc=example,dc=com" roleFilter="(member={dn})" roleAttribute="cn";};這已經足夠好了。隨著時間的推移,我們開始出現錯誤,類似于此處描述的內容:https://confluence.atlassian.com/confkb/ldap-queries-fail-with-address-already-in-use-error-222201829.html我們遇到類似的通信和綁定錯誤。上面的鏈接建議運行netstat -na在我們的應用程序服務器上運行命令來查看是否有大量與 LDAP 服務器的打開連接。當我這樣做時,我看到數百行如下所示:TCP 129.135.249.138:65525 129.135.28.18:10389 ESTABLISHED其中左側地址是我們的服務器:端口,右側是 ldap 服務器:端口。最終,左側的端口變為 65535,這可能是導致無法進行身份驗證的原因:所有端口都被占用,因此無法通信。上面的 atlassian 鏈接指向 ldaptive jaas 配置頁面,了解如何為 ldaptive 配置連接池的示例:https://www.ldaptive.org/docs/guide/jaas.html
添加回答
舉報
0/150
提交
取消