-
Notifications
You must be signed in to change notification settings - Fork 79
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
Connects anonymously after losing server connection #67
Comments
Hmm it should reset the |
It doesn't appear the error event is ever fired. From this issue, ldapjs/node-ldapjs#392, it appears that this is expected. Near the end there is an example to handle it is by binding using the connect event: // e.g. in your client's class constructor
this.ldapClient = ldap.createClient({
url: ldap_url,
reconnect: {
initialDelay: 100,
maxDelay: 1000,
failAfter: 10
}
});
const client = this.ldapClient;
// do a rebind when reconnect
this.ldapClient.on('connect', function () {
client.bind(ldap_user, ldap_pwd, err => {
if (err) {
logger.error('error while ldap binding' + err);
}
});
}); PR incoming... |
#68 resolves this. |
I'm having a problem with authentication not working after my LDAP connection is lost. It's successfully reconnecting, but not binding to the admin user, which prevents logins.
After restarting the LDAP server:
On the next login attempt:
For
reconnect
in options, I'm usinginitialDelay
of 5000 andmaxDelay
of 60000.The text was updated successfully, but these errors were encountered: