Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...Your site is one of the cleanest and BEST forums that I have seen. I have sent quite a few people your way. Keep up the good work!!!"

Geography

Where in the world do Tek-Tips members come from?

Tomcat LDAP authentication problem

DinkyJackson (Programmer)
6 Jun 12 5:25
Hi all


I have a web application running on Tomcat 7.0.14 and I'm using LDAP for user authentication. The problem is that when a user logs in after an inactive period the following warning comes out. The inactive period doesn't have to be long, as only few minutes is enough. However, the user is able to log in despite of the warning. From the users' point of view the application behaves normally, but Tomcat log reveals the warning below.

CODE --> java

Jun 6, 2012 9:41:19 AM org.apache.catalina.realm.JNDIRealm authenticate WARNING: Exception performing authentication javax.naming.CommunicationException [Root exception is java.io.IOException: connection closed]; remaining name '' at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:157) at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2685) at com.sun.jndi.ldap.LdapCtx.ensureOpen(LdapCtx.java:2593) at com.sun.jndi.ldap.LdapCtx.ensureOpen(LdapCtx.java:2567) at com.sun.jndi.ldap.LdapCtx.doSearch(LdapCtx.java:1932) at com.sun.jndi.ldap.LdapCtx.doSearchOnce(LdapCtx.java:1924) at com.sun.jndi.ldap.LdapCtx.c_getAttributes(LdapCtx.java:1317) at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_getAttributes(ComponentDirContext.java:231) at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:139) at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:127) at javax.naming.directory.InitialDirContext.getAttributes(InitialDirContext.java:140) at org.apache.catalina.realm.JNDIRealm.bindAsUser(JNDIRealm.java:1621) at org.apache.catalina.realm.JNDIRealm.checkCredentials(JNDIRealm.java:1480) at org.apache.catalina.realm.JNDIRealm.authenticate(JNDIRealm.java:1131) at org.apache.catalina.realm.JNDIRealm.authenticate(JNDIRealm.java:1016) at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:282) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:440) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:399) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:317) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:204) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:311) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636) Caused by: java.io.IOException: connection closed at com.sun.jndi.ldap.LdapClient.ensureOpen(LdapClient.java:1576) at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:155) ... 27 more

The LDAP configuration is in the application's context.xml file:

CODE --> java

<Realm className="org.apache.catalina.realm.JNDIRealm" connectionURL="ldaps://ldap-company.com" userPattern="uid={0},dc=company,dc=com" roleBase="ou=groups,o=company" roleName="uid" roleSearch="uniqueMember={0}" roleSubtree="true" />

I've found posts about this problem from several forums, but no one seems to have figured out the solution.

Thanks

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close