Skip to content

Ldap server connection is aborted and closed, while it should unbind and close after #bind or #search #289

@abhichvn

Description

@abhichvn

After doing #search, the same api close ldap server connection. But by looking at the server logs the connection is not getting closed properly, it is showing "closing from ip-address:51646 - A1 - Client aborted connection -". By looking at #close method which is used internally looks like it only closed socket connection and not sending any "unbind" request to ldap server.

Version of net-ldap gem: 0.12.0
LDAP server version: 2
Queries, connection information:
ldap = Net::LDAP.new
ldap.host =
ldap.port =
ldap.auth(user, password)
ldap.search(base: base_string)
Output:
[04/Apr/2017:12:55:46 -0400] conn=2063075 op=-1 msgId=-1 - fd=8023 slot=8023 LDAP connection from ip-address:51646 to ip-address
[04/Apr/2017:12:55:46 -0400] conn=2063075 op=0 msgId=1 - BIND dn="" method=128 version=3
[04/Apr/2017:12:55:46 -0400] conn=2063075 op=0 msgId=1 - RESULT err=0 tag=97 nentries=0 etime=0 dn=""
[04/Apr/2017:12:55:46 -0400] conn=2063075 op=1 msgId=0 - RESULT err=0 tag=120 nentries=0 etime=0
[04/Apr/2017:12:55:46 -0400] conn=2063075 op=-1 msgId=-1 - closing from ip-address:51646 - A1 - Client aborted connection -
[04/Apr/2017:12:55:46 -0400] conn=2063075 op=-1 msgId=-1 - closed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions