-
Notifications
You must be signed in to change notification settings - Fork 51
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
Updates ldapjs to 1.0.0 #30
Conversation
There seems to be an issue with ECONNRESET after about 15 minutes when using ldapjs v1.0.0. I wouldn't consider this PR until that is better understood. |
This is kind of a naive guess, but could it have to do with something outside of this module? I'm pretty new to LDAP, but given it's a persistent connection, could Node or possibly the LDAP server, close the connection after 15 minutes? I notice some timeouts happening after 5 minutes. I don't see an unbind happening. I wonder if it would be worth exposing it so developers can determine when/if they want to unbind when they see fit? Not sure if this goes against the protocol standards though. |
Yes, I agree. It is likely the LDAP server itself forcing the connection
|
This fixes my node 5 issues with this module. I have not run it in production yet though. |
@Mctalian assuming this the timeout issue your talking about? ldapjs/node-ldapjs#318 Looks like my client disconnects after about 15 minutes as well. The reconnect option is not working for me either. Has anyone had luck with this yet? |
I have unfortunately not been able to look into this further yet. I've got one other task that I'm hoping to finish up this weekend then I can start messing with this again. There is a recent comment in that issue you linked though, it might provide some insight. |
Yea I noticed but hadn't time to play with it either. I should get work time on Monday or Tuesday to see. Might need to make a change here to implement the suggestion. |
I was able to get reconnect working here: Mctalian/passport-windowsauth@master...dustinsmith1024:master. I will clean the code up and PR tomorrow hopefully. |
Nice work! That looks pretty solid, I'll have to try it out tomorrow to see if it also works for my scenario. |
Yup! Confirmed, that works for me, good work! |
I have had less luck today. It seems to be not handling the error consistently. The second time the idle timeout happens the error is not handled properly. I tried reattaching an error handler after the client is reconnected, but it doesn't seem to help. |
Ah... you're right. I didn't sit and wait for another timeout. I have the same issue over here. |
Think I have it worked out. I was making harder than it was. @Mctalian can you try this out? https://github.com/Mctalian/passport-windowsauth/compare/master...dustinsmith1024:error-handling?expand=1 If it works for you I can PR it. Basically |
Seems to be running fine after near 2 hours, I think this is a solid
|
👍 Awesome Ill take out the stack logging and submit a PR. |
Reconnect fix
Ok, thanks to @dustinsmith1024 , this PR should now work with version ~1.0.0 of ldapjs @jfromaniello can you check this over and merge it? Or tag someone who can/will? Thanks! |
@@ -1,6 +1,6 @@ | |||
{ | |||
"name": "passport-windowsauth", | |||
"version": "0.5.0", | |||
"version": "0.6.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't 100% on this version number. If you want something else let me know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC, semver has cautions about anything below 1.0.0 that it's still in active development/experimental and the api/interface can change often. So unless the original author decides to release this as v1.0.0, I think it's totally fine. In all honesty, I think the author should be adjusting the version numbers, but considering the last commit was 10 months ago, it seems pretty unlikely that this will be pulled in anyway.
Thank you all and sorry for the delay. I just merged these changes and released to npm as |
Thanks @jfromaniello ! |
What about the econnreset errors, does someone know where these come from, I have them too, while I never saw any with ldapjs 0.7.x |
I am not sure. All I did was implement what the ldpapjs maintainer said to do in the other linked issue. Capture the error and pass reconnect=true. My guess is the library used to do this behind the scenes. When I checked with our IT team they had Active Directory setup to timeout after 15 minutes. So it seems to me like the new version is acting correctly. |
I agree, I did the same On Fri, Jan 29, 2016 at 6:37 PM, Dustin Smith notifications@github.com
|
Hi, |
Closes #29 by upgrading ldapjs to >0.7.2