You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2005/02/28 17:26:00 UTC
DO NOT REPLY [Bug 33774] New: -
JNDIRealm fails when server disconnects after time
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=33774>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=33774
Summary: JNDIRealm fails when server disconnects after time
Product: Tomcat 5
Version: 5.0.30
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: shi1wei3@gmail.com
Using the JNDIRealm for authentication, if the LDAP server is set to
automatically disconnect the client (in this case, tomcat's JNDIRealm), tomcat
does not discover this until it attempts another login. If the connection has
been reset, it results in a failed login attempt for the user. So the first
time somebody logs into the application after some period of time (I think the
timeout is pretty short on our LDAP server), the user will get one failed
login attempt before a real one.
I've not seen in the documentation any properties on the JNDIRealm an amount
of time to hold the connection open before electively disconnecting it.
2005-02-28 07:47:39 JNDIRealm[/iso]: Searching for myuserid
2005-02-28 07:47:39 JNDIRealm[/iso]: base: ou=users,dc=company,dc=com
filter: (&(objectClass=user)(uid=myuserid))
2005-02-28 07:47:39 JNDIRealm[/iso]: Exception performing authentication
javax.naming.CommunicationException: Connection reset [Root exception is
java.net.SocketException: Connection reset]; remaining
name 'ou=ou=users,dc=company,dc=com'
at com.sun.jndi.ldap.LdapCtx.doSearch(LdapCtx.java:1961)
at com.sun.jndi.ldap.LdapCtx.searchAux(LdapCtx.java:1806)
at com.sun.jndi.ldap.LdapCtx.c_search(LdapCtx.java:1731)
at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search
(ComponentDirContext.java:368)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search
(PartialCompositeDirContext.java:338)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search
(PartialCompositeDirContext.java:321)
at javax.naming.directory.InitialDirContext.search
(InitialDirContext.java:248)
at org.apache.catalina.realm.JNDIRealm.getUserBySearch
(JNDIRealm.java:1074)
at org.apache.catalina.realm.JNDIRealm.getUser(JNDIRealm.java:967)
at org.apache.catalina.realm.JNDIRealm.authenticate(JNDIRealm.java:916)
at org.apache.catalina.realm.JNDIRealm.authenticate(JNDIRealm.java:809)
at org.apache.catalina.authenticator.FormAuthenticator.authenticate
(FormAuthenticator.java:235)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke
(AuthenticatorBase.java:446)
at org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:118)
at org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext
(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke
(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service
(CoyoteAdapter.java:160)
at org.apache.jk.server.JkCoyoteHandler.invoke
(JkCoyoteHandler.java:300)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)
at org.apache.jk.common.ChannelSocket.processConnection
(ChannelSocket.java:675)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
at com.sun.jndi.ldap.Connection.run(Connection.java:780)
... 1 more
2005-02-28 07:47:39 JNDIRealm[/iso]: Closing directory context
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org