<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 24, 2015 at 6:32 PM, Michael Ströder <span dir="ltr"><<a href="mailto:michael@stroeder.com" target="_blank">michael@stroeder.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">Ziad Badawi wrote:<br>
> l = ldap.initialize('ldaps://domain.local:636')<br>
><br>
> l.simple_bind_s('user', 'passwd')<br>
</span>> [..]<br>
<span class="">> When I execute this, I get<br>
> ldap.SERVER_DOWN: {'info': 'TLS error -5939:No more entries in the<br>
> directory', 'desc': "Can't contact LDAP server"}<br>
<br>
</span>This is a TLS related error probably occuring at l.simple_bind_s(). Use<br>
ldap.initialize('ldaps://domain.local:636',trace_level=1) (or higher trace<br>
level) to see details. Beware that password is sent to trace output.<br>
<br></blockquote><div>After checking the trace, it does fail on simple_bind_s. <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I don't see where you set the CA cert(s) used to validate the server cert.</blockquote><div>I do not know how to use that and I used  ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_NEVER) to avoid using TLS as I learned.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">
> and I am not sure what it means, but the strange thing is when I execute<br>
> this another time, it works fine and the attribute is modified<br>
><br>
> Any idea what is going on here? and what is the solution?<br>
<br>
</span>Is there a load balancer in front of ldaps://domain.local:636 and your<br>
requests are passed to different replicas/instances?<br>
<br></blockquote><div>No load balancers<br> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Ciao, Michael.<br>
<br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr">Z</div></div>
</div></div>