Open kerryhatcher opened 1 year ago
hi @kerryhatcher ! if you set the log level then you can get a bit more detail
conn.open()
logger.debug('Opened connection to AD domain %s: %s', self.domain, conn)
if self.encrypt_connections:
# if we're using LDAPS, don't StartTLS
if not conn.server.ssl:
tls_started = conn.start_tls()
if not tls_started:
raise DomainConnectException('Unable to StartTLS on connection to domain. Please check the '
'server(s) to ensure that they have properly configured certificates.')
logger.debug('Successfully secured connection to AD domain %s', self.domain)
unsure if the underlying python ssl has more logging available (this all builds on that)
can you maybe wireshark it? it's possible that your network is the issue. a bad MTU size can fragment packets, which makes TLS negotiation hang because the packets keep getting re-transmitted. that's the only scenario where I've seen normal connections work, but TLS hang
maybe check that out?
Summary
When attempting to connect to the AD domain, my script hangs at
secure=self.encrypt_connections
inms_active_directory/core/ad_domain.py(456)
. I'm not sure what is going on in the background could have something to do with whatever TLS/etc implementation is in the OS. Is there a way to get more debug info out of the package?Env Details
OS: Amazon Linux 2 Server: EC2 t3.small Installed via Poetry Ran via:
poetry run python3 ad_demo
Last few lines of python debugger
Higher level debug
Redacted Code
nslookup
The server appears to be able to resolve the domain controllers OK: