-
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
Call hanging after short timeframe #23
Comments
I am also seeing this issue. |
I'd guess this is because the clients are bound once and reused on subsequent calls, and then the connection becomes stale for some reason. There are not even an error handler attached to the clients, nor any re-connection logic. I did face the same problem once with an AD server but at the time could not investigate it more thoroughly, and due to this If you either of you is interested in debugging the root cause further it would be highly appreciated. Eg. attach error handlers for emitted events and see if they start logging any errors, or if there are any attributes in the client that could be used to detect hanging connections. How long does it take for the problems to begin, and how often is the authenticate method called before that happens? I'll also try to see if I can reproduce this with an AD server. |
@vesse I would be happy to try logging out errors, but I don't immediately see how, in that linked file. It looks like there are already some loggers in action by default? Or do you mean to attach For now I think I will do the same thing you do in passport-ldapauth and instantiate a new |
@jrajav Cool. Yeah, just what I meant - attach listeners to clients in |
Haven't forgotten! Just trying to find the time. By the way, great job on this. I just started using the tlsOptions today and it works a charm. |
@vesse @jrajav @KevinMann13 Were you guys able to solve the issue? are there any workarounds that you guys can suggest. (also on a different note, is there a way i can make my application logout the use automatically after say 30 mins of inactivity, if yes then please suggest how). |
Further to the above issue, i dropped the idea of using this package and implemented LDAP authentication via passport-ldapauth. It worked like a charm :) |
Hello, I have the same problem. ldapauth-fork/node_modules/ldapjs/lib/client/client.js:1356: At this point function returns without calling callback. |
A colleague of mine adviced me to put |
I am running into a similar issue where I am expecting ldapauth-fork to re-establish connections You can test this behaviour with by running tcpkill, attempting to login and having tcpkill terminate all traffic via TCP RST, finally ctrl+c tcpkill and try your apps auth again.
Use |
@Kahn thanks for detailed how-to-reproduce instructions, I'll look into this. I take it from your description that |
Any news on this? I think i am experiencing the same issue.. it sames to work fine for a while but then all of a sudden it will start giving me Error: connect ETIMEDOUT. Thanks |
@whittssg I don't think it's been fixed yet, no, but you can work around it by instantiating ldapauth every time you use it as some of us have mentioned in this thread. |
I'm seeing this issue also, authenticate just seems to hang, i did notice that if i left it hanging for 5+ minutes i eventually saw this error on the server.
After this i tried to login again and it was working fine. |
I am seeing connection resets as well. If I'm using ldap I will get a reset every 3 minutes, but if I'm using ldaps it's every 15 minutes. I'm using Server 2012 R2 as the domain controller. Either way, I put in my code to just time out the connection every 30 seconds, close the connection, then recreate the next time it's needed. Here is my project https://github.com/atsage/node-red-contrib-nr-ldapauth |
When I first launch the node server, the ldap authentication works just fine. After it has been up for a little while, the ldap.authenticate() call starts to hang and then eventually returns a 502. I also can't figure out how to get more information on this, like a log or something.
The text was updated successfully, but these errors were encountered: