From: Goucher, A. <ada...@hp...> - 2004-01-05 18:25:39
|
6360 is the correct port for this server (we have multiple servers using various ports on that machine). -adam -----Original Message----- From: charlie derr [mailto:cd...@si...]=20 Sent: Monday, January 05, 2004 1:22 PM To: Goucher, Adam Cc: pyt...@li... Subject: Re: Hanging during ldaps My first guess would be to use port 636 instead of 6360 -- if that=20 doesn't work, I'd next try leaving the port specification off entirely=20 (start_tls should encrypt traffic on port 389 if the server is=20 configured correctly). good luck, ~c Goucher, Adam wrote: > I'm trying to use python-ldap to connect to an iplanet 5.1 ldap.=20 > Connecting via ldap:// works, but the script is hanging when=20 > connecting through ldaps://. Can anyone see what I am doing wrong? >=20 > <script> > import ldap > ldap.set_option(ldap.OPT_DEBUG_LEVEL, 5) >=20 > # build our uri > uri =3D "ldaps://ldap_host:6360" >=20 > # connect to the ldap server > p_handle =3D ldap.initialize(uri) > p_handle.protocol_version =3D ldap.VERSION3 >=20 > # bind > p_handle.simple_bind("cn=3Ddirectory manager", "*****") >=20 > # search so we know we are connected > p_search =3D p_handle.search("", ldap.SCOPE_BASE, "objectclass=3D*")=20 > p_return =3D p_handle.result(p_search) res_type, res_values =3D = p_return > print res_values > </script> >=20 > <output> > ldap_create > ldap_url_parse_ext(ldaps://ldap_host:6360) > ldap_bind > ldap_simple_bind > ldap_sasl_bind > ldap_send_initial_request > ldap_new_connection > ldap_int_open_connection > ldap_connect_to_host: TCP ldap_host:6360 > ldap_new_socket: 1904 > ldap_prepare_socket: 1904 > ldap_connect_to_host: Trying ldap_ip:6360 > ldap_connect_timeout: fd: 1904 tm: -1 async: 0 > ldap_ndelay_on: 1904 > ldap_ndelay_off: 1904 > ldap_open_defconn: successful > ldap_send_server_request > ldap_search_ext > put_filter: "objectclass=3D*" > put_filter: default > put_simple_filter: "objectclass=3D*" > ldap_send_initial_request > ldap_send_server_request > ldap_result msgid 2 > ldap_chkResponseList for msgid=3D2, all=3D1 > ldap_chkResponseList for msgid=3D2, all=3D1 > ldap_int_select > </ouput> >=20 > I am using python 2.3.2 for windows, and the python-ldap module found=20 > at http://www.zope.org/Members/volkerw/LdapWin32.dsdfs >=20 > ______________________________ > Adam Goucher > Testing Group > HP OpenView Select Access > Hewlett-Packard > 901 King St W. > Toronto, Ontario > M5V 3H5 >=20 > Phone: +1-416-309-5208 > Fax: +1-416-309-4406 >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by: IBM Linux Tutorials. Become an=20 > expert in LINUX or just sharpen your skills. Sign up for IBM's Free=20 > Linux Tutorials. Learn everything from the bash shell to sys admin.=20 > Click now! http://ads.osdn.com/?ad_id=1278&alloc_id371&op=3Dclick > _______________________________________________ > Python-LDAP-dev mailing list Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-ldap-dev >=20 |