ejabberd в джейле на freebsd. После обновления до 2.1.13, при попытке найти пользователя, в логе вот это:
=ERROR REPORT==== 2013-11-20 17:09:41 ===
E(<0.9386.0>:eldap_pool:83) : LDAP request failed: eldap:search([[{base,
"DC=adir,DC=com,DC=ua"},
{filter,
{'and',
[{'and',
[{present,
"sAMAccountName"},
{'and',
[{equalityMatch,
{'AttributeValueAssertion',
"ObjectClass",
"user"}},
{equalityMatch,
{'AttributeValueAssertion',
"objectCategory",
"person"}},
{substrings,
{'SubstringFilter',
"sAMAccountName",
{'SubstringFilter_substrings',
[{any,
"."}]}}},
{'not',
{extensibleMatch,
{'MatchingRuleAssertion',
"1.2.840.113556.1.4.803",
"userAccountControl",
"2",
asn1_DEFAULT}}}]}]},
{substrings,
{'SubstringFilter',
"description",
{'SubstringFilter_substrings',
[{any,
[209,
129,
209,
131,
208,
180]}]}}}]}},
{limit,120},
{deref_aliases,
never},
{attributes,
["cn",
"mail",
"name",
"sAMAccountName"]}]])
Reason: {{{badmatch,{error,{asn1,function_clause}}},
[{eldap,send_command,3,[{file,"eldap.erl"},{line,698}]},
{eldap,process_command,3,[{file,"eldap.erl"},{line,678}]},
{gen_fsm,handle_msg,7,[{file,"gen_fsm.erl"},{line,505}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]},
{gen_fsm,sync_send_event,
[<0.9378.0>,
{search,
{eldap_search,wholeSubtree,"DC=adir,DC=com,DC=ua",
{'and',
[{'and',
[{present,"sAMAccountName"},
{'and',
[{equalityMatch,
{'AttributeValueAssertion',"ObjectClass","user"}},
{equalityMatch,
{'AttributeValueAssertion',"objectCategory","person"}},
{substrings,
{'SubstringFilter',"sAMAccountName",
{'SubstringFilter_substrings',[{any,"."}]}}},
{'not',
{extensibleMatch,
{'MatchingRuleAssertion',"1.2.840.113556.1.4.803",
"userAccountControl","2",asn1_DEFAULT}}}]}]},
{substrings,
{'SubstringFilter',"description",
{'SubstringFilter_substrings',
[{any,[209,129,209,131,208,180]}]}}}]},
120,
["cn","mail","name","sAMAccountName"],
false,neverDerefAliases,0}},
110500]}}
Вот кусок конфига mod_vcard_ldap:
{mod_vcard_ldap,[
{search, true},
{allow_return_all, true},
{matches, 120},
{host, "users.@HOST@"},
{auth_method, ldap},
{ldap_servers, ["ldap-d00.com.ua"]},
{ldap_port, 3268},
{ldap_base, "DC=adir,DC=com,DC=ua"},
{ldap_rootdn, "CN=poll,OU=Global_technical_accounts,OU=BNK,DC=adir,DC=com,DC=ua"},
{ldap_password, "Ldap-test"},
{ldap_uids, [{"sAMAccountName", "%u"}]},
{ldap_filter, "(&(ObjectClass=user)(objectCategory=person)(sAMAccountName=*.*)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))"},
{ldap_vcard_map,
[{"NICKNAME", "%s", ["name"]},
{"GIVEN", "%s", ["givenName"]},
{"FAMILY", "%s", ["sn"]},
{"FN", "%s", ["cn"]},
{"EMAIL", "%s", ["mail"]},
{"CTRY", "%s", ["c"]},
{"DESC", "%s", ["description"]},
{"TEL", "%s", ["ipPhone"]}
]},
{ldap_search_fields,
[{"Login", "%u"},
{"FIO-Ukr", "cn"},
{"FIO-Rus", "description"},
{"Email", "mail"},
{"IP-Phone", "ipPhone"}
]},
{ldap_search_reported,
[{"Full Name", "FN"},
{"Nickname", "NICKNAME"},
{"Email", "EMAIL"}]}
]}
Проблема, как я понял, вовсе
Проблема, как я понял, вовсе не в jabberd, а в erlang. Сломал всю голову, пока докопался, почему вдруг сервер перестал работать. :) Именно он после обновления до 16.b вдруг начал сыпать ошибками SSL_CTX_use_certificate_file failed: error:02001002:system library:fopen:No such file or directory.
Я откатился до версии 15.b.03.1, пересобрал ejabberd (2.1.13, кстати) и всё заработало.