[Zope] Externalmount + zeo

bak@nstp.com.my bak@nstp.com.my
Mon, 26 Feb 2001 15:44:11 +0800


hi
my setup
zope2.3.1b1, cvs zeo, and  external mount
i followed this howto
http://www.zope.org/Members/randy/ZEO-Sessions

i got to serve zeo storagewith no problems. i can connect to main ok
but i can't mount external mount.

-according to the howto, i have to create the mount point via the script,=
=20
which i did.  i managed to mount with FileStorage, but not with=20
ZEO.ClientStorage

thefollowing error when i tried the script with ZEO.ClientStorage
--------------------8<------------------------
Python 1.5.2 (#1, Sep 17 1999, 20:15:36)  [GCC egcs-2.91.66 19990314/Linu=
x=20
(egcs- on linux-i386
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import Zope
>>> from App.Extensions import getObject
>>> fn =3D getObject('ExtDB','createDB',0)
>>> fn()
Traceback (innermost last):
  File "<stdin>", line 1, in ?
  File "/home/kdie/Zope/Extensions/ExtDB.py", line 12, in createDB
    return ZODB.DB(Storage)
  File "/home/kdie/Zope/lib/python/ZODB/DB.py", line 155, in __init__
    storage.tpc_begin(t)
  File "/home/kdie/Zope/lib/python/ZEO/ClientStorage.py", line 459, in=20
tpc_begin
    raise ClientDisconnected(
ZEO.ClientStorage.ClientDisconnected: This action is temporarily=20
unavailable.<p>>
----------------------end-----------------

and these in the ZEO_EVENTS.log
-----------------8<--------------------------
2001-02-26T07:20:27 INFO(0) zdaemon zdaemon: Mon Feb 26 15:20:27 2001:=20
Houston, we have forked
------
2001-02-26T07:20:28 INFO(0) ZEO Server Serving main:   =20
<ZODB.FileStorage.FileStorage instance at 8237650>
------
2001-02-26T07:20:28 INFO(0) ZEO Server Serving poll:   =20
<ZODB.BerkeleyStorage.SleepyStorage instance at 8237c48>
------
2001-02-26T07:20:53 INFO(0) ZEO Server Connect 136439344 ''
------
2001-02-26T07:21:14 INFO(0) ZEO Server Connect 135566064 ''
------
2001-02-26T07:21:14 INFO(0) ZEO Server Close 135566064
------
2001-02-26T07:21:14 ERROR(200) ZEO uncaptured python exception, closing=20
channel <ZEOConnection connected at 81492f0> (exceptions.TypeError:len() =
of=20
unsized object [/home/kdie/Zope-2.3.0-src/ZServer/medusa/asyncore.py|poll=
|83]=20
[/home/kdie/Zope-2.3.0-src/ZServer/medusa/asyncore.py|handle_read_event|3=
35]=20
[lib/python/ZEO/smac.py|handle_read|148]=20
[lib/python/ZEO/StorageServer.py|message_input|263]=20
[lib/python/ZEO/StorageServer.py|get_info|315])
------
2001-02-26T07:21:14 INFO(0) ZEO Server Close 135566064
------
2001-02-26T07:21:14 INFO(0) ZEO Server Connect 135563736 ''
------
2001-02-26T07:21:16 INFO(0) ZEO Server Close 135563736
------
2001-02-26T07:21:16 INFO(0) ZEO Server Close 136439344
------------------------end--------------------

my ZSS ($zopedir/lib/python/ZEO/StorageConfig.py)
-----------------8<------------------
import ZODB.FileStorage, ZODB.BerkeleyStorage
main_storage=3D ZODB.FileStorage.FileStorage('/home/kdie/Zope/var/Data.fs=
')
poll_storage =3D=20
ZODB.BerkeleyStorage.SleepyStorage('/home/kdie/Zope/var/poll.fs')=20
-------------end----------------------

my start_zeo
----------------8<-------------------------------
#!/bin/sh
reldir=3D`dirname $0`
exec python $reldir/lib/python/ZEO/start.py -S=20
main=3DStorageConfig:main_storage -S poll=3DStorageConfig:poll_storage -U=
=20
'/home/kdie/Zope/var/zeo.soc'\
  ZEO_SERVER_PID=3D$reldir/var/ZEO_SERVER.pid \
  STUPID_LOG_FILE=3D$reldir/var/ZEO_EVENTS.log \
  "$@"                                            =20
-------------------end--------------------------

my custom_zodb.py
----------8<---------------------------------
ZSS_NAME =3D 'ZEOStorage'=20
Storage=3DZEO.ClientStorage.ClientStorage(('/home/kdie/Zope/var/zeo.soc')=
,
                                        name=3DZSS_NAME, storage=3D'main'=
)  =20
------------end-------------------------

my External method to mount Ext mount ($zopedir/Extensions/ExtDB.py)
--------------8<-------------------
import ZODB
from ZEO.ClientStorage import ClientStorage
=20
ZSS_NAME =3D 'poll_storage'                 # Name of the storage being u=
sed
=20
# Now we tell Zope where its storage is:
Storage=3DClientStorage(('/home/kdie/Zope/var/zeo.soc'), name=3DZSS_NAME,=
=20
storage=3D'poll_storage')
def createDB():
        return ZODB.DB(Storage)   =20

thanks !
--=20

http://www.kedai.com.my/kk=20
http://www.kedai.com.my/eZine=20

if you SMELLLLLLL ... what the Rock is cookin