directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DIRAPI-97) Unreliable LdapConnectionPool: org.apache.directory.ldap.client.api.exception.InvalidConnectionException: Cannot connect on the server, the connection is invalid
Date Thu, 29 Nov 2012 08:46:58 GMT

    [ https://issues.apache.org/jira/browse/DIRAPI-97?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13506327#comment-13506327
] 

Emmanuel Lecharny commented on DIRAPI-97:
-----------------------------------------

DIRAPI-96 Is just marked as fixed, but is not in M13. M13 was released one month ago, and
DIRAPI-96 has been fixed 2 weeks ago.

This is the reason I built a specific jar with the fix : it's a connection leak, leading to
some error when trying to use the pool.

I suggest you use it, and if you get the error in the next few days (or weeks), update this
JIRA.

We will probably conduct some load tests on our side to see if we can reproduce the issue
at the same time.

Thanks anyway for the report !
                
> 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

Mime
View raw message