Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Using Mozilla::LDAP instead of Net::LDAP

by strat (Canon)
on Sep 26, 2006 at 08:31 UTC ( #574876=note: print w/ replies, xml ) Need Help??


in reply to Using Mozilla::LDAP instead of Net::LDAP

Why don't you just ask your question? I worked with PerLDAP some years ago, and may or may not be able to help you.

Best regards,
perl -e "s>>*F>e=>y)\*martinF)stronat)=>print,print v8.8.8.32.11.32"


Comment on Re: Using Mozilla::LDAP instead of Net::LDAP
Re^2: Using Mozilla::LDAP instead of Net::LDAP
by LittleGreyCat (Scribe) on Sep 26, 2006 at 11:41 UTC
    Strat,

    O.K. - here we go :-)

    I am searching a directory using an authenticated bind.

    I am using the same connection for a number of searches; essentially navigating down the X.500 DIT to extract leaf entries from some (but not all) limbs of the directory.

    On the test system this always works.

    On the live system this often works.

    When searching a particularly large subtree I seem to get all the data back, but the connection is shown in the DSA log as unbinding, although I have not issued an 'unbind'.

    The next search fails (obviously); I then have to bind to the directory again before I can search again.

    I have no real evidence as to why the connection has unbound. It could be a timeout condition under load, perhaps.
    My main problem is that I can't see any way under Mozilla::LDAP to set the timeout period for a search.
    I can see in Net::LDAP that I can specify a timeout when I bind, which may be inherited by the searches, but the interface through Mozilla::LDAP seems to be very simplistic.

    Any suggestions on how to improve the resilience of the search would be welcome.

    Regards

    Dave R.

    Nothing succeeds like a budgie with no teeth.
    • What does the Server log tell you?
    • Do you do error handling in your code? if yes, the server will tell you about timeouts etc. Which error messages is given?
    • Best regards,
      perl -e "s>>*F>e=>y)\*martinF)stronat)=>print,print v8.8.8.32.11.32"

        Strat,

        there is error handling in the code; however the symptoms are:
        (1) A search completes without error, returning the expected (large amount of) data.
        (2) The next searches fails 'Unable to contact LDAP server' (or similar).

        The server log shows that the connection was unbound after the successful search in (1) although the code did not issue an 'unbind'.

        This in turn explains the unexpected failure in (2) as there is no longer a connection.

        I have not yet located a log which shows any error associated with the connection which unexpectedly 'unbound'.

        I have so far been unable to reproduce the fault on a test system, and I am reluctant to propose upping the server logging on an extremely heavily loaded live service.

        Regards

        Dave R.

        Nothing succeeds like a budgie with no teeth.
Re^2: Using Mozilla::LDAP instead of Net::LDAP
by LittleGreyCat (Scribe) on Sep 26, 2006 at 13:17 UTC
    One light has just dawned.

    Mozilla::LDAP::API give some (self confessed poorly documented) access to the 'C' libraries underneath.

    Not a lot of good with the documentation as shipped, but I happen to have a copy of the Tim Howes/Mark Smith LDAP book.
    I had discounted this as it was firmly aimed at 'C' programmers, but coupled with the API it may give me a way forward.

    I am still no closer, however, to working out why the session kills itself after delivering the data.

    Cheers

    Dave R.

    Nothing succeeds like a budgie with no teeth.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://574876]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2014-09-16 06:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (157 votes), past polls