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

LDAPSocketOpenError('socket connection error while opening: [Errno 110] Connection timed out' #590

Closed
anshupitlia opened this issue Sep 20, 2018 · 4 comments
Labels

Comments

@anshupitlia
Copy link

anshupitlia commented Sep 20, 2018

I am starting a connection like this:

    try: 
         server = Server(config['LDAP_URL'] + ':' + config['LDAP_PORT'], get_info=ALL)
         conn = Connection(server, config['LDAP_BIND_DN'], config['LDAP_BIND_SECRET'])
         conn.bind()
    except LDAPSocketOpenError as e:
        print("error in bind", conn.result)

It is giving this error:
LDAPSocketOpenError('socket connection error while opening: [Errno 110] Connection timed out'

Here is the stacktrace:

  error in bind inside exception None
  File "ldap_connection.py", line 11, in create_ldap_connection
   conn.bind()
  File ".local/lib/python3.6/site-packages/ldap3/core/connection.py", line 524, in bind
    self.open(read_server_info=False)
  File ".local/lib/python3.6/site-packages/ldap3/strategy/sync.py", line 56, in open
    BaseStrategy.open(self, reset_usage, read_server_info)
  File ".local/lib/python3.6/site-packages/ldap3/strategy/base.py", line 147, in open
    raise LDAPSocketOpenError('unable to open socket', exception_history)
ldap3.core.exceptions.LDAPSocketOpenError: ('unable to open socket', [(LDAPSocketOpenError('socket connection error while opening: [Errno 110] Connection timed out',), ('10.0.29.78', 636))])
  1. why does the bind fail? The server is up and running fine.
  2. conn.result returns None, not much helpful. What does it mean?
@cannatag
Copy link
Owner

cannatag commented Oct 9, 2018

"Connection Timed out" means that there was no response from the server. The result is None because no LDAP session was established. Are you sure you can reach the server?

@anshupitlia
Copy link
Author

@cannatag Yeah, I was able to reach the server, and then suddenly this error would come up. I'm now wondering if it was because of some pool of connections or something, I got around this error by rebooting the server machine and the service machine. I'll reopen if I get this error again.

@pro4tlzz
Copy link

@cannatag how can you a server connection?

@KDR9666
Copy link

KDR9666 commented Feb 24, 2024

@cannatag Yeah, I was able to reach the server, and then suddenly this error would come up. I'm now wondering if it was because of some pool of connections or something, I got around this error by rebooting the server machine and the service machine. I'll reopen if I get this error again.

Kindly support i too having same issue,

image

ldap3.core.exceptions.LDAPSocketOpenError: socket connection error while opening: [Errno 110] Connection timed out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants