[erlang-questions] eldap hangs

Dmitry Klionsky dm.klionsky@REDACTED
Fri Jun 29 14:14:22 CEST 2018


The wrong password call raised an exception and the process behind H 
(<0.131.0> is dead.

And I think this is the reason of hang.


You can start your session with


 > catch_exception(true).


This is catch exceptions and your H will survive the crash and should work.




On 06/29/2018 03:07 PM, Technion wrote:
>
> Hi,
>
>
> I seem to have a replicable hang in the eldap module. Allow me to 
> start with a working example. If it matters, the LDAP server is a 
> Samba4 AD server. Before anyone asks, these are throw away passwords.
>
>
> Erlang/OTP 21 [erts-10.0] [source] [64-bit] [smp:1:1] [ds:1:1:10] 
> [async-threads:1] [hipe]
>
> Eshell V10.0  (abort with ^G)
> 1> ===> The rebar3 shell is a development tool; to deploy applications 
> in production, consider using releases 
> (http://www.rebar3.org/docs/releases)
> ===> Booted p3
> ===> Booted sasl
>
> 1> {ok, H} = eldap:open(["127.0.0.1"], [{port, 1636}, {ssl, true}, 
> {timeout, 500}]).
> {ok,<0.131.0>}
> 2> ok = eldap:simple_bind(H, "Kevin@REDACTED", "Kevin111").
> ok
>
> So we definitely have of using this. Now let's see what happens in a 
> new session if we first get the username wrong, then try it correctly:
>
> 1> {ok, H} = eldap:open(["127.0.0.1"], [{port, 1636}, {ssl, true}, 
> {timeout, 500}]).
> {ok,<0.131.0>}
> 2>  ok = eldap:simple_bind(H, "Kevin", "Kevin111").
> ** exception error: no match of right hand side value 
> {error,invalidCredentials}
> 3> ok = eldap:simple_bind(H, "Kevin@REDACTED", "Kevin111").
> <indefinite hang>
>
> Given I'm trying to build an interface where users can enter their own 
> username, well it creates an easily hung session. The docs describe a 
> timeout on open/2 but it obviously doesn't apply to everything. Given 
> I"m not seeing any output at all I have no real idea where to debug this.
>
>
> Any assistance appreciated.
>
>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

-- 
BR,
Dmitry

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20180629/df7f88a9/attachment.htm>


More information about the erlang-questions mailing list