Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Jetty with LDAP : Error: Too many open files

Hey Guys 

I am using jetty 6.1.22 to run web application on Unix server , which does
LDAP authentication for the users.
I am getting this exception when there are more than 5-6 users logged in :

javax.security.auth.login.LoginException: java.lang.RuntimeException:
Unable to establish root con
text
        at
org.mortbay.jetty.plus.jaas.ldap.LdapLoginModule.initialize(LdapLoginModule.java:562)
        at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at javax.security.auth.login.LoginContext.invoke(LoginContext.java:756)
        at
javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
        at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
        at java.security.AccessController.doPrivileged(Native Method)
        at
javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
        at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
        at
org.mortbay.jetty.plus.jaas.JAASUserRealm.authenticate(JAASUserRealm.java:231)
        at
org.mortbay.jetty.security.BasicAuthenticator.authenticate(BasicAuthenticator.java:62)
        at org.mortbay.jetty.Request.getUserPrincipal(Request.java:1270)
        at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:224)
        at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
        at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
        at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
        at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:326)
        at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
        at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:938)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
        at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
        at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: javax.naming.CommunicationException: ldap.mine.com:389 [Root
exception is java.net.SocketException: Too many open files]
        at com.sun.jndi.ldap.Connection.<init>(Connection.java:207)
        at com.sun.jndi.ldap.LdapClient.<init>(LdapClient.java:118)
        at com.sun.jndi.ldap.LdapClient.getInstance(LdapClient.java:1580)
        at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2616)
        at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:287)
        at
com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
        at
com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193)
        at
com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136)
        at
com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:66)
        at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
        at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
        at javax.naming.InitialContext.init(InitialContext.java:223)
        at javax.naming.InitialContext.<init>(InitialContext.java:197)
        at
javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:82)
        at
org.mortbay.jetty.plus.jaas.ldap.LdapLoginModule.initialize(LdapLoginModule.java:558)
        ... 25 more
Caused by: java.net.SocketException: Too many open files
        at java.net.Socket.createImpl(Socket.java:388)
        at java.net.Socket.<init>(Socket.java:362)
        at java.net.Socket.<init>(Socket.java:180)
        at com.sun.jndi.ldap.Connection.createSocket(Connection.java:349)
        at com.sun.jndi.ldap.Connection.<init>(Connection.java:184)
        ... 39 more

Could you please advice ?

I get few suggestions on google :

1). Increase "noFile" value at \root of Unix server.
2). It might be because of many socket connections being opened up but not
being closed , how do I verify that ?

3). Some other version of jasper is required , not sure which one ?

Please advise 

Many Thanks in advance.

Regards
Sushil Singh

This e-mail (including any attachments) is confidential, may contain
proprietary or privileged information and is intended for the named
recipient(s) only. Unintended recipients are prohibited from taking
action on the basis of information in this e-mail and must delete all
copies. Nomura will not accept responsibility or liability for the
accuracy or completeness of, or the presence of any virus or disabling
code in, this e-mail. If verification is sought please request a hard
copy. Any reference to the terms of executed transactions should be
treated as preliminary only and subject to formal written confirmation
by Nomura. Nomura reserves the right to monitor e-mail communications
through its networks (in accordance with applicable laws). No
confidentiality or privilege is waived or lost by Nomura by any
mistransmission of this e-mail. Any reference to "Nomura" is a
reference to any entity in the Nomura Holdings, Inc. group.
Please read our Electronic Communications Legal Notice which forms
part of this e-mail: http://www.Nomura.com/email_disclaimer.htm


Back to the top