2011-11-17 22 views
8

Tôi thấy điều này khi tôi cố đăng nhập bằng CAS xác thực với AD qua LDAP.CAS AD LDAP 32 lỗi

SEVERE: Servlet.service() for servlet cas threw exception 
javax.naming.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031001E5, problem 2001 (NO_OBJECT), data 0, best match of: 
    '' 
]; remaining name '/' 
    at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3092) 
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:3013) 
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2820) 
    at com.sun.jndi.ldap.LdapCtx.searchAux(LdapCtx.java:1829) 
    at com.sun.jndi.ldap.LdapCtx.c_search(LdapCtx.java:1752) 
    at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(ComponentDirContext.java:368) 
    at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:338) 
    at javax.naming.directory.InitialDirContext.search(InitialDirContext.java:257) 
    at org.springframework.ldap.core.LdapTemplate$3.executeSearch(LdapTemplate.java:231) 
    at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:293) 
    at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:237) 
    at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:588) 
    at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:546) 
    at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:401) 
    at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:421) 
    at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:441) 

Cho đến thời điểm đó tôi đã được xác thực bởi BindLdapAuthenticationHandler, đã giải quyết, nó tạo ra trình tạo truy vấn và sau đó đã ném điều này.

Tôi nghĩ rằng nó không thành công khi cố gắng lấy lại thuộc tính. Tại sao là remaining name '/'?

Trả lời

7

Tên còn lại là một phần của DN không thực sự được tìm thấy ở một mức DIT nhất định. Ví dụ: khi bạn tìm kiếm cn=johns,ou=marketing,dc=example,dc=comou=marketing,dc=example,dc=com tồn tại nhưng cn=johns không tồn tại bên trong ou=marketing thì tên còn lại sẽ là cn=johns.

'/' trông không giống RDN hợp lệ. Tôi sẽ khuyên bạn nên xác minh những gì bạn vượt qua dưới dạng cơ sở tìm kiếm. Rất có thể đó là chuỗi DN không hợp lệ.

+0

Thay vào đó, tôi có một tên còn trống, có nghĩa là "", trông thậm chí còn lạ hơn, vấn đề được mô tả [ở đây] (http://stackoverflow.com/q/39372374/5606016) (và nó thực sự có tiền thưởng mở) –

3

Mã lỗi LDAP 32 có nghĩa là "không có đối tượng như vậy", trong trường hợp này, có lẽ đối tượng cơ sở của tìm kiếm không tồn tại.

+0

Tôi có thể xác nhận rằng đây là nguyên nhân gây ra sự cố, đối tượng cơ sở trống. – sorin