Skip to content
This repository was archived by the owner on Nov 17, 2020. It is now read-only.
This repository was archived by the owner on Nov 17, 2020. It is now read-only.

Reconnect closed connection? #65

@ghost

Description

Using this configuration

  {rabbitmq_auth_backend_ldap,
   [{servers,                   ["dc.example.com"]},
    {dn_lookup_bind,            {"binduser@example.com", "xxxx"}},
    {dn_lookup_attribute,       "sAMAccountName"},
    {dn_lookup_base,            "OU=users,DC=example,DC=com"},
    {use_ssl,                   false},
    {port,                      389},
    {log,                       true},

works fine. But after some time of inactivity(?), the connection to the LDAP server is closed, the next authentication attempt produces this error:

=WARNING REPORT==== 20-Apr-2017::10:05:07 ===
TCP connection to a LDAP server is already closed.

=ERROR REPORT==== 20-Apr-2017::10:05:07 ===
** Generic server <0.214.0> terminating
** Last message in was {submit,#Fun<rabbit_auth_backend_ldap.14.122028335>,
                               <0.19832.0>,reuse}
** When Server state == {from,<0.19832.0>,#Ref<0.0.9.166114>}
** Reason for termination == 
** {{badmatch,{ok,<0.1345.0>}},
    [{rabbit_auth_backend_ldap,purge_conn,3,
                               [{file,"src/rabbit_auth_backend_ldap.erl"},
                                {line,521}]},
     {rabbit_auth_backend_ldap,'-with_ldap/3-fun-2-',4,
                               [{file,"src/rabbit_auth_backend_ldap.erl"},
                                {line,416}]},
     {worker_pool_worker,handle_call,3,
                         [{file,"src/worker_pool_worker.erl"},{line,105}]},
     {gen_server2,handle_msg,2,[{file,"src/gen_server2.erl"},{line,1024}]},
     {proc_lib,wake_up,3,[{file,"proc_lib.erl"},{line,249}]}]}

How can I configure the rabbit_auth_backend_ldap to keep the connection open or reconnect automatically?

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