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

TLS connection runs out of time #91

Open
arvindsinghtomar opened this issue Sep 16, 2016 · 2 comments
Open

TLS connection runs out of time #91

arvindsinghtomar opened this issue Sep 16, 2016 · 2 comments

Comments

@arvindsinghtomar
Copy link

arvindsinghtomar commented Sep 16, 2016

I'm trying to connect LDAP server using this code

    ldap = new LDAP({

        uri: 'ldaps://host:port',
        base: 'o=base',
        attrs: '*',
        validatecert: false,
        version: 3,
        reconnect: true,
        connecttimeout: -1, // seconds, default is -1 (infinite timeout), connect timeout
        filter: '*', // default filter for all future searches
        scope: LDAP.SUBTREE
    }, function(err) {
        if (err) console.log("Conn err: ", err);
    });

and this gives me error :

{ [LDAPError: Timeout] name: 'LDAPError', message: 'Timeout' }

can you help?

@arvindsinghtomar arvindsinghtomar changed the title TLS connection runs ot of time TLS connection runs out of time Sep 16, 2016
@calamarico
Copy link

Hi arvin, i have the same tiemout error but not in connection, i have this timeout error in the search method.
My connection object is this and i don't have any problem:

ldap = new LDAP({
uri: config.ldap.server,
validatecert: false,
connecttimeout: -1,
});

@calamarico
Copy link

FYI: You can override timeout and ntimeout properties (you can see this properties in index.js) try to override in your object:

ldap = new LDAP({
....
timeout: 5000,
ntimeout: 5000
});

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

No branches or pull requests

2 participants