authentication - NameNotFoundException in LDAP while used with Gerrit -
my intention install gerrit code review tool in remote server. had initialise gerrit site , launched web ui of gerrit in browser. key thing have used "ldap" auth type in gerrit config file. when tried sign in gerrit shows error "authentication unavailable @ time". , corresponding error log shows "namenotfoundexception". shown below gerrit configuration , error log messages. assume ldap server ip "xxx.xxx.xxx.xxx" , domain "abc-def.com" knows how fix issue ..??
**gerrit.config** [database] type = h2 database = /home/test/gerrit-testsite/db/reviewdb [index] type = lucene [auth] type = ldap [ldap] server = ldap://xxx.xxx.xxx.xxx username = nidheesh.kumar@abc-def.com password = ******* accountbase = cn=username,ou=users,ou=tvm,ou=india,dc=abc-def,dc=com referral = follow accountpattern = (samaccountname=${username}) grouppattern = (cn=${groupname}) accountfullname = cn accountmemberfield = memberof accountemailaddress = mail [receive] enablesignedpush = false [sendemail] smtpserver = localhost [container] user = test javahome = /usr/lib/jvm/java-7-openjdk-amd64/jre **error log** error com.google.gerrit.server.auth.ldap.ldaprealm : cannot query ldap authenticate user javax.naming.namenotfoundexception: [ldap: error code 32 - 0000208d: nameerr: dsid-03100238, problem 2001 (no_object), data 0, best match of: 'ou=users,ou=tvm,ou=india,dc=quest-global,dc=com' \00]; remaining name 'cn=username,ou=users,ou=tvm,ou=india,dc=quest-global,dc=com' @ com.sun.jndi.ldap.ldapctx.maperrorcode(ldapctx.java:3113) @ com.sun.jndi.ldap.ldapctx.processreturncode(ldapctx.java:3034) @ com.sun.jndi.ldap.ldapctx.processreturncode(ldapctx.java:2841) @ com.sun.jndi.ldap.ldapctx.searchaux(ldapctx.java:1850) @ com.sun.jndi.ldap.ldapctx.c_search(ldapctx.java:1773) @ com.sun.jndi.ldap.ldapctx.c_search(ldapctx.java:1790) @ com.sun.jndi.toolkit.ctx.componentdircontext.p_search(componentdircontext.java:412) @ com.sun.jndi.toolkit.ctx.partialcompositedircontext.search(partialcompositedircontext.java:394) @ com.sun.jndi.toolkit.ctx.partialcompositedircontext.search(partialcompositedircontext.java:376) @ javax.naming.directory.initialdircontext.search(initialdircontext.java:286) @ com.google.gerrit.server.auth.ldap.ldapquery.query(ldapquery.java:70) @ com.google.gerrit.server.auth.ldap.helper.findaccount(helper.java:205) @ com.google.gerrit.server.auth.ldap.ldaprealm.authenticate(ldaprealm.java:235) @ com.google.gerrit.server.account.accountmanager.authenticate(accountmanager.java:106) @ com.google.gerrit.httpd.auth.ldap.ldaploginservlet.dopost(ldaploginservlet.java:125) @ javax.servlet.http.httpservlet.service(httpservlet.java:648) @ javax.servlet.http.httpservlet.service(httpservlet.java:729) @ com.google.inject.servlet.servletdefinition.doserviceimpl(servletdefinition.java:287) @ com.google.inject.servlet.servletdefinition.doservice(servletdefinition.java:277) @ com.google.inject.servlet.servletdefinition.service(servletdefinition.java:182) @ com.google.inject.servlet.managedservletpipeline.service(managedservletpipeline.java:91) @ com.google.inject.servlet.filterchaininvocation.dofilter(filterchaininvocation.java:85) @ com.google.gerrit.httpd.getuserfilter.dofilter(getuserfilter.java:82) @ com.google.inject.servlet.filterchaininvocation.dofilter(filterchaininvocation.java:82) @ com.google.gwtexpui.server.cachecontrolfilter.dofilter(cachecontrolfilter.java:73) @ com.google.inject.servlet.filterchaininvocation.dofilter(filterchaininvocation.java:82) @ com.google.gerrit.httpd.runasfilter.dofilter(runasfilter.java:117) @ com.google.inject.servlet.filterchaininvocation.dofilter(filterchaininvocation.java:82) @ com.google.gerrit.httpd.allrequestfilter$filterproxy$1.dofilter(allrequestfilter.java:136) @ com.google.gerrit.httpd.allrequestfilter$filterproxy.dofilter(allrequestfilter.java:138) @ com.google.inject.servlet.filterchaininvocation.dofilter(filterchaininvocation.java:82)`enter code here` @ com.google.gerrit.httpd.requestcontextfilter.dofilter(requestcontextfilter.java:75) @ com.google.inject.servlet.filterchaininvocation.dofilter(filterchaininvocation.java:82) @ com.google.inject.servlet.managedfilterpipeline.dispatch(managedfilterpipeline.java:119) @ com.google.inject.servlet.guicefilter$1.call(guicefilter.java:133) @ com.google.inject.servlet.guicefilter$1.call(guicefilter.java:130) @ com.google.inject.servlet.guicefilter$context.call(guicefilter.java:203) @ com.google.inject.servlet.guicefilter.dofilter(guicefilter.java:130) @ org.eclipse.jetty.servlet.servlethandler$cachedchain.dofilter(servlethandler.java:1652) @ org.eclipse.jetty.servlet.servlethandler.dohandle(servlethandler.java:585) @ org.eclipse.jetty.server.session.sessionhandler.dohandle(sessionhandler.java:221) @ org.eclipse.jetty.server.handler.contexthandler.dohandle(contexthandler.java:1127) @ org.eclipse.jetty.servlet.servlethandler.doscope(servlethandler.java:515) @ org.eclipse.jetty.server.session.sessionhandler.doscope(sessionhandler.java:185) @ org.eclipse.jetty.server.handler.contexthandler.doscope(contexthandler.java:1061) @ org.eclipse.jetty.server.handler.scopedhandler.handle(scopedhandler.java:141) @ org.eclipse.jetty.server.handler.handlerwrapper.handle(handlerwrapper.java:97) @ org.eclipse.jetty.server.handler.requestloghandler.handle(requestloghandler.java:95) @ org.eclipse.jetty.server.handler.handlerwrapper.handle(handlerwrapper.java:97) @ org.eclipse.jetty.server.server.handle(server.java:499) @ org.eclipse.jetty.server.httpchannel.handle(httpchannel.java:310) @ org.eclipse.jetty.server.httpconnection.onfillable(httpconnection.java:257) @ org.eclipse.jetty.io.abstractconnection$2.run(abstractconnection.java:540) @ org.eclipse.jetty.util.thread.queuedthreadpool.runjob(queuedthreadpool.java:635) @ org.eclipse.jetty.util.thread.queuedthreadpool$3.run(queuedthreadpool.java:555) @ java.lang.thread.run(thread.java:745)
i have fixed issue changing gerrit.config file following settings : [auth] type = ldap_bind [ldap] server = ldap://192.168.192.200 accountbase = cn=username,ou=users,ou=tvm,ou=india,dc=quest-global,dc=com referral = follow accountpattern = (&(objectclass=*)(samaccountname=${username})) groupbase = cn=username,ou=users,ou=tvm,ou=india,dc=quest-global,dc=com grouppattern = (cn=${groupname}) accountfullname = cn accountmemberfield = memberof accountemailaddress = mail
but authentication still not working, info got error log as:
info com.google.gerrit.httpd.auth.ldap.ldaploginservlet : 'xxxx@abc-def.com' failed sign in: no such user: xxxx@abc-def.com
should have edit in gerrit server authentication work ? or have edit in ldap server work ?
Comments
Post a Comment