WebSphere authentication problem -- too may open files

2.1k views Asked by At

Scenario- when a user tries to login through the portal the call will be made to services to authenticate the user through LDAP. where we get too may openfile frequently even after increasing the ulimit values.

[5/12/20 3:52:18:258 EDT] 00000175 LdapConnectio I com.ibm.ws.wim.adapter.ldap.LdapConnection DirContext reCreateDirContext(String errorMessage) CWWIM456
4I  The user registry is now connected to 'ldaps://<ldap server:port>' LDAP Server.
[5/12/20 3:52:18:262 EDT] 00000175 exception     E com.ibm.ws.wim.adapter.ldap.LdapConnection DirContext reCreateDirContext(String errorMessage) CWWIM452
0E  The 'javax.naming.CommunicationException: <ldap server:port> [Root exception is java.net.SocketException: Too many open files]' naming exc
eption occurred during processing.
[5/12/20 3:52:18:262 EDT] 00000175 exception     **E com.ibm.ws.wim.adapter.ldap.LdapConnection DirContext reCreateDirContext(String errorMessage)
                                 com.ibm.websphere.wim.exception.WIMSystemException: CWWIM4520E  The 'javax.naming.CommunicationException: <ldap server:port>  [Root exception is java.net.SocketException: Too many open files]' naming exception occurred during processing.**
        at com.ibm.ws.wim.adapter.ldap.LdapConnection.reCreateDirContext(LdapConnection.java:931)
        at com.ibm.ws.wim.adapter.ldap.LdapConnection.search(LdapConnection.java:3211)
        at com.ibm.ws.wim.adapter.ldap.LdapConnection.checkSearchCache(LdapConnection.java:3091)
        at com.ibm.ws.wim.adapter.ldap.LdapConnection.search(LdapConnection.java:3281)
        at com.ibm.ws.wim.adapter.ldap.LdapConnection.searchEntities(LdapConnection.java:3502)
        at com.ibm.ws.wim.adapter.ldap.LdapAdapter.search(LdapAdapter.java:3436)
        at com.ibm.ws.wim.ProfileManager.searchRepository(ProfileManager.java:5297)
        at com.ibm.ws.wim.ProfileManager.searchImpl(ProfileManager.java:1211)
        at com.ibm.ws.wim.ProfileManager.genericProfileManagerMethod(ProfileManager.java:356)
        at com.ibm.ws.wim.ProfileManager.search(ProfileManager.java:448)
        at com.ibm.websphere.wim.ServiceProvider.search(ServiceProvider.java:545)
        at com.ibm.ws.wim.registry.util.UniqueIdBridge.getUniqueUserId(UniqueIdBridge.java:245)
        at com.ibm.ws.wim.registry.WIMUserRegistry$6.run(WIMUserRegistry.java:729)
        at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5477)
        at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5603)
        at com.ibm.ws.wim.security.authz.jacc.JACCSecurityManager.runAsSuperUser(JACCSecurityManager.java:438)
        at com.ibm.ws.wim.env.was.JACCAuthorizationService.runAsSuperUser(JACCAuthorizationService.java:1086)
        at com.ibm.ws.wim.security.authz.ProfileSecurityManager.runAsSuperUser(ProfileSecurityManager.java:285)
        at com.ibm.ws.wim.registry.WIMUserRegistry.getUniqueUserId(WIMUserRegistry.java:714)
        at com.ibm.ws.security.registry.UserRegistryImpl.createCredentialInternal(UserRegistryImpl.java:922)
        at com.ibm.ws.security.registry.UserRegistryImpl.createCredential(UserRegistryImpl.java:833)
        at com.ibm.ws.security.ltpa.LTPAServerObject.validate(LTPAServerObject.java:1615)
        at com.ibm.ws.security.server.lm.ltpaLoginModule.login(ltpaLoginModule.java:881)



ulimit -a

time(seconds)        unlimited

file(blocks)         unlimited

data(kbytes)         131072

stack(kbytes)        131072

memory(kbytes)       131072

coredump(blocks)     2097151

nofiles(descriptors) 65536

threads(per process) unlimited

processes(per user)  unlimited
2

There are 2 answers

0
J Van Hill On

Have you enabled the context pool for your LDAP registry? This will maintain a pool of contexts for use when making LDAP calls. It might reduce the number of file handles required.

You might also want to check what is consuming all your file handles. You can use 'lsof' to see a list of open files.

0
Stefan Schmitt On

I know from my past that there had been some issue with ulimit and WebSphere. I do only find this recommendation from WebSphere in general on setting ulimit The link is for a different issue, but there is a recommendation going with it enter link description here

WebSphere Application Server Support recommends setting the ulimit -u or nproc to a value of 131072 when running on Linux