random SERVER_DOWN exception during bind

Bug #611654 reported by pipoun
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
repoze.who LDAP plugin
New
Undecided
Unassigned

Bug Description

I randomly experience some exceptions during bind. I'm using the MetadataProvider class.
Here is a part of the traceback:

File "/home/install/tg2devenv/lib/python2.5/site-packages/repoze.who.plugins.ldap-1.1a1-py2.5.egg/repoze/who/plugins/ldap/plugins.py", line 421, in add_metadata
    raise ValueError( "Couldn't bind with supplied credentials. Exception : %s" % err.__repr__() )
ValueError: Couldn't bind with supplied credentials. Exception : SERVER_DOWN({'desc': "Can't contact LDAP server"},)

I've added "Exception : %s" % err.__repr__() in the code to have more info.
I'm using turbogears, if I refresh the page that raised the exception, everything is ok again.

I'm wondering:
- shouldn't unbind() be called after bind and lookup operations ?
- why bind isn't called just once in make_ldap_connection ?

Thanks!

Revision history for this message
pipoun (pipoun) wrote :

I have omitted to add that I'm connecting to an Active Directory server.

Moreover, from the doc:
http://www.python-ldap.org/doc/html/ldap.html#ldap.LDAPObject.unbind_ext_s
Once an unbind() is called, the connection has to be initialized again.
So, indeed unbind should be called in the add_metadata method

Would it be perhaps a timeout issue?

Revision history for this message
pipoun (pipoun) wrote :

"should *not* be called" sorry for the typo!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.