client.bind() never responds if server can't be reached (timeouts have no effect)
See original GitHub issueLong story short, if your server is currently down, a client.bind()
never responds (meaning the callback is never called). Setting the connectTimeout
and timeout
on ldapjs.createClient()
seem to have no effect at all here.
We first noticed this when a server went down after our app had already bound and the app then started hanging, so I’m assuming ldapjs was trying to re-bind after the connection fail[?]. I mention this because the knock on effect is that upstream client.search()
s suddenly stop responding.
Reproducible like this, assuming the IP address here is valid but not responding:
> var ldapjs = require('ldapjs')
> var client = ldapjs.createClient({url:'ldap://10.146.241.10:1389', timeout:3000, connectTimeout:3000})
> client.bind(myDN, myPassword, function(err) { console.log('bind', err); });
> // ...tumbleweeds...
Issue Analytics
- State:
- Created 8 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
client.bind() never responds if server can't be reached ...
Setting the connectTimeout and timeout on ldapjs.createClient() seem to have no effect at all here. We first noticed this when a server went...
Read more >Developers - client.bind() never responds if server can't be reached ...
client.bind() never responds if server can't be reached (timeouts have no effect) ... timeout on ldapjs.createClient() seem to have no effect at all...
Read more >Artificially create a connection timeout error - Stack Overflow
My next attempt was to use Alexander's suggestion of connecting to a different port, e.g. 81 (on my own server though). That worked...
Read more >8. Configuration Reference — BIND 9 9.18.8 documentation
conf will be present if rndc is being run from a remote host, but is not required if rndc is being run from...
Read more >Common Timeouts effecting Web Services, HTTP and SOAP ...
This timeout usually only occurs in situations where the writes are lagging behind new requests. This can occur when a client has a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
When the LDAP server is down and if I set the queueDisable option to false, this works fine and give me the error “{ [ConnectionError: connection unavailable] lde_message: 'connection unavailable ', lde_dn: null }”. But, this is always throwing the same error when the LDAP server is up also and if I comment out the queueDisabled option, it works. I am wondering why this is behaving like this.
Issue is still present now