Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merger example - Connection lost #231

Open
FandaOG opened this issue Jul 22, 2021 · 0 comments
Open

Merger example - Connection lost #231

FandaOG opened this issue Jul 22, 2021 · 0 comments

Comments

@FandaOG
Copy link

FandaOG commented Jul 22, 2021

Hi,

I use merger https://ldaptor.readthedocs.io/en/latest/cookbook/merger.html I've got a problem. I have 2 LDAP servers. Sometime one LDAP server is offline. How can I handle if LDAP is offline (1st is online 2nd is offline I expect I should get response from 1st LDAP but I got infinite pending loop)? Thanks.

Current behavior is:

  1. request ldapsearch -x -H ldap://merger.test:389 "uid=test"
  2. I get error on merger server:
2021-07-22T09:16:33+0000 [twisted.internet.defer#critical] 


	Traceback (most recent call last):


	  File "/usr/local/lib/python3.8/site-packages/twisted/internet/defer.py", line 330, in addCallbacks
	    self._runCallbacks()


	  File "/usr/local/lib/python3.8/site-packages/twisted/internet/defer.py", line 662, in _runCallbacks
	    current.result = callback(current.result, *args, **kw)


	  File "/usr/local/lib/python3.8/site-packages/ldaptor/protocols/ldap/merger.py", line 120, in _handleUnknown
	    self._whenConnected(self._clientQueue, request, controls, reply)


	  File "/usr/local/lib/python3.8/site-packages/ldaptor/protocols/ldap/merger.py", line 36, in _whenConnected
	    return defer.maybeDeferred(fn, *a, **kw)

	--- <exception caught here> ---

	  File "/usr/local/lib/python3.8/site-packages/twisted/internet/defer.py", line 167, in maybeDeferred

	    result = f(*args, **kw)


	  File "/usr/local/lib/python3.8/site-packages/ldaptor/protocols/ldap/merger.py", line 59, in _clientQueue
	    d = c.send_multiResponse(request, self._gotResponse, reply)


	  File "/usr/local/lib/python3.8/site-packages/ldaptor/protocols/ldap/ldapclient.py", line 128, in send_multiResponse
	    msg = self._send(op)


	  File "/usr/local/lib/python3.8/site-packages/ldaptor/protocols/ldap/ldapclient.py", line 81, in _send
	    raise LDAPClientConnectionLostException()


	ldaptor.protocols.ldap.ldapclient.LDAPClientConnectionLostException: Connection lost
  1. ldapsearch does not get the response (one user exists) it is in infinite pending on data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant