tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William Stranathan <>
Subject JNDI Realm Disconnect Issues
Date Sat, 19 Mar 2005 15:04:59 GMT
I opened a bug several weeks ago and have seen no traffic on it, and
have posted to the user list twice with no answer, so I'll try here. 
I apologize for mis-posting if I have.

I opened a bug on this a couple of weeks ago, but it hasn't been
touched.  Maybe other folks have seen this behavior...

I'm using the LDAP realm for AAA in my application.  However, the LDAP
server it connects to drops stale sessions after a pretty short time.
Evidently, Tomcat tries to keep connections open so it doesn't have to
connect later on.  Unfortunately, this causes authentication failures
because the host it wants to connect with is no longer there (er...the
connection isn't, anyhow).  After one failure, Tomcat drops the
connection, the user tries again, and gets in.  But 5 minutes later,
the next user will have to try again.

Here's the stack trace that get's logged:

2005-03-11 08:33:47 JNDIRealm[/iso]:   Searching for billybob
2005-03-11 08:33:47 JNDIRealm[/iso]:   base:
ou=users,dc=mycompany,dc=com  filter:
2005-03-11 08:33:47 JNDIRealm[/iso]: Exception performing authentication
javax.naming.CommunicationException: Request: 7 cancelled; remaining
name 'ou=users,dc=mycompany,dc=com'
      at com.sun.jndi.ldap.LdapRequest.getReplyBer(
      at com.sun.jndi.ldap.Connection.readReply(
      at com.sun.jndi.ldap.LdapClient.getSearchReply(
      at com.sun.jndi.ldap.LdapCtx.doSearch(
      at com.sun.jndi.ldap.LdapCtx.searchAux(
      at com.sun.jndi.ldap.LdapCtx.c_search(
      at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(
      at org.apache.catalina.realm.JNDIRealm.getUserBySearch(
      at org.apache.catalina.realm.JNDIRealm.getUser(
      at org.apache.catalina.realm.JNDIRealm.authenticate(
      at org.apache.catalina.realm.JNDIRealm.authenticate(
      at org.apache.catalina.authenticator.FormAuthenticator.authenticate(
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
      at org.apache.catalina.core.StandardValveContext.invokeNext(
      at org.apache.catalina.core.StandardPipeline.invoke(
      at org.apache.catalina.core.StandardHostValve.invoke(
      at org.apache.catalina.core.StandardValveContext.invokeNext(
      at org.apache.catalina.valves.ErrorReportValve.invoke(
      at org.apache.catalina.core.StandardValveContext.invokeNext(
      at org.apache.catalina.core.StandardPipeline.invoke(
      at org.apache.catalina.core.StandardEngineValve.invoke(
      at org.apache.catalina.core.StandardValveContext.invokeNext(
      at org.apache.catalina.core.StandardPipeline.invoke(
      at org.apache.catalina.core.ContainerBase.invoke(
      at org.apache.coyote.tomcat5.CoyoteAdapter.service(
      at org.apache.jk.server.JkCoyoteHandler.invoke(
      at org.apache.jk.common.HandlerRequest.invoke(
      at org.apache.jk.common.ChannelSocket.invoke(
      at org.apache.jk.common.ChannelSocket.processConnection(
      at org.apache.jk.common.SocketConnection.runIt(
      at org.apache.tomcat.util.threads.ThreadPool$

2005-03-11 08:33:47 JNDIRealm[/iso]: Closing directory context

Any magic undocumented setting that will work around this?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message