2011-11-17 92 views
8

我看到这个,当我尝试用CAS登录时,通过LDAP对AD进行身份验证。CAS AD LDAP 32错误

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) 

在那之前我被BindLdapAuthenticationHandler验证,解决了,它产生了查询生成器,然后扔了这一点。

我认为它试图获取属性时失败。为什么是remaining name '/'

回答

7

剩余名称是在DIT的某个级别实际未找到的DN的一部分。例如,当您搜索cn=johns,ou=marketing,dc=example,dc=comou=marketing,dc=example,dc=com存在但cn=johns不存在于ou=marketing内部时,则重新命名的名称将是cn=johns

'/'看起来不像一个有效的RDN。我会建议验证您作为搜索基础传递的内容。很可能这是一个无效的DN字符串。

+0

我反而得到了一个空的剩余名称,即“”,这看起来更奇怪,问题描述[这里](http://stackoverflow.com/q/39372374/5606016)(它实际上有一个开放的赏金) –

3

LDAP错误代码32的意思是“没有这样的对象”,在这种情况下,也许搜索的基础对象不存在。

+0

我可以确认这是问题的原因,一个空的基础对象。 – sorin