[ejabberd] mod_vcard_ldap crashes

Gerhard Schmidt schmidt at ze.tum.de
Wed Mar 25 15:58:14 MSK 2015


Am 10.03.2015 um 22:20 schrieb Markus "Shorty" Uckelmann:
> Hi all,
> 
> I'm trying to get mod_vcard_ldap running in 15.02 with a Win$ AD-Server.
> So far I am able to authenticate via LDAP. But adding the following
> vcard configuration gives me a "CRASH REPORT" and the server is running
> but dead:
> 
>   #mod_vcard: []
>   mod_vcard_ldap:
>       ldap_vcard_map:
>           "NICKNAME": {"%u", []}
>           "FN": {"%s", ["displayName"]}
>           "EMAIL": {"%s", ["mail"]}
>       ldap_search_fields:
>           "User": "%u"
>           "Name": "givenName"
>           "Email": "mail"
>       ldap_search_reported:
>           "Full Name": "FN"
>           "Nickname": "NICKNAME"
>           "Email": "EMAIL"
> 
> 
> And the logged error is(from error.log):
> 
> 2015-03-10 22:10:46.175 [error] <0.331.0> CRASH REPORT Process <0.331.0>
> with 0 neighbours exited with reason: {undefined_macro,''} in
> application_master:init/4 line 133
> 
> 
> This is the part from crash.log:
> 
> 2015-03-10 22:10:46 =CRASH REPORT====
>   crasher:
>     initial call: application_master:init/4
>     pid: <0.331.0>
>     registered_name: []
>     exception exit:
> {{bad_return,{{ejabberd_app,start,[normal,[]]},{'EXIT',{undefined_macro,''}}}},[{application_master,init,4,[{file,"application_master.erl"},{line,133}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}
> 
>     ancestors: [<0.330.0>]
>     messages: []
>     links: [<0.330.0>,<0.332.0>,<0.302.0>]
>     dictionary: []
>     trap_exit: true
>     status: running
>     heap_size: 610
>     stack_size: 27
>     reductions: 129
>   neighbours:
> 
> 
> There is no crashdump file.
> 
> Uncommenting the above configration lines make ejabberd work again after
> a restart.
> 
> AFAIK I sticked to the documentation at [1]. Am I missing something? Any
> help would be much appreciated.
> 
> [1] http://docs.ejabberd.im/admin/guide

I'm having a similar problem here with 14.12 and 15.02.

2015-03-25 13:46:18 =CRASH REPORT====
  crasher:
    initial call: eldap:init/1
    pid: <0.892.0>
    registered_name: 'eldap_#Ref<0.0.0.19880>'
    exception exit:
{{{badmatch,{error,{asn1,{function_clause,[{'ELDAPv3',enc_SubstringFilter_substrings_components,[{'SubstringFilter_subs
trings',[{any,<<"estartu">>}]},[],0],[{file,"src/ELDAPv3.erl"},{line,1768}]},{'ELDAPv3',enc_SubstringFilter_substrings,2,[{file,"src/ELDAPv
3.erl"},{line,1765}]},{'ELDAPv3',enc_SubstringFilter,2,[{file,"src/ELDAPv3.erl"},{line,1753}]},{'ELDAPv3',enc_Filter,2,[{file,"src/ELDAPv3.
erl"},{line,1604}]},{'ELDAPv3',enc_Filter_and_components,3,[{file,"src/ELDAPv3.erl"},{line,1636}]},{'ELDAPv3',enc_Filter_and,2,[{file,"src/
ELDAPv3.erl"},{line,1629}]},{'ELDAPv3',enc_Filter,2,[{file,"src/ELDAPv3.erl"},{line,1596}]},{'ELDAPv3',enc_SearchRequest,2,[{file,"src/ELDA
Pv3.erl"},{line,1511}]}]}}}},[{eldap,send_command,3,[{file,"src/eldap.erl"},{line,831}]},{eldap,process_command,3,[{file,"src/eldap.erl"},{
line,813}]},{gen_fsm,handle_msg,7,[{file,"gen_fsm.erl"},{line,503}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]},[{ge
n_fsm,terminate,7,[{file,"gen_fsm.erl"},{line,611}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]}
    ancestors: ['ejabberd_mod_vcard_ldap_ze.tum.de',ejabberd_sup,<0.37.0>]
    messages: []
    links: [<0.889.0>,#Port<0.6243>]
    dictionary: []
    trap_exit: false
    status: running
    heap_size: 1598
    stack_size: 27
    reductions: 1290
  neighbours:
    neighbour:
[{pid,<0.889.0>},{registered_name,'ejabberd_mod_vcard_ldap_ze.tum.de'},{initial_call,{mod_vcard_ldap,init,['Argument__1']}},
{current_function,{gen_server,loop,6}},{ancestors,[ejabberd_sup,<0.37.0>]},{messages,[]},{links,[<0.299.0>,<0.892.0>]},{dictionary,[]},{tra
p_exit,false},{status,waiting},{heap_size,1598},{stack_size,9},{reductions,1139}]
2015-03-25 13:46:18 =SUPERVISOR REPORT====
     Supervisor: {local,ejabberd_sup}
     Context:    child_terminated
     Reason:
{{badmatch,{error,{asn1,{function_clause,[{'ELDAPv3',enc_SubstringFilter_substrings_components,[{'SubstringFilter_substrin
gs',[{any,<<"estartu">>}]},[],0],[{file,"src/ELDAPv3.erl"},{line,1768}]},{'ELDAPv3',enc_SubstringFilter_substrings,2,[{file,"src/ELDAPv3.er
l"},{line,1765}]},{'ELDAPv3',enc_SubstringFilter,2,[{file,"src/ELDAPv3.erl"},{line,1753}]},{'ELDAPv3',enc_Filter,2,[{file,"src/ELDAPv3.erl"
},{line,1604}]},{'ELDAPv3',enc_Filter_and_components,3,[{file,"src/ELDAPv3.erl"},{line,1636}]},{'ELDAPv3',enc_Filter_and,2,[{file,"src/ELDA
Pv3.erl"},{line,1629}]},{'ELDAPv3',enc_Filter,2,[{file,"src/ELDAPv3.erl"},{line,1596}]},{'ELDAPv3',enc_SearchRequest,2,[{file,"src/ELDAPv3.
erl"},{line,1511}]}]}}}},[{eldap,send_command,3,[{file,"src/eldap.erl"},{line,831}]},{eldap,process_command,3,[{file,"src/eldap.erl"},{line
,813}]},{gen_fsm,handle_msg,7,[{file,"gen_fsm.erl"},{line,503}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]}
     Offender:
[{pid,<0.889.0>},{name,'ejabberd_mod_vcard_ldap_ze.tum.de'},{mfargs,{mod_vcard_ldap,start_link,[<<"ze.tum.de">>,[{search,t
rue},{ldap_vcard_map,[{<<"NICKNAME">>,[{<<"%u">>,[]}]},{<<"FN">>,[{<<"%s">>,[<<"gecos">>]}]},{<<"EMAIL">>,[{<<"%u@%d">>,[]}]}]},{ldap_searc
h_fields,[{<<"Full
Name">>,<<"gecos">>},{<<"Nickname">>,<<"%u">>}]},{ldap_search_reported,[{<<"Full
Name">>,<<"FN">>},{<<"Nickname">>,<<"NI
CKNAME">>}]}]]}},{restart_type,transient},{shutdown,1000},{child_type,worker}]

The config is
    ldap_vcard_map:
      "NICKNAME":
        "%u": []
      "FN":
        "%s":
          - "gecos"
      "EMAIL":
        "%u@%d": []
    ldap_search_fields:
      "Full Name": "gecos"
      "Nickname": "%u"
    ldap_search_reported:
      "Full Name": "FN"
      "Nickname": "NICKNAME"

Authentication agains ldap works just fine.

Regards
   Estartu

-- 
-------------------------------------------------
Gerhard Schmidt       | E-Mail: schmidt at ze.tum.de
TU-München	      | Jabber: estartu at ze.tum.de
WWW & Online Services |
Tel: 089/289-25270    |
Fax: 089/289-25257    | PGP-Publickey auf Anfrage

-------------- next part --------------
A non-text attachment was scrubbed...
Name: schmidt.vcf
Type: text/x-vcard
Size: 382 bytes
Desc: not available
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20150325/da208fd2/attachment.vcf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20150325/da208fd2/attachment.sig>


More information about the ejabberd mailing list