You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're currently using ldapjs for our LDAP client, in secure mode:
ldap.createClient({
url : 'ldaps://192.1.1.1'
/* tls options if using ldaps */
tlsOptions : { ... }, //key, cert, passphrase, rejectUnauthorized: false, NPNProtocols
/* turn on connection pooling */
maxConnections: 10,
/* 2 minutes */
maxIdleTime: 120000,
/* 30 second health checks */
checkInterval: 30000
});
When our client starts up, the first call it makes is client.search, passing a callback that takes err and res. If the server is down, this callback is being called twice, once with a "connect EHOSTUNREACH" err, and again with a "socket hang up" err.
I tried upgrading our ldapjs version to 0.7.0, but for that version we're seeing an even worse issue - the "connect EHOSTUNREACH" error is unhandled, so our entire app crashes.
events.js:72
throw er; // Unhandled 'error' event
^
Error: connect EHOSTUNREACH
at errnoException (net.js:901:11)
at Object.afterConnect [as oncomplete] (net.js:892:19)
Is this normal ldapjs behavior, or are we using ldapjs in some non-standard way? All we want is to be able to handle errors like these, rather than working around double-callbacks or adding try-catch blocks around every client.search call.
The text was updated successfully, but these errors were encountered:
We're currently using ldapjs for our LDAP client, in secure mode:
When our client starts up, the first call it makes is client.search, passing a callback that takes err and res. If the server is down, this callback is being called twice, once with a "connect EHOSTUNREACH" err, and again with a "socket hang up" err.
I tried upgrading our ldapjs version to 0.7.0, but for that version we're seeing an even worse issue - the "connect EHOSTUNREACH" error is unhandled, so our entire app crashes.
Is this normal ldapjs behavior, or are we using ldapjs in some non-standard way? All we want is to be able to handle errors like these, rather than working around double-callbacks or adding try-catch blocks around every client.search call.
The text was updated successfully, but these errors were encountered: