History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-2058
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Siim Käba
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
QuickBuild

Timeout for LDAP read and connect

Created: 20/May/14 01:00 PM   Updated: 28/May/14 10:46 AM
Component/s: None
Affects Version/s: 5.1.12
Fix Version/s: 5.1.26, 5.1.27

Original Estimate: 1 day Remaining Estimate: 1 day Time Spent: Unknown
Environment: Oracle jdk 7


 Description  « Hide
We had an incident with LDAP and it hanged during sending out notifications to users. It would be good to have decent timeouts set for those connections.

http://docs.oracle.com/javase/7/docs/technotes/guides/jndi/jndi-ldap.html:
com.sun.jndi.ldap.read.timeout and com.sun.jndi.ldap.connect.timeout
I suspect that it's not possible to set them via system properties.

jstack slice:
"pool-1-thread-500757" prio=10 tid=0x00007fae7cf13800 nid=0xe334 runnable [0x00007fae91222000]
   java.lang.Thread.State: RUNNABLE
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.read(SocketInputStream.java:150)
        at java.net.SocketInputStream.read(SocketInputStream.java:121)
        at sun.security.ssl.InputRecord.readFully(InputRecord.java:442)
        at sun.security.ssl.InputRecord.read(InputRecord.java:480)
        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:927)
        - locked <0x00000004cf48ff20> (a java.lang.Object)
        at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1312)
        - locked <0x00000004cf48ff38> (a java.lang.Object)
        at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:702)
        at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:122)
        - locked <0x00000004cf48ff50> (a sun.security.ssl.AppOutputStream)
        at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
        at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
        - locked <0x00000004cf48ff68> (a java.io.BufferedOutputStream)
        at com.sun.jndi.ldap.Connection.writeRequest(Connection.java:429)
        - locked <0x00000004cebefba8> (a com.sun.jndi.ldap.Connection)
        at com.sun.jndi.ldap.Connection.writeRequest(Connection.java:402)
        at com.sun.jndi.ldap.LdapClient.ldapBind(LdapClient.java:352)
        - locked <0x00000004d058c980> (a com.sun.jndi.ldap.LdapClient)
        at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:210)
        - locked <0x00000004d058c980> (a com.sun.jndi.ldap.LdapClient)
        at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2740)
        at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:316)
        at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:193)
        at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:211)
        at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:154)
        at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:84)
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307)
        at javax.naming.InitialContext.init(InitialContext.java:242)
        at javax.naming.InitialContext.<init>(InitialContext.java:216)
        at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:101)
        at com.pmease.quickbuild.plugin.authenticator.ldap.LdapAuthenticator.getEmail(LdapAuthenticator.java:462)
        at com.pmease.quickbuild.plugin.authenticator.ldap.LdapAuthenticator$$EnhancerByCGLIB$$9ba8a4c2.CGLIB$getEmail$2(<generated>)
        at com.pmease.quickbuild.plugin.authenticator.ldap.LdapAuthenticator$$EnhancerByCGLIB$$9ba8a4c2$$FastClassByCGLIB$$b19a6824.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215)
        at com.pmease.quickbuild.DefaultScriptEngine$Interpolator.intercept(DefaultScriptEngine.java:270)
        at com.pmease.quickbuild.plugin.authenticator.ldap.LdapAuthenticator$$EnhancerByCGLIB$$9ba8a4c2.getEmail(<generated>)
        at com.pmease.quickbuild.DefaultBuildEngine.getUser(DefaultBuildEngine.java:713)
        at com.pmease.quickbuild.DefaultBuildEngine.sendNotifications(DefaultBuildEngine.java:756)
        at com.pmease.quickbuild.DefaultBuildEngine.process(DefaultBuildEngine.java:409)
        at com.pmease.quickbuild.DefaultBuildEngine.access$000(DefaultBuildEngine.java:129)
        at com.pmease.quickbuild.DefaultBuildEngine$2.run(DefaultBuildEngine.java:1051)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:724)

 All   Comments   Work Log   Change History      Sort Order:
No work has yet been logged on this issue.