Return-Path: X-Original-To: apmail-directory-dev-archive@www.apache.org Delivered-To: apmail-directory-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 88D66EBC0 for ; Wed, 28 Nov 2012 03:49:07 +0000 (UTC) Received: (qmail 22178 invoked by uid 500); 28 Nov 2012 03:49:07 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 21874 invoked by uid 500); 28 Nov 2012 03:49:03 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 21210 invoked by uid 99); 28 Nov 2012 03:48:59 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Nov 2012 03:48:59 +0000 Date: Wed, 28 Nov 2012 03:48:59 +0000 (UTC) From: "Hendy Irawan (JIRA)" To: dev@directory.apache.org Message-ID: <2142430730.31076.1354074539913.JavaMail.jiratomcat@arcas> Subject: [jira] [Created] (DIRAPI-97) Unreliable LdapConnectionPool: org.apache.directory.ldap.client.api.exception.InvalidConnectionException: Cannot connect on the server, the connection is invalid MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Hendy Irawan created DIRAPI-97: ---------------------------------- Summary: Unreliable LdapConnectionPool: org.apache.directory.ldap.client.api.exception.InvalidConnectionException: Cannot connect on the server, the connection is invalid Key: DIRAPI-97 URL: https://issues.apache.org/jira/browse/DIRAPI-97 Project: Directory Client API Issue Type: Bug Affects Versions: 1.0.0-M13 Environment: Karaf Karaf version 2.3.0 Karaf home /home/karaf/karaf Karaf base /home/karaf/karaf OSGi Framework org.apache.felix.framework - 4.0.3 JVM Java Virtual Machine Java HotSpot(TM) Server VM version 23.5-b02 Version 1.7.0_09 Vendor Oracle Corporation Uptime 4 days 7 hours Total compile time 54.019 seconds Threads Live threads 119 Daemon threads 92 Peak 149 Total started 3151 Memory Current heap size 63,365 kbytes Maximum heap size 506,816 kbytes Committed heap size 126,912 kbytes Pending objects 0 Garbage collector Name = 'Copy', Collections = 970, Time = 6.659 seconds Garbage collector Name = 'MarkSweepCompact', Collections = 111, Time = 31.891 seconds Classes Current classes loaded 13,396 Total classes loaded 15,142 Total classes unloaded 1,746 Operating system Name Linux version 3.6.5-linode47 Architecture i386 Processors 4 Reporter: Hendy Irawan Priority: Critical We use LdapConnectionPool exclusively in order to increase performance without sacrificing stability. However, it seems that it's possible to break this and will cause : {code} Caused by: org.apache.directory.shared.ldap.model.exception.LdapException: org.apache.directory.ldap.client.api .exception.InvalidConnectionException: Cannot connect on the server, the connection is invalid at org.apache.directory.ldap.client.api.LdapNetworkConnection.lookup(LdapNetworkConnection.java:3169) at org.apache.directory.ldap.client.api.LdapNetworkConnection.lookup(LdapNetworkConnection.java:3181) at org.apache.directory.ldap.client.api.LdapNetworkConnection.lookup(LdapNetworkConnection.java:3116) at id.co.bippo.shop.LdapShopDao$1.apply(LdapShopDao.java:88) ... 78 more Caused by: org.apache.directory.ldap.client.api.exception.InvalidConnectionException: Cannot connect on the ser ver, the connection is invalid at org.apache.directory.ldap.client.api.LdapNetworkConnection.checkSession(LdapNetworkConnection.java:2 72) at org.apache.directory.ldap.client.api.LdapNetworkConnection.searchAsync(LdapNetworkConnection.java:15 48) at org.apache.directory.ldap.client.api.LdapNetworkConnection.search(LdapNetworkConnection.java:1586) at org.apache.directory.ldap.client.api.LdapNetworkConnection.lookup(LdapNetworkConnection.java:3151) ... 81 more {code} When it gets to this state, repeated calls to borrowObject/returnObject seem to return the same invalid connection(s). I can think of several reason why the connection was invalidated: LDAP connection breaks, LDAP server was restarted, but can be anything, really. However, I expect the pool would handle this, and purge invalid connections automatically. So that when ldapPool.borrowObject(); is called, the LdapConnection given should be valid & ready to use. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira