ejabberd - Comments for "empty user list when using AD" https://www.ejabberd.im/node/23018 en Fail to search in Active https://www.ejabberd.im/node/23018#comment-65216 <p>Fail to search in Active Directory</p> <p>I think I have the same problem here, if I type nothing in search's fields, it returns all my users from Active Directory, but if I type something in the fields and hit search button, I get this message in log:</p> <div class="codeblock"><code>13:41:12.950 [error] gen_fsm &#039;eldap_#Ref&lt;0.0.0.11157&gt;&#039; in state active terminated with reason: no match of right hand value {error,{asn1,{function_clause,[{&#039;ELDAPv3&#039;,enc_SubstringFilter_substrings_components,[{&#039;SubstringFilter_substrings&#039;,[{any,&lt;&lt;&quot;eduardo*&quot;&gt;&gt;}]},[],0],[{file,&quot;src/ELDAPv3.erl&quot;},{line,1768}]},{&#039;ELDAPv3&#039;,enc_SubstringFilter_substrings,2,[{file,&quot;src/ELDAPv3.erl&quot;},{line,1765}]},{&#039;ELDAPv3&#039;,enc_SubstringFilter,2,[{file,&quot;src/ELDAPv3.erl&quot;},{line,1753}]},{&#039;ELDAPv3&#039;,enc_Filter,2,[{file,&quot;src/ELDAPv3.erl&quot;},{line,1604}]},{&#039;ELDAPv3&#039;,enc_Filter_and_components,3,[{file,&quot;src/ELDAPv3.erl&quot;},{line,1636}]},{&#039;ELDAPv3&#039;,...},...]}}} in eldap:send_command/3 line 831<br />13:41:12.950 [error] CRASH REPORT Process &#039;eldap_#Ref&lt;0.0.0.11157&gt;&#039; with 1 neighbours exited with reason: no match of right hand value {error,{asn1,{function_clause,[{&#039;ELDAPv3&#039;,enc_SubstringFilter_substrings_components,[{&#039;SubstringFilter_substrings&#039;,[{any,&lt;&lt;&quot;eduardo*&quot;&gt;&gt;}]},[],0],[{file,&quot;src/ELDAPv3.erl&quot;},{line,1768}]},{&#039;ELDAPv3&#039;,enc_SubstringFilter_substrings,2,[{file,&quot;src/ELDAPv3.erl&quot;},{line,1765}]},{&#039;ELDAPv3&#039;,enc_SubstringFilter,2,[{file,&quot;src/ELDAPv3.erl&quot;},{line,1753}]},{&#039;ELDAPv3&#039;,enc_Filter,2,[{file,&quot;src/ELDAPv3.erl&quot;},{line,1604}]},{&#039;ELDAPv3&#039;,enc_Filter_and_components,3,[{file,&quot;src/ELDAPv3.erl&quot;},{line,1636}]},{&#039;ELDAPv3&#039;,...},...]}}} in eldap:send_command/3 line 831 in gen_fsm:terminate/7 line 622&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />13:41:12.951 [error] LDAP request failed: eldap:search([[{base,&lt;&lt;&quot;OU=mydomain,DC=nova,DC=local&quot;&gt;&gt;},{filter,{and,[{and,[{present,&lt;&lt;&quot;sAMAccountName&quot;&gt;&gt;},{equalityMatch,{&#039;AttributeValueAssertion&#039;,&lt;&lt;&quot;memberOf&quot;&gt;&gt;,&lt;&lt;&quot;CN=chat,OU=mydomain,DC=nova,DC=local&quot;&gt;&gt;}}]},{substrings,{&#039;SubstringFilter&#039;,&lt;&lt;&quot;displayName&quot;&gt;&gt;,{&#039;SubstringFilter_substrings&#039;,[{any,&lt;&lt;&quot;eduardo*&quot;&gt;&gt;}]}}}]}},{limit,0},{deref_aliases,never},{attributes,[&lt;&lt;&quot;displayName&quot;&gt;&gt;,&lt;&lt;&quot;mail&quot;&gt;&gt;,&lt;&lt;&quot;sAMAccountName&quot;&gt;&gt;]}]])Reason: {{{badmatch,{error,{asn1,{function_clause,[{&#039;ELDAPv3&#039;,enc_SubstringFilter_substrings_components,[{&#039;SubstringFilter_substrings&#039;,[{any,&lt;&lt;&quot;eduardo*&quot;&gt;&gt;}]},[],0],[{file,&quot;src/ELDAPv3.erl&quot;},{line,1768}]},{&#039;ELDAPv3&#039;,enc_SubstringFilter_substrings,2,[{file,&quot;src/ELDAPv3.erl&quot;},{line,1765}]},{&#039;ELDAPv3&#039;,enc_SubstringFilter,2,[{file,&quot;src/ELDAPv3.erl&quot;},{line,1753}]},{&#039;ELDAPv3&#039;,enc_Filter,2,[{file,&quot;src/ELDAPv3.erl&quot;},{line,1604}]},{&#039;ELDAPv3&#039;,enc_Filter_and_components,3,[{file,&quot;src/ELDAPv3.erl&quot;},{line,1636}]},{&#039;ELDAPv3&#039;,enc_Filter_and,2,[{file,&quot;src/ELDAPv3.erl&quot;},{line,1629}]},{&#039;ELDAPv3&#039;,enc_Filter,2,[{file,&quot;src/ELDAPv3.erl&quot;},{line,1596}]},{&#039;ELDAPv3&#039;,enc_SearchRequest,2,[{file,&quot;src/ELDAPv3.erl&quot;},{line,1511}]}]}}}},[{eldap,send_command,3,[{file,&quot;src/eldap.erl&quot;},{line,831}]},{eldap,process_command,3,[{file,&quot;src/eldap.erl&quot;},{line,813}]},{gen_fsm,handle_msg,7,[{file,&quot;gen_fsm.erl&quot;},{line,505}]},{proc_lib,init_p_do_apply,3,[{file,&quot;proc_lib.erl&quot;},{line,239}]}]},{gen_fsm,sync_send_event,[&lt;0.430.0&gt;,{search,{eldap_search,wholeSubtree,&lt;&lt;&quot;OU=mydomain,DC=nova,DC=local&quot;&gt;&gt;,{and,[{and,[{present,&lt;&lt;&quot;sAMAccountName&quot;&gt;&gt;},{equalityMatch,{&#039;AttributeValueAssertion&#039;,&lt;&lt;&quot;memberOf&quot;&gt;&gt;,&lt;&lt;&quot;CN=chat,OU=mydomain,DC=nova,DC=local&quot;&gt;&gt;}}]},{substrings,{&#039;SubstringFilter&#039;,&lt;&lt;&quot;displayName&quot;&gt;&gt;,{&#039;SubstringFilter_substrings&#039;,[{any,&lt;&lt;&quot;eduardo*&quot;&gt;&gt;}]}}}]},0,[&lt;&lt;&quot;displayName&quot;&gt;&gt;,&lt;&lt;&quot;mail&quot;&gt;&gt;,&lt;&lt;&quot;sAMAccountName&quot;&gt;&gt;],false,neverDerefAliases,0}},110500]}}<br />13:41:12.951 [error] Supervisor ejabberd_sup had child &#039;ejabberd_mod_vcard_ldap_chat.mydomain.com.br&#039; started with mod_vcard_ldap:start_link(&lt;&lt;&quot;chat.mydomain.com.br&quot;&gt;&gt;, [{matches,infinity},{ldap_vcard_map,[{&lt;&lt;&quot;NICKNAME&quot;&gt;&gt;,[{&lt;&lt;&quot;%u&quot;&gt;&gt;,[]}]},{&lt;&lt;&quot;FN&quot;&gt;&gt;,[{&lt;&lt;&quot;%s&quot;&gt;&gt;,[&lt;&lt;&quot;d...&quot;&gt;&gt;]}]},...]},...]) at &lt;0.427.0&gt; exit with reason no match of right hand value {error,{asn1,{function_clause,[{&#039;ELDAPv3&#039;,enc_SubstringFilter_substrings_components,[{&#039;SubstringFilter_substrings&#039;,[{any,&lt;&lt;&quot;eduardo*&quot;&gt;&gt;}]},[],0],[{file,&quot;src/ELDAPv3.erl&quot;},{line,1768}]},{&#039;ELDAPv3&#039;,enc_SubstringFilter_substrings,2,[{file,&quot;src/ELDAPv3.erl&quot;},{line,1765}]},{&#039;ELDAPv3&#039;,enc_SubstringFilter,2,[{file,&quot;src/ELDAPv3.erl&quot;},{line,1753}]},{&#039;ELDAPv3&#039;,enc_Filter,2,[{file,&quot;src/ELDAPv3.erl&quot;},{line,1604}]},{&#039;ELDAPv3&#039;,enc_Filter_and_components,3,[{file,&quot;src/ELDAPv3.erl&quot;},{line,1636}]},{&#039;ELDAPv3&#039;,...},...]}}} in eldap:send_command/3 line 831 in context child_terminated<br />13:41:12.952 [info] LDAP connection on ad.mydomain.com.br:389</code></div> <p>This is a part of my ejabberd.yml config file:</p> <div class="codeblock"><code>mod_vcard_ldap:<br />&nbsp;&nbsp;&nbsp; matches: infinity<br />&nbsp;&nbsp;&nbsp; ldap_vcard_map:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;NICKNAME&quot;: {&quot;%u&quot;: []}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;FN&quot;: {&quot;%s&quot;: [&quot;displayName&quot;]}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;EMAIL&quot;: {&quot;%s&quot;: [&quot;mail&quot;]}<br />&nbsp;&nbsp;&nbsp; ldap_search_fields:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;User&quot;: &quot;%u&quot;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;Full Name&quot;:&nbsp; &quot;displayName&quot;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;Email&quot;: &quot;mail&quot;<br />&nbsp;&nbsp;&nbsp; ldap_search_reported:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;Full Name&quot;: &quot;FN&quot;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;Nickname&quot;: &quot;NICKNAME&quot;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;Email&quot;: &quot;EMAIL&quot;</code></div> Wed, 28 Jan 2015 17:09:34 +0000 egoncalves comment 65216 at https://www.ejabberd.im