[ejabberd] Strange problem with auth_method ldap in new 0.9 release

Oleg Kivel olegk at dp.ru
Wed Apr 27 17:56:04 MSD 2005


Hello, All!

I've installed new 0.9 ejabberd release (RHEL 4 and otp erlang
R10B-1a) and try use {auth_method, ldap}

My ejabberd.cfg:

{auth_method, ldap}.
{ldap_servers, ["172.16.1.253"]}.
{ldap_uidattr, "uid"}.
{ldap_base, "O=BBP"}.


But I got in log immediatelly after start:


=ERROR REPORT==== 27-Apr-2005::17:23:07 ===
** State machine eldap_ejabberd terminating 
** Last event in was timeout
** When State == connecting
**      Data  == {eldap,3,
                        ["172.16.1.253"],
                        null,
                        389,
                        null,
                        undefined,
                        undefined,
                        0,
                        #Fun<eldap.0.107797513>,
                        undefined,
                        {dict,0,
                              16,
                              16,
                              8,
                              80,
                              48,
                              {[],
                               [],
                               [],
                               [],
                               [],
                               [],
                               [],
                               [],
                               [],
                               [],
                               [],
                               [],
                               [],
                               [],
                               [],
                               []},
                              {{[],
                                [],
                                [],
                                [],
                                [],
                                [],
                                [],
                                [],
                                [],
                                [],
                                [],
                                [],
                                [],
                                [],
                                [],
                                []}}},
                        0}
** Reason for termination = 
** {{badmatch,{error,{asn1,{function_clause,
                               [{asn1rt_ber_bin,
                                    encode_octet_string,
                                    [[],undefined,[]]},
                                {'ELDAPv3',enc_BindRequest,2},
                                {'ELDAPv3',enc_LDAPMessage_protocolOp,2},
                                {'ELDAPv3',enc_LDAPMessage,2},
                                {'ELDAPv3',encode,2},
                                {asn1rt,encode,3},
                                {eldap,bind_request,2},
                                {eldap,connect_bind,1},
                                {eldap,connecting,2},
                                {gen_fsm,handle_msg,7}]}}}},
    [{eldap,bind_request,2},
     {eldap,connect_bind,1},
     {eldap,connecting,2},
     {gen_fsm,handle_msg,7},
     {proc_lib,init_p,5}]}

=ERROR REPORT==== 27-Apr-2005::17:23:07 ===
** State machine eldap_ejabberd_bind terminating 
** Last event in was timeout
** When State == connecting
**      Data  == {eldap,3,
                        ["172.16.1.253"],
                        null,
                        389,
                        null,
                        undefined,
                        undefined,
                        0,
                        #Fun<eldap.0.107797513>,
                        undefined,
                        {dict,0,
                              16,
                              16,
                              8,
                              80,
                              48,
                              {[],
                               [],
                               [],
                               [],
                               [],
                               [],
                               [],
                               [],
                               [],
                               [],
                               [],
                               [],
                               [],
                               [],
                               [],
                               []},
                              {{[],
                                [],
                                [],
                                [],
                                [],
                                [],
                                [],
                                [],
                                [],
                                [],
                                [],
                                [],
                                [],
                                [],
                                [],
                                []}}},
                        0}
** Reason for termination = 
** {{badmatch,{error,{asn1,{function_clause,
                               [{asn1rt_ber_bin,
                                    encode_octet_string,
                                    [[],undefined,[]]},
                                {'ELDAPv3',enc_BindRequest,2},
                                {'ELDAPv3',enc_LDAPMessage_protocolOp,2},
                                {'ELDAPv3',enc_LDAPMessage,2},
                                {'ELDAPv3',encode,2},
                                {asn1rt,encode,3},
                                {eldap,bind_request,2},
                                {eldap,connect_bind,1},
                                {eldap,connecting,2},
                                {gen_fsm,handle_msg,7}]}}}},
    [{eldap,bind_request,2},
     {eldap,connect_bind,1},
     {eldap,connecting,2},
     {gen_fsm,handle_msg,7},
     {proc_lib,init_p,5}]}



The tcpdump output in this time is:

17:23:07.327806 172.16.0.9.33060 > 172.16.1.253.389: S 2922937192:2922937192(0) win 5840 <mss 1460,sackOK,timestamp 440605787 0,nop,wscale 2> (DF)
17:23:07.327857 172.16.1.253.389 > 172.16.0.9.33060: S 2844794831:2844794831(0) ack 2922937193 win 5792 <mss 1460,sackOK,timestamp 131059812 440605787,nop,wscale 0> (DF)
17:23:07.328072 172.16.0.9.33060 > 172.16.1.253.389: . ack 1 win 1460 <nop,nop,timestamp 440605788 131059812> (DF)
17:23:07.328169 172.16.0.9.33061 > 172.16.1.253.389: S 2936350167:2936350167(0) win 5840 <mss 1460,sackOK,timestamp 440605788 0,nop,wscale 2> (DF)
17:23:07.328181 172.16.1.253.389 > 172.16.0.9.33061: S 2851102187:2851102187(0) ack 2936350168 win 5792 <mss 1460,sackOK,timestamp 131059812 440605788,nop,wscale 0> (DF)
17:23:07.328365 172.16.0.9.33061 > 172.16.1.253.389: . ack 1 win 1460 <nop,nop,timestamp 440605788 131059812> (DF)
17:23:07.377209 172.16.0.9.33060 > 172.16.1.253.389: F 1:1(0) ack 1 win 1460 <nop,nop,timestamp 440605837 131059812> (DF)
17:23:07.377529 172.16.0.9.33061 > 172.16.1.253.389: F 1:1(0) ack 1 win 1460 <nop,nop,timestamp 440605837 131059812> (DF)
17:23:07.377623 172.16.1.253.389 > 172.16.0.9.33060: F 1:1(0) ack 2 win 5792 <nop,nop,timestamp 131059817 440605837> (DF)
17:23:07.377713 172.16.1.253.389 > 172.16.0.9.33061: F 1:1(0) ack 2 win 5792 <nop,nop,timestamp 131059817 440605837> (DF)
17:23:07.377833 172.16.0.9.33060 > 172.16.1.253.389: . ack 2 win 1460 <nop,nop,timestamp 440605838 131059817> (DF)
17:23:07.377876 172.16.0.9.33061 > 172.16.1.253.389: . ack 2 win 1460 <nop,nop,timestamp 440605838 131059817> (DF)


But I can easily run at the same time from shell:
ldapsearch -h 172.16.1.253 -D "CN=xxxxx" -W -x -b "O=BBP" "uid=xxxx"

The problem is the same in the last svn rev 332.

The same ejabberd config worked in 0.7.5 release.

How can I fix it?

Thanks.
Kivel Oleg



More information about the ejabberd mailing list