[ZODB-Dev] Re: [Zope-dev] Zope 2.5.0b4 problems w/ ZEO
Matthew T. Kromer
matt@zope.com
Tue, 15 Jan 2002 15:58:44 -0500
Andrew Sydelko wrote:
>Trying to start a ZEO client using Zope 2.5.0b4 doesn't
>work:
>
>------
>2002-01-15T20:13:20 INFO(0) client Trying to connect to server: ('192.168.1.52', 8900)
>------
>2002-01-15T20:13:20 INFO(0) ClientStorage Connected to storage
>------
>2002-01-15T20:13:20 ERROR(200) ZODB Couldn't load state for '\x00\x00\x00\x00\x00\x00\x00\x02'
>Traceback (innermost last):
> File /data/www/Zope.8/src/Zope-2.5.0b4-src/lib/python/ZODB/Connection.py, line 471, in setstate
>TypeError: ('__init__() takes exactly 3 arguments (1 given)', <extension class Products.Sessions.SessionDataManager.SessionDataManagerTraverser at 88ba2f8>, ())
>
>------
>2002-01-15T20:13:20 PANIC(300) z2 Startup exception
>------
>2002-01-15T20:13:20 ERROR(200) ZODB Couldn't load state for '\x00\x00\x00\x00\x00\x00\x00\x02'
>Traceback (innermost last):
> File /data/www/Zope.8/src/Zope-2.5.0b4-src/lib/python/ZODB/Connection.py, line 471, in setstate
>TypeError: ('__init__() takes exactly 3 arguments (1 given)', <extension class Products.Sessions.SessionDataManager.SessionDataManagerTraverser at 88ba2f8>, ())
>
>Traceback (innermost last):
> File /data/www/Zope.8/Zope/z2.py, line 495, in ?
> File <string>, line 1, in ?
> File /data/www/Zope.8/src/Zope-2.5.0b4-src/lib/python/Zope/__init__.py, line 71, in ?
> File /data/www/Zope.8/src/Zope-2.5.0b4-src/lib/python/OFS/Application.py, line 245, in initialize
> File /data/www/Zope.8/src/Zope-2.5.0b4-src/lib/python/ZODB/Connection.py, line 471, in setstate
>TypeError: ('__init__() takes exactly 3 arguments (1 given)', <extension class Products.Sessions.SessionDataManager.SessionDataManagerTraverser at 88ba2f8>, ())
>
>------
>2002-01-15T20:13:21 PROBLEM(100) zdaemon zdaemon: Tue Jan 15 15:13:21 2002: The kid, 12557, died on me.
>
>
>Any ideas or suggestions?
>
>--andy.
>
Hi Andy,
in this particular case, ZEO is a red herring... In beta 4 (and
curiously, not on the HEAD--I'm sure I'll hear a "mea maxima culpa" soon
from someone) the base class for the SessionDataManagerTraverser was
made to be a persistent object. Since the base class changed, the ZODB
is now having fits trying to reconcile the change in base classes.
Since the session data manager object gets created automatically by Zope
when it doesn't exist at system startup, you can make a new one (which
inherits from Persistent) by:
1) Edit .../Products/Sessions/SessionDataManager and change the
SessionDataManagerTraverser to not be persistent by duplicating the
class line, commenting out one, and removing the Persistent word from
the other
2) Restart Zope
3) Delete the session data manager from the root object
4) Stop Zope
5) Undo the editing change you did in step 1
6) Restart Zope
The problem will now have been addressed in the ZODB. HOWEVER, since
you mention you are running ZEO, all clients will have to have the same
code base to be able to function. You won't be able to do this without
upgrading all of your code at the same time.