<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>The wrong password call raised an exception and the process
behind H (<0.131.0> is dead. <br>
</p>
<p>And I think this is the reason of hang.</p>
<p><br>
</p>
<p>You can start your session with <br>
</p>
<p><br>
</p>
<p>> catch_exception(true). <br>
</p>
<p><br>
</p>
<p>This is catch exceptions and your H will survive the crash and
should work.</p>
<p><br>
</p>
<p><br>
</p>
<br>
<div class="moz-cite-prefix">On 06/29/2018 03:07 PM, Technion wrote:<br>
</div>
<blockquote type="cite"
cite="mid:SYCPR01MB35049E99DE3B354765ECF461D94E0@SYCPR01MB3504.ausprd01.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;"
dir="ltr">
<p style="margin-top:0;margin-bottom:0">Hi,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">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.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<div>Erlang/OTP 21 [erts-10.0] [source] [64-bit] [smp:1:1]
[ds:1:1:10] [async-threads:1] [hipe]</div>
<div><br>
</div>
<div>Eshell V10.0 (abort with ^G)</div>
<div>1> ===> The rebar3 shell is a development tool; to
deploy applications in production, consider using releases
(<a class="moz-txt-link-freetext" href="http://www.rebar3.org/docs/releases">http://www.rebar3.org/docs/releases</a>)</div>
<div>===> Booted p3</div>
<div>===> Booted sasl</div>
<div><br>
</div>
<div>1> {ok, H} = eldap:open(["127.0.0.1"], [{port, 1636},
{ssl, true}, {timeout, 500}]).</div>
<div>{ok,<0.131.0>}</div>
<div>2> ok = eldap:simple_bind(H, <a class="moz-txt-link-rfc2396E" href="mailto:Kevin@ad.lolware.net">"Kevin@ad.lolware.net"</a>,
"Kevin111").</div>
<div>ok</div>
<div><br>
</div>
<div>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:</div>
<div><br>
</div>
<div>
<div>1> {ok, H} = eldap:open(["127.0.0.1"], [{port, 1636},
{ssl, true}, {timeout, 500}]).</div>
<div>{ok,<0.131.0>}</div>
<div>2> ok = eldap:simple_bind(H, "Kevin", "Kevin111").</div>
<div>** exception error: no match of right hand side value
{error,invalidCredentials}</div>
<div>3> ok = eldap:simple_bind(H, <a class="moz-txt-link-rfc2396E" href="mailto:Kevin@ad.lolware.net">"Kevin@ad.lolware.net"</a>,
"Kevin111").</div>
<div><indefinite hang></div>
<br>
</div>
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.
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Any assistance
appreciated.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
erlang-questions mailing list
<a class="moz-txt-link-abbreviated" href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a>
<a class="moz-txt-link-freetext" href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
BR,
Dmitry
</pre>
</body>
</html>