Openfire put strange search filter in ldap search

I tried to setup Openfire using ldap connection, openfire 4.0.1,

I used ApacheDS as the ldap server, ApacheDS 2.0.0 M20

and imported the sample ldif file, a SevenSeas organization with 12 pirates (inetorgperson) all with uid and userpassword attribute.

I added another inetorgperson with uid and userpassword.

Then I tried to have openfire connect to the ldap to search for users.

server type: other or unknown

host: 127.0.0.1 port:10389

baseDN: ou=people,o=sevenSeas

Administrator DN: uid=admin;ou=system (default server administrator)

tests connection setting successful.

however then when I go on to user mapping, the test gave error

Status: Error

No users were found using the specified configuration. Try changing the base DN, user filter or username field.

I had the Username field set as uid, the default

having no success, I pressed save and continue

then I found in the openfire log file

2016.04.19 12:43:59 org.jivesoftware.util.Log - Error occurred while trying to get users data from LDAP

javax.naming.NamingException: [LDAP: error code 33 - ALIAS_PROBLEM: failed for MessageType : SEARCH_REQUEST

Message ID : 2

SearchRequest

baseDn : ‘ou=“people”,o=“sevenSeas”’

filter : ‘(uid=*:[13])’

scope : whole subtree

typesOnly : false

Size Limit : 40

Time Limit : no limit

Deref Aliases : never Deref Aliases

attributes : ‘uid’

org.apache.directory.api.ldap.model.message.SearchRequestImpl@c22a05fbSortReques tControlImpl [sortKeys=[SortKey : [uid]]] ManageDsaITImpl Control

Type OID : ‘2.16.840.1.113730.3.4.2’

Criticality : ‘false’

: java.io.IOException: 系統找不到指定的路徑。]; remaining name ‘’

at com.sun.jndi.ldap.LdapCtx.mapErrorCode(Unknown Source)

at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source)…

I have no idea what a filter: (uid=*:[13]) mean, although I have 13 people in the group, and when I put in the same search in Apache DS studio, it returns no result.

However when I remove the “:[13]”, such that the filter becomes just “uid=*”, or when I just completely removes the search filter. the search in Apache DS studio returns fine with the 13 people.

I have no idea why openfire will add the number of entries in the the search filter (I tried removing the inetorgperson I added, then it became uid=*:[12]), if that be a bug or a misconfiguration by me, some help or tips will be very much appreciated.

One more thing I noticed is that when I try to restart ldap configuration hence the profile setting, the baseDN and administratorDN is not saved, such that it appears in the web just as o= and uid=, however the host, port, admin password was saved, hence I do not know if the baseDN and administratorDN is actually saved, though I suspect it be so because I tried enabling anonymous access in ApacheDS but the search still returns no result.

Is there a longer stack trace available? It would be interesting to know which Openfire class fires this query.

I think the admin dn might be misleading. It’s the account account used to bind to your ldap for queries. try using the full dn for the account you’re using, or just something like ‘user@domain.local’. I also suggest setting your basedn to the root of your domain. ie baseDn = ‘dc=domain,dc=local’

java.io.IOException: (System cannot find the specified path)

java.io.IOException: 系統找不到指定的路徑。]; remaining name ‘’

at com.sun.jndi.ldap.LdapCtx.mapErrorCode(Unknown Source)

at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source)

at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source)

at com.sun.jndi.ldap.LdapCtx.searchAux(Unknown Source)

at com.sun.jndi.ldap.LdapCtx.c_search(Unknown Source)

at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(Unknown Source)

at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(Unknown Source)

at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(Unknown Source)

at javax.naming.directory.InitialDirContext.search(Unknown Source)

at org.jivesoftware.admin.LdapUserTester.getSample(LdapUserTester.java:124)

at org.jivesoftware.openfire.admin.setup.setup_002dldap_002duser_005ftest_jsp._jsp Service(setup_002dldap_002duser_005ftest_jsp.java:94)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)

at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1669)

at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1652)

at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:76)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1652)

at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingF ilter.java:53)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1652)

at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:80)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1652)

at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:162)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1652)

at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)

at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)

at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:22 3)

at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:11 27)

at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)

at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185 )

at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:106 1)

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)

at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandler Collection.java:215)

at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.jav a:110)

at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)

at org.eclipse.jetty.server.Server.handle(Server.java:499)

at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)

at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)

at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)

at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635 )

at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)

at java.lang.Thread.run(Unknown Source)