28 Jul 22:38
Re: parallelized external authentication
Jesse Thompson <jesse.thompson <at> doit.wisc.edu>
2010-07-28 20:38:10 GMT
2010-07-28 20:38:10 GMT
On 07/28/2010 02:29 PM, Badlop wrote: > 2010/7/19 Jesse Thompson<jesse.thompson <at> doit.wisc.edu>: >> I implemented a patch for extauth.erl so that it is capable of spawning >> multiple scripts for any given domain. >> >> I laid out the details on this blog. >> >> http://zjt.blogspot.com/2010/07/ejabberd-parallelized-external-script.html >> >> Comments and suggestions are welcome. > > > New ticket: > https://support.process-one.net/browse/EJAB-1280 Cool! > I applied your patch to ejabberd 2.0.5, and tested with check_pass_null.pl > > Suggestion: > You exported some functions, but that seems unnecessary. I mistakenly thought that export was required even within the lexical scope. > Bug: > There is some problem getting the proper Num when handling an auth request. > The number is correctly got when starting ejabberd, because I see the > proper number of scripts running. > > When I configure extauth_n to 3, I get approximately 1 error out of > every 3 login attempts: > ... > ** Reason for termination = > ** {badarg,[{extauth,call_port,2}, > {ejabberd_auth,check_password_loop,2}, > {ejabberd_c2s,wait_for_auth,2}, > > When configured to 2, i get approximately 50% of failed attempts. > When configured to 1 or not configured, all connection attempts fail > with that error. Thanks. My code was assuming that random:uniform returned between 0 and N-1, instead of 1 and N > Comment: > You were telling a nice story: >> ejabberd's external authentication mechanism [...] is serial. >> this is a problem for us >> I'm a Perl developer >> I eventually figured out enough Erlang >> Here is the diff. >> ... >> I haven't put this into production > > Oh, why doesn't your story have a happy ending? Yet.I will hopefully have this installed in production within a few weeks. I guess it was good that I waited since it would appear that you found a critical bug in my code. Jesse > > > --- > Badlop > ProcessOne > _______________________________________________ > ejabberd mailing list > ejabberd <at> jabber.ru > http://lists.jabber.ru/mailman/listinfo/ejabberd
_______________________________________________ ejabberd mailing list ejabberd <at> jabber.ru http://lists.jabber.ru/mailman/listinfo/ejabberd
I will hopefully have this installed in production within a
few weeks.
I guess it was good that I waited since it would appear that you found a
critical bug in my code.
Jesse
>
>
> ---
> Badlop
> ProcessOne
> _______________________________________________
> ejabberd mailing list
> ejabberd <at> jabber.ru
>
RSS Feed