[ZODB-Dev] ZEO authentication

Nitro nitro at dr-code.org
Mon Jun 14 20:49:45 EDT 2010

Am 14.06.2010, 15:50 Uhr, schrieb Jim Fulton <jim at zope.com>:

> On Sat, Jun 12, 2010 at 9:17 PM, Nitro <nitro at dr-code.org> wrote:
>> Hello,
>> I am using ZEO authentication. When I try to login with the proper
>> credentials (everything works just fine. If I try to login with the  
>> wrong
>> credentials, I get a traceback like shown below. However, the code  
>> trying
>> to establish the connection (in my case databaseFromConfig) never  
>> returns,
>> instead the client tries to reconnect over and over again. Of course
>> reconnecting will always fail since the credentials stay wrong.
>> I can't display a message to the user that his login attempt failed,
>> because I never receive an exception in the code that tried to establish
>> the connection.
>> Is this a bug?
> It is a miss-feature.  The assumption is that failures are transient and
> that the client should retry indefinitely. After all, your client might  
> have
> correct credentials and the server's configuration may be wrong. :)

Ehehe, I guess everything is relative -- except me :)

>> Or is there another method to detect that a connection has
>> failed because of authentication?
> You can supply a false wait option and then test yourself for a
> successful connection.
> There's also a timeout option, but it doesn't work as most people
> would suspect.  That could easily be called a bug.

Thanks for this answer, Jim. I'll try using the false wait option.


More information about the ZODB-Dev mailing list