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

Oleg Kivel olegk at dp.ru
Thu Apr 28 13:45:30 MSD 2005


Sorry for waste your time!

The problem have gone when I disable IPv6 in the system.


Thanks.
Kivel Oleg



ebjr> Hello, All!

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

ebjr> My ejabberd.cfg:

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


ebjr> But I got in log immediatelly after start:


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

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



ebjr> The tcpdump output in this time is:

ebjr> 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)
ebjr> 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)
ebjr> 17:23:07.328072 172.16.0.9.33060 > 172.16.1.253.389: . ack 1 win 1460 <nop,nop,timestamp 440605788 131059812> (DF)
ebjr> 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)
ebjr> 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)
ebjr> 17:23:07.328365 172.16.0.9.33061 > 172.16.1.253.389: . ack 1 win 1460 <nop,nop,timestamp 440605788 131059812> (DF)
ebjr> 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)
ebjr> 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)
ebjr> 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)
ebjr> 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)
ebjr> 17:23:07.377833 172.16.0.9.33060 > 172.16.1.253.389: . ack 2 win 1460 <nop,nop,timestamp 440605838 131059817> (DF)
ebjr> 17:23:07.377876 172.16.0.9.33061 > 172.16.1.253.389: . ack 2 win 1460 <nop,nop,timestamp 440605838 131059817> (DF)


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

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

ebjr> The same ejabberd config worked in 0.7.5 release.

ebjr> How can I fix it?

ebjr> Thanks.
ebjr> Kivel Oleg

ebjr> _______________________________________________
ebjr> ejabberd mailing list
ebjr> ejabberd at jabber.ru
ebjr> http://lists.jabber.ru/mailman/listinfo/ejabberd



More information about the ejabberd mailing list