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

Windows only: OPT_NETWORK_TIMEOUT and "Can't contact LDAP server" #528

Open
IvarVirusiim opened this issue Jun 30, 2023 · 1 comment
Open

Comments

@IvarVirusiim
Copy link

Issue description:
There's an issue that affects only Windows. Windows wheels are built there: https://github.com/cgohlke/python-ldap-build (also tried to build myself, but the issue was the same).

Steps to reproduce:

connection = ldap.initialize("<url>")
connection.set_option(ldap.OPT_NETWORK_TIMEOUT , 100)

Setting any positive value for ldap.OPT_NETWORK_TIMEOUT and trying to continue with some action, this will happen instantly:
ldap.SERVER_DOWN: {'result': -1, 'desc': "Can't contact LDAP server", 'errno': 2, 'ctrls': [], 'info': 'No such file or directory'}

Operating system: Windows 10

Python version: 3.11

python-ldap version: 3.4.3

@quanah
Copy link
Contributor

quanah commented Apr 2, 2024

It may be the option doesn't work with Windows systems. It'd be necessary to get the appropriate logs where LDAP_DEBUG_TRACE was in effect to better determine if that's the case.

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

2 participants