[ZODB-Dev] Zope2.7.0a1(win32) got problem connecting to ZEO storages without the lastTrasaction() method

zhimin at iss.nus.edu.sg zhimin at iss.nus.edu.sg
Tue Jul 8 17:12:37 EDT 2003


Hello,

My setup is Zope 2.7.0a1 (win32) as ZEO client, ZEO from Zope 2.7.0a1 as
ZEO server, and DBTab for ZEO client to mount db from ZEO server.

ZEO is configured to serve FileStorage, MappingStorage and
BDBMinimalStorage, see zeo.conf below. Zope fails to connect to ZEO because
ZEO/Zope raises an error: "AttributeError: BDBMinimalStorage instance has
no attribute 'lastTransaction' ", and Zope just keeps retrying the
connection. TemporaryStorage also gives the same "no attribute
'lastTransaction'" problem when it is served thru ZEO (by modifying
ZODB/component.xml and ZODB/config.py files so that I can use zeo.conf to
serve it).

ZEO log file (zeo.log) is also attached below.  Note that zeoLoad() raises
a KeyError when ZEO client is connecting to the MappingStorage.

Anyone knows how to fix it? I wonder if there are other storages that will
give the same problem.

Thanks!
from
Zhi Min


=====   zeo.conf   =====

# ZEO configuration file
%define INSTANCE_HOME C:\zope27a1-ZEO
<zeo>
  address 9001
  read-only false
  invalidation-queue-size 100
  # monitor-address PORT
  # transaction-timeout SECONDS
</zeo>

<filestorage main>
  path $INSTANCE_HOME/var/Data.fs
</filestorage>

<mappingstorage session>
  name ses
</mappingstorage>

<minimalstorage bdb>
  name $INSTANCE_HOME/var/bdb
</minimalstorage>

<eventlog>
  level info
  <logfile>
    path $INSTANCE_HOME/log/zeo.log
  </logfile>
</eventlog>



=====   zeo.log   =====
(starts from ZEO startup, thru ZEO client trying to connect, till ZEO
client is shutdown)

------
2003-07-08T15:05:38 INFO(0) RUNSVR opening storage 'main' using FileStorage
------
2003-07-08T15:05:38 INFO(0) RUNSVR opening storage 'session' using
MappingStorage
------
2003-07-08T15:05:38 INFO(0) RUNSVR opening storage 'bdb' using
BDBMinimalStorage
------
2003-07-08T15:05:38 INFO(0) BDBMinimalStorage Creating Berkeley environment
------
2003-07-08T15:05:38 INFO(0) BDBMinimalStorage Berkeley environment dir: C:
\zope27a1-ZEO\var\bdb
------
2003-07-08T15:05:38 INFO(0) BDBMinimalStorage setting up threads
------
2003-07-08T15:05:38 INFO(0) BDBMinimalStorage checkpointing thread started
------
2003-07-08T15:05:38 INFO(0) BDBMinimalStorage running checkpointing
------
2003-07-08T15:05:38 INFO(0) BDBMinimalStorage ready
------
2003-07-08T15:05:38 INFO(0) ZSS:1288 StorageServer created RW with
storages: session:RW:ses, main:RW:C:\zope27a1-ZEO/var/Data.fs, bdb:RW:C:
\zope27a1-ZEO\var\bdb
------
2003-07-08T15:05:38 INFO(0) zrpc:1288 listening on ('', 9001)
------
2003-07-08T15:06:04 INFO(0) ZSS:1288 new connection ('127.0.0.1', 1936):
<ManagedServerConnection ('127.0.0.1', 1936)>
------
2003-07-08T15:06:04 INFO(0) zrpc-conn:127.0.0.1:1936 received handshake
'Z201'
------
2003-07-08T15:06:04 INFO(0) zrpc-conn:127.0.0.1:1936 zeoLoad() raised
exception:
Traceback (most recent call last):
  File "C:\Program Files\Zope-2.7.0-a1\lib\python\ZEO\zrpc\connection.py",
line 260, in handle_request
    ret = meth(*args)
  File "C:\Program Files\Zope-2.7.0-a1\lib\python\ZEO\StorageServer.py",
line 247, in zeoLoad
    p, s = self.storage.load(oid, '')
  File "C:\Program Files\Zope-2.7.0-a1\lib\python\ZODB\MappingStorage.py",
line 56, in load
    p = self._index[oid]
KeyError:
------
2003-07-08T15:06:04 INFO(0) ZSS:1288/127.0.0.1:1936 Transaction released
storage lock
------
2003-07-08T15:06:04 INFO(0) ZSS:1288 new connection ('127.0.0.1', 1938):
<ManagedServerConnection ('127.0.0.1', 1938)>
------
2003-07-08T15:06:04 INFO(0) zrpc-conn:127.0.0.1:1938 received handshake
'Z201'
------
2003-07-08T15:06:04 INFO(0) zrpc-conn:127.0.0.1:1938 register() raised
exception: BDBMinimalStorage instance has no attribute 'lastTransaction'
Traceback (most recent call last):
  File "C:\Program Files\Zope-2.7.0-a1\lib\python\ZEO\zrpc\connection.py",
line 260, in handle_request
    ret = meth(*args)
  File "C:\Program Files\Zope-2.7.0-a1\lib\python\ZEO\StorageServer.py",
line 216, in register
    self.setup_delegation()
  File "C:\Program Files\Zope-2.7.0-a1\lib\python\ZEO\StorageServer.py",
line 160, in setup_delegation
    self.lastTransaction = self.storage.lastTransaction
AttributeError: BDBMinimalStorage instance has no attribute
'lastTransaction'
------
2003-07-08T15:06:04 INFO(0) ZSS:1288/127.0.0.1:1938 disconnected
------
2003-07-08T15:06:09 INFO(0) ZSS:1288 new connection ('127.0.0.1', 1940):
<ManagedServerConnection ('127.0.0.1', 1940)>
------
2003-07-08T15:06:09 INFO(0) zrpc-conn:127.0.0.1:1940 received handshake
'Z201'
------
2003-07-08T15:06:09 INFO(0) zrpc-conn:127.0.0.1:1940 register() raised
exception: BDBMinimalStorage instance has no attribute 'lastTransaction'
Traceback (most recent call last):
  File "C:\Program Files\Zope-2.7.0-a1\lib\python\ZEO\zrpc\connection.py",
line 260, in handle_request
    ret = meth(*args)
  File "C:\Program Files\Zope-2.7.0-a1\lib\python\ZEO\StorageServer.py",
line 216, in register
    self.setup_delegation()
  File "C:\Program Files\Zope-2.7.0-a1\lib\python\ZEO\StorageServer.py",
line 160, in setup_delegation
    self.lastTransaction = self.storage.lastTransaction
AttributeError: BDBMinimalStorage instance has no attribute
'lastTransaction'
------
2003-07-08T15:06:09 INFO(0) ZSS:1288/127.0.0.1:1940 disconnected






More information about the ZODB-Dev mailing list