Connections established using SASL die after search

Mark Roach mrroach at okmaybe.com
Tue Dec 14 16:55:41 CET 2004


On Tue, 2004-12-14 at 08:59 +0100, Michael Ströder wrote:
> Mark Roach wrote:
> >     except:
> >         print "Died on iteration %d" % (i)
> >         print out
> >         break
> 
> You're catching all LDAP error exceptions here without printing them.

Good point. I made some modifications (attached). I have attached the
output from a few iterations.


In order to test where in the ldap/sasl/python stack the problem is
coming from, I also patched ldapsearch.c to run the same queries. It
seems to work just fine. The patch is attached.

Thanks again,

Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ldapsearch-sasltest.patch
Type: text/x-patch
Size: 1390 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20041214/c43f4495/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testsasl2.py
Type: application/x-python
Size: 2415 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20041214/c43f4495/attachment-0001.bin>
-------------- next part --------------
mrroach at flmrroach:~/Archives/src/edsadmin/test$ python testsasl2.py
Trying gssapi connection
SASL/GSSAPI authentication started
SASL username: mrroach at OKMAYBE.COM
SASL SSF: 56
SASL installing layers
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
Trying gssapi + extra search
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 Died on iteration 36
ldap.SERVER_DOWN
Error: {'info': '', 'desc': "Can't contact LDAP server"}
['dc=okmaybe,dc=com']

mrroach at flmrroach:~/Archives/src/edsadmin/test$ python testsasl2.py
Trying gssapi connection
SASL/GSSAPI authentication started
SASL username: mrroach at OKMAYBE.COM
SASL SSF: 56
SASL installing layers
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
Trying gssapi + extra search
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
mrroach at flmrroach:~/Archives/src/edsadmin/test$ python testsasl2.py
Trying gssapi connection
SASL/GSSAPI authentication started
SASL username: mrroach at OKMAYBE.COM
SASL SSF: 56
SASL installing layers
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
Trying gssapi + extra search
0 1 2 3 4 5 Died on iteration 6
ldap.SERVER_DOWN
Error: {'info': '', 'desc': "Can't contact LDAP server"}
['dc=okmaybe,dc=com']

mrroach at flmrroach:~/Archives/src/edsadmin/test$ python testsasl2.py
Trying gssapi connection
SASL/GSSAPI authentication started
SASL username: mrroach at OKMAYBE.COM
SASL SSF: 56
SASL installing layers
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
Trying gssapi + extra search
Died on iteration 0
ldap.SERVER_DOWN
Error: {'info': '', 'desc': "Can't contact LDAP server"}
['dc=okmaybe,dc=com']

mrroach at flmrroach:~/Archives/src/edsadmin/test$ python testsasl2.py
Trying gssapi connection
SASL/GSSAPI authentication started
SASL username: mrroach at OKMAYBE.COM
SASL SSF: 56
SASL installing layers
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
Trying gssapi + extra search
Died on iteration 0
ldap.SERVER_DOWN
Error: {'info': '', 'desc': "Can't contact LDAP server"}
['dc=okmaybe,dc=com']

mrroach at flmrroach:~/Archives/src/edsadmin/test$ python testsasl2.py
Trying gssapi connection
SASL/GSSAPI authentication started
SASL username: mrroach at OKMAYBE.COM
SASL SSF: 56
SASL installing layers
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
Trying gssapi + extra search
0 1 Died on iteration 2
ldap.SERVER_DOWN
Error: {'info': '', 'desc': "Can't contact LDAP server"}
['dc=okmaybe,dc=com']

mrroach at flmrroach:~/Archives/src/edsadmin/test$ python testsasl2.py
Trying gssapi connection
SASL/GSSAPI authentication started
SASL username: mrroach at OKMAYBE.COM
SASL SSF: 56
SASL installing layers
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
Trying gssapi + extra search
0 1 2 3 4 5 6 7 8 9 10 11 12 13 Died on iteration 14
ldap.SERVER_DOWN
Error: {'info': '', 'desc': "Can't contact LDAP server"}
['dc=okmaybe,dc=com']

mrroach at flmrroach:~/Archives/src/edsadmin/test$ python testsasl2.py
Trying gssapi connection
SASL/GSSAPI authentication started
SASL username: mrroach at OKMAYBE.COM
SASL SSF: 56
SASL installing layers
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
Trying gssapi + extra search
0 1 2 3 4 5 6 7 8 9 Died on iteration 10
ldap.SERVER_DOWN
Error: {'info': '', 'desc': "Can't contact LDAP server"}
['dc=okmaybe,dc=com']

mrroach at flmrroach:~/Archives/src/edsadmin/test$ python testsasl2.py
Trying gssapi connection
SASL/GSSAPI authentication started
SASL username: mrroach at OKMAYBE.COM
SASL SSF: 56
SASL installing layers
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
Trying gssapi + extra search
0 1 2 3 4 5 6 7 8 9 10 11 12 13 Died on iteration 14
ldap.SERVER_DOWN
Error: {'info': '', 'desc': "Can't contact LDAP server"}
['dc=okmaybe,dc=com']



More information about the python-ldap mailing list