[ejabberd] Ejabberd & LDAP still crashing ...

Martin Galoneas galoneas at mail.com
Fri Jul 23 19:18:48 MSD 2004


Hi,
I did patch eldap.erl as you just said :

> 
>  MG> {{case_clause,{ok,[{#Ref<0.0.0.1673>,
>  MG> {<0.303.0>,#Ref<0.0.0.1672>}, searchRequest}]}},
> 
> This error should can fixed by patch bellow, but anyway you get
> timeout on search request...  Please, can you replace "debug_level =
> 0" with "debug_level = 2" in eldap.erl, recompile and try again to
> reproduce this bug?
> 
> --- src/eldap/eldap.erl	23 Nov 2003 20:11:14 -0000	1.1
> +++ src/eldap/eldap.erl	23 Jul 2004 14:13:55 -0000
> @@ -765,7 +765,7 @@
>  cmd_timeout(Timer, Id, S) ->
>      Dict = S#eldap.dict,
>      case dict:find(Id, Dict) of
> -	{ok, [{Id, Timer, From, Name}|Res]} ->
> +	{ok, [{Timer, From, Name}|Res]} ->
>  	    case Name of
>  		searchRequest ->
>  		    {Res1, Ref1} = polish(Res),
> 

but I still get a server 'crash' ... 

In my ejabberd.cfg file, I configure ldap like this :

%{auth_method, internal
% For LDAP uthentification use these lines instead of above one:
{auth_method, ldap}.
{ldap_servers, ["localhost"]}.    % List of LDAP servers
{ldap_uidattr, "uid"}.            % LDAP attribute that holds user ID
{ldap_base, "dc=jabber,dc=galoneas,dc=com"}. % Base of LDAP directory

In order to give you the maximum of information, I copy the output in Erlang (instead of a copy of the ejabberd.log file)

thx for your help and work
Martin

------

=INFO REPORT==== 23-Jul-2004::16:58:25 ===
I(<0.238.0>:ejabberd_listener:89): (#Port<0.422>) Accepted connection {{127,0,0,1},33839} -> {{127,0,0,1},5222}

=INFO REPORT==== 23-Jul-2004::16:58:25 ===
I(<0.238.0>:ejabberd_listener:89): (#Port<0.424>) Accepted connection {{127,0,0,1},33840} -> {{127,0,0,1},5222}

=INFO REPORT==== 23-Jul-2004::16:58:25 ===
I(<0.238.0>:ejabberd_listener:89): (#Port<0.426>) Accepted connection {{127,0,0,1},33841} -> {{127,0,0,1},5222}
AUTH: {"ttest2","test2",[],"Psi"}
---- [{searchRequest,{'SearchRequest',"dc=jabber,dc=galoneas,dc=com",
                                      wholeSubtree,
                                      neverDerefAliases,
                                      0,
                                      0,
                                      false,
                                      {equalityMatch,
                                          {'AttributeValueAssertion',
                                              "uid",
                                              "ttest2"}},
                                      []}}]
---- [{searchResEntry,{'SearchResultEntry',
                          "uid=ttest2,dc=jabber,dc=galoneas,dc=com",
                          [{'PartialAttributeList_SEQOF',"uid",["ttest2"]},
                           {'PartialAttributeList_SEQOF',
                               "loginShell",
                               ["/bin/bash"]},
                           {'PartialAttributeList_SEQOF',
                               "uidNumber",
                               ["00000002"]},
                           {'PartialAttributeList_SEQOF',
                               "gidNumber",
                               ["00000002"]},
                           {'PartialAttributeList_SEQOF',
                               "homeDirectory",
                               ["/home/ttest2"]},
                           {'PartialAttributeList_SEQOF',"shadowMin",["-1"]},
                           {'PartialAttributeList_SEQOF',
                               "shadowMax",
                               ["999999"]},
                           {'PartialAttributeList_SEQOF',
                               "shadowWarning",
                               ["7"]},
                           {'PartialAttributeList_SEQOF',
                               "shadowInactive",
                               ["-1"]},
                           {'PartialAttributeList_SEQOF',
                               "shadowExpire",
                               ["-1"]},
                           {'PartialAttributeList_SEQOF',"shadowFlag",["0"]},
                           {'PartialAttributeList_SEQOF',
                               "objectClass",
                               ["top","person","posixAccount","shadowAccount"]},
                           {'PartialAttributeList_SEQOF',"cn",["ttest2"]},
                           {'PartialAttributeList_SEQOF',"sn",["ttest2"]},
                           {'PartialAttributeList_SEQOF',
                               "userPassword",
                               ["{MD5}rQI0gpIFuQMxlrqBj3qHKw=="]}]}}]
AUTH: {"ttest","test",[],"Psi"}
---- [{searchRequest,{'SearchRequest',"dc=jabber,dc=galoneas,dc=com",
                                      wholeSubtree,
                                      neverDerefAliases,
                                      0,
                                      0,
                                      false,
                                      {equalityMatch,
                                          {'AttributeValueAssertion',
                                              "uid",
                                              "ttest"}},
                                      []}}]
---- [{searchResDone,{'LDAPResult',success,[],[],asn1_NOVALUE}}]
---- [{searchResEntry,{'SearchResultEntry',
                          "uid=ttest,dc=jabber,dc=galoneas,dc=com",
                          [{'PartialAttributeList_SEQOF',"uid",["ttest"]},
                           {'PartialAttributeList_SEQOF',"sn",["Test"]},
                           {'PartialAttributeList_SEQOF',
                               "loginShell",
                               ["/bin/bash"]},
                           {'PartialAttributeList_SEQOF',
                               "uidNumber",
                               ["00000001"]},
                           {'PartialAttributeList_SEQOF',
                               "gidNumber",
                               ["00000001"]},
                           {'PartialAttributeList_SEQOF',
                               "homeDirectory",
                               ["/home/ttest"]},
                           {'PartialAttributeList_SEQOF',"shadowMin",["-1"]},
                           {'PartialAttributeList_SEQOF',
                               "shadowMax",
                               ["999999"]},
                           {'PartialAttributeList_SEQOF',
                               "shadowWarning",
                               ["7"]},
                           {'PartialAttributeList_SEQOF',
                               "shadowInactive",
                               ["-1"]},
                           {'PartialAttributeList_SEQOF',
                               "shadowExpire",
                               ["-1"]},
                           {'PartialAttributeList_SEQOF',"shadowFlag",["0"]},
                           {'PartialAttributeList_SEQOF',
                               "objectClass",
                               ["top","person","posixAccount","shadowAccount"]},
                           {'PartialAttributeList_SEQOF',"cn",["ttest"]}]}}]
---- [{bindRequest,{'BindRequest',3,
                                  "uid=ttest2,dc=jabber,dc=galoneas,dc=com",
                                  {simple,"test2"}}}]
---- [{bindResponse,{'BindResponse',success,[],[],asn1_NOVALUE,asn1_NOVALUE}}]

=INFO REPORT==== 23-Jul-2004::16:58:26 ===
I(<0.340.0>:ejabberd_c2s:256): (#Port<0.424>) Accepted legacy authentification for ttest2 at localhost/Psi
AUTH: {"ttest3","test3",[],"Psi"}
---- [{searchRequest,{'SearchRequest',"dc=jabber,dc=galoneas,dc=com",
                                      wholeSubtree,
                                      neverDerefAliases,
                                      0,
                                      0,
                                      false,
                                      {equalityMatch,
                                          {'AttributeValueAssertion',
                                              "uid",
                                              "ttest3"}},
                                      []}}]
---- [{searchResEntry,{'SearchResultEntry',
                          "uid=ttest3,dc=jabber,dc=galoneas,dc=com",
                          [{'PartialAttributeList_SEQOF',"uid",["ttest3"]},
                           {'PartialAttributeList_SEQOF',"cn",["Test3"]},
                           {'PartialAttributeList_SEQOF',"sn",["Test3"]},
                           {'PartialAttributeList_SEQOF',
                               "loginShell",
                               ["/bin/bash"]},
                           {'PartialAttributeList_SEQOF',
                               "uidNumber",
                               ["00000003"]},
                           {'PartialAttributeList_SEQOF',
                               "gidNumber",
                               ["00000003"]},
                           {'PartialAttributeList_SEQOF',
                               "homeDirectory",
                               ["/home/ttest3"]},
                           {'PartialAttributeList_SEQOF',"shadowMin",["-1"]},
                           {'PartialAttributeList_SEQOF',
                               "shadowMax",
                               ["999999"]},
                           {'PartialAttributeList_SEQOF',
                               "shadowWarning",
                               ["7"]},
                           {'PartialAttributeList_SEQOF',
                               "shadowInactive",
                               ["-1"]},
                           {'PartialAttributeList_SEQOF',
                               "shadowExpire",
                               ["-1"]},
                           {'PartialAttributeList_SEQOF',"shadowFlag",["0"]},
                           {'PartialAttributeList_SEQOF',
                               "objectClass",
                               ["top","person","posixAccount","shadowAccount"]}]}}]
---- [{searchResDone,{'LDAPResult',success,[],[],asn1_NOVALUE}}]
---- [{bindRequest,{'BindRequest',3,
                                  "uid=ttest3,dc=jabber,dc=galoneas,dc=com",
                                  {simple,"test3"}}}]
---- [{bindResponse,{'BindResponse',success,[],[],asn1_NOVALUE,asn1_NOVALUE}}]

=INFO REPORT==== 23-Jul-2004::16:58:26 ===
I(<0.343.0>:ejabberd_c2s:256): (#Port<0.426>) Accepted legacy authentification for ttest3 at localhost/Psi

=ERROR REPORT==== 23-Jul-2004::16:58:31 ===
** State machine <0.337.0> terminating
** Last event in was {xmlstreamelement,
                         {xmlelement,"iq",
                                     [{"type","set"},
                                      {"id","auth_2"},
                                      {"to","localhost"}],
                                     [{xmlcdata,"\n"},
                                      {xmlelement,
                                          "query",
                                          [{"xmlns","jabber:iq:auth"}],
                                          [{xmlcdata,"\n"},
                                           {xmlelement,
                                               "username",
                                               [],
                                               [{xmlcdata,"ttest"}]},
                                           {xmlcdata,"\n"},
                                           {xmlelement,
                                               "password",
                                               [],
                                               [{xmlcdata,"test"}]},
                                           {xmlcdata,"\n"},
                                           {xmlelement,
                                               "resource",
                                               [],
                                               [{xmlcdata,"Psi"}]},
                                           {xmlcdata,"\n"}]},
                                      {xmlcdata,"\n"}]}}
** When State == wait_for_auth
**      Data  == {state,#Port<0.422>,
                        <0.338.0>,
                        gen_tcp,
                        "3996834465",
                        undefined,
                        c2s,
                        c2s_shaper,
                        false,
                        undefined,
                        [],
                        "localhost",
                        [],
                        {0,nil},
                        {0,nil},
                        {0,nil},
                        {0,nil},
                        undefined,
                        undefined,
                        undefined,
                        false,
                        none,
                        []}
** Reason for termination =
** {timeout,{gen_fsm,sync_send_event,
                     [eldap_ejabberd,
                      {search,{eldap_search,
                                  wholeSubtree,
                                  "dc=jabber,dc=galoneas,dc=com",
                                  {equalityMatch,
                                      {'AttributeValueAssertion',
                                          "uid",
                                          "ttest"}},
                                  [],
                                  false,
                                  0}}]}}

=CRASH REPORT==== 23-Jul-2004::16:58:31 ===
  crasher:
    pid: <0.337.0>
    registered_name: []
    error_info: {timeout,{gen_fsm,sync_send_event,
                                   [eldap_ejabberd,
                                    {search,
                                        {eldap_search,
                                            wholeSubtree,
                                            "dc=jabber,dc=galoneas,dc=com",
                                            {equalityMatch,
                                                {'AttributeValueAssertion',
                                                    "uid",
                                                    "ttest"}},
                                            [],
                                            false,
                                            0}}]}}
    initial_call: {gen,init_it,
                      [gen_fsm,
                       <0.229.0>,
                       <0.229.0>,
                       ejabberd_c2s,
                       [{gen_tcp,#Port<0.422>},
                        [{access,c2s},{shaper,c2s_shaper}]],
                       []]}
    ancestors: [ejabberd_c2s_sup,ejabberd_sup,<0.40.0>]
    messages: [{#Ref<0.0.0.2004>,
                   {timeout,{eldap_search_result,
                                [{eldap_entry,
                                     "uid=ttest,dc=jabber,dc=galoneas,dc=com",
                                     [{"uid",["ttest"]},
                                      {"sn",["Test"]},
                                      {"loginShell",["/bin/bash"]},
                                      {"uidNumber",["00000001"]},
                                      {"gidNumber",["00000001"]},
                                      {"homeDirectory",["/home/ttest"]},
                                      {"shadowMin",["-1"]},
                                      {"shadowMax",["999999"]},
                                      {"shadowWarning",["7"]},
                                      {"shadowInactive",["-1"]},
                                      {"shadowExpire",["-1"]},
                                      {"shadowFlag",["0"]},
                                      {"objectClass",
                                       ["top",
                                        "person",
                                        "posixAccount",
                                        "shadowAccount"]},
                                      {"cn",["ttest"]}]}],
                                []}}}]
    links: [<0.229.0>]
    dictionary: []
    trap_exit: false
    status: running
    heap_size: 2584
    stack_size: 21
    reductions: 1072
  neighbours:

=SUPERVISOR REPORT==== 23-Jul-2004::16:58:31 ===
     Supervisor: {local,ejabberd_c2s_sup}
     Context:    child_terminated
     Reason:     {timeout,{gen_fsm,sync_send_event,
                                   [eldap_ejabberd,
                                    {search,
                                        {eldap_search,
                                            wholeSubtree,
                                            "dc=jabber,dc=galoneas,dc=com",
                                            {equalityMatch,
                                                {'AttributeValueAssertion',
                                                    "uid",
                                                    "ttest"}},
                                            [],
                                            false,
                                            0}}]}}
     Offender:   [{pid,<0.337.0>},
                  {name,undefined},
                  {mfa,{ejabberd_c2s,start_link,
                                     [{gen_tcp,#Port<0.422>},
                                      [{access,c2s},{shaper,c2s_shaper}]]}},
                  {restart_type,temporary},
                  {shutdown,brutal_kill},
                  {child_type,worker}]


-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm



More information about the ejabberd mailing list