[Zope-ZEO] ZEO Readme
Nuno Simoes
nuno.simoes@ruido-visual.pt
Wed, 27 Sep 2000 11:03:35 +0100
Jim Fulton wrote:
> Nuno Simoes wrote:
[...]
> > - It seems to be impossible to use the declaration of two FileStorages
> > in one *.py file. You have to write to *.py files, one for each *.fs,
> > like this:
> >
> > [store.py]
> > import ZODB.FileStorage
> > News=ZODB.FileStorage.FileStorage('/usr/local/zope/Zope-2.2.2-linux2-x86-server/var/News.fs',read_only=1)
> >
> > [data.py]
> > import ZODB.FileStorage
> > Dados=ZODB.FileStorage.FileStorage('/usr/local/zope/Zope-2.2.2-linux2-x86-server/var/Data.fs')
> >
> > $./start_zeo -SDados=./data:Dados -SNews=./store:News
>
> No, you can put them in the same module, as in:
>
> [data.py]
> import ZODB.FileStorage
> Dados=ZODB.FileStorage.FileStorage(
> '/usr/local/zope/Zope-2.2.2-linux2-x86-server/var/Data.fs'
> )
> News=ZODB.FileStorage.FileStorage(
> '/usr/local/zope/Zope-2.2.2-linux2-x86-server/var/News.fs',
> read_only=1)
>
> $./start_zeo -SDados=./data:Dados -SNews=./data:News
>
> Note that there was a bug in ZEO 0.2.3 (and earlier).
> This was fixed in 0.4.0.
I'm using ZEO 0.4.1 + Zope 2.2.2 .
No, your "data.py" doesn't seems to work. It gives me this errors:
[Storage Server]
[root@maomorta Zope-2.2.2-linux2-x86-server]# Traceback (innermost
last):
File "./lib/python/ZEO/start.py", line 315, in ?
if __name__=='__main__': main(sys.argv)
File "./lib/python/ZEO/start.py", line 312, in main
asyncore.loop()
File
"/usr/local/zope/Zope-2.2.2-linux2-x86-server/ZServer/medusa/asyncore.py",
line 138, in loop
poll_fun (timeout, map)
File
"/usr/local/zope/Zope-2.2.2-linux2-x86-server/ZServer/medusa/asyncore.py",
line 79, in poll
obj.handle_error()
File
"/usr/local/zope/Zope-2.2.2-linux2-x86-server/ZServer/medusa/asyncore.py",
line 357, in handle_error
self.close()
File "./lib/python/ZEO/StorageServer.py", line 238, in close
self.tpc_abort(t.id)
File "./lib/python/ZEO/StorageServer.py", line 451, in tpc_abort
r=self.__storage.tpc_abort(t)
File
"/usr/local/zope/Zope-2.2.2-linux2-x86-server/lib/python/ZODB/BaseStorage.py",
line 157, in tpc_abort
self._abort()
File
"/usr/local/zope/Zope-2.2.2-linux2-x86-server/lib/python/ZODB/FileStorage.py",
line 788, in _abort
if self._nextpos: self._file.truncate(self._nextpos)
AttributeError: _nextpos
[Client]
[root@maomorta Zope-2.2.2-linux2-x86-client]# ./start
[root@maomorta Zope-2.2.2-linux2-x86-client]# Traceback (innermost
last):
File "/usr/local/zope/Zope-2.2.2-linux2-x86-client/z2.py", line 554,
in ?
exec "import "+MODULE in {}
File "<string>", line 1, in ?
File
"/usr/local/zope/Zope-2.2.2-linux2-x86-client/lib/python/Zope/__init__.py",
line 144, in ?
OFS.Application.initialize(c)
File
"/usr/local/zope/Zope-2.2.2-linux2-x86-client/lib/python/OFS/Application.py",
line 363, in initialize
get_transaction().commit()
File
"/usr/local/zope/Zope-2.2.2-linux2-x86-client/lib/python/ZODB/Transaction.py",
line 250, in commit
j.tpc_begin(self)
File
"/usr/local/zope/Zope-2.2.2-linux2-x86-client/lib/python/ZODB/Connection.py",
line 524, in tpc_begin
self._storage.tpc_begin(transaction)
File
"/usr/local/zope/Zope-2.2.2-linux2-x86-client/lib/python/ZEO/ClientStorage.py",
line 458, in tpc_begin
try: r=self._call(self.__begin, id, user, desc, ext)
File
"/usr/local/zope/Zope-2.2.2-linux2-x86-client/lib/python/ZEO/zrpc.py",
line 194, in __call__
if type(r) is TupleType: raise r[0], r[1]
AttributeError: 'None' object has no attribute 'seek'
> > [custom_zodb.py]
> > import ZEO.ClientStorage
> > Storage=ZEO.ClientStorage.ClientStorage(('192.168.0.128',2000),name="ZEO
> > Storage", storage='News')
>
> I'm not sure what you are trying to say here.
This is the custom_zodb.py of my ZEO client.
Nuno Simões,
Ruido Visual,
P.s. - Sorry about the extensive cut&paste.