From: Klinger C. <ckl...@ec...> - 2003-12-09 11:41:32
|
Hello List The Problem: I make some LDAP Queries (Zope External Method) over a large network! Sometimes i got a "good" result but sometimes i got the error=20 "Can=B4t contact LDAP-Server"! Is it possible to get over on a "timeout limit"=3F Is it possible to trace something=3F Do you have any tips for me=3F Thx in advance Christian The "short code of the programm --snip-- import ldap server =3D '10.99.29.9' admin =3D "cn=3Dldapadmin,o=3Dcnbg,c=3Dde" passw =3D "xxxxxxxx" l=3Dldap.open(server) l.protocol=5Fversion =3D ldap.VERSION3 l.simple=5Fbind=5Fs(admin,passw) def e=5Fldapsearch(name,flag): basedn =3D "o=3Dcnbg,c=3Dde" sfilter =3D "(&(objectclass=3DdrupaPerson)(cn=3D%s))" %name res =3D l.search=5Fs(basedn, ldap.SCOPE=5FSUBTREE, sfilter) # line 72 return res --snip-- The Traceback from Zope: =5F=5Fcall=5F=5F<BR>=5F=5Ftraceback=5Finfo=5F=5F: ((), {'flag': 'bgdpextr= anet', 'name':=20 9909040001}, None)=20 Module /opt/Zope/Extensions/e=5Fldapsearch.py, line 72, in ldapsearch=20 Module ldap.ldapobject, line 421, in search=5Fs=20 Module ldap.ldapobject, line 425, in search=5Fst=20 Module ldap.ldapobject, line 371, in result=20 Module ldap.ldapobject, line 94, in =5Fldap=5Fcall </LI></UL>SERVER=5FDOW= N:=20 {'desc': "Can't contact LDAP server", 'info': ''}=20 |