[ZODB-Dev] Trouble with a simple ZEO example.

Jim Fulton jim at zope.com
Wed Jan 9 18:49:04 EST 2008


The POSKey error for object 0 can be ignored. It is normal.  When the  
database is opened for the first time, it tries to load object 0 and  
then creates it if it doesn't exist.  I don't see any other errors in  
your log output from the server.

In your client code, try adding:

   import logging
   logging.getLogger().setLevel(logging.INFO)
   logging.getLogger().addHandler(logging.StreamHandler())

and see if this gives more useful logging info on the client.

Jim


On Jan 9, 2008, at 6:43 PM, Kenneth Miller wrote:

> Sorry for the string of messages, but also:
>
> I've recieved these errors when settings up with the following  
> config files.
>
> zeoserver.conf
>
> <zeo>
> address localhost:8090
> monitor-address localhost:8091
> </zeo>
>
> <filestorage 1>
> path /tmp/Data.fs
> </filestorage>
>
> <eventlog>
> <logfile>
> path /tmp/zeo.log
> format %(asctime)s %(message)s
> </logfile>
> </eventlog>
>
>
> zeoclient.conf
>
> <zeoclient>
> server localhost:8090
> </zeoclient>
>
>
> Error:
>
>
> 2008-01-09T17:33:42 (11338) opening storage '1' using FileStorage
> 2008-01-09T17:33:42 (11338) StorageServer created RW with storages:  
> 1:RW:/tmp/Data.fs
> 2008-01-09T17:33:42 (11338) listening on ('localhost', 8090)
> 2008-01-09T17:33:42 listening on ('localhost', 8091)
> 2008-01-09T17:36:55 (11338) new connection (' 127.0.0.1', 60885):  
> <ManagedServerConnection ('127.0.0.1', 60885)>
> 2008-01-09T17:36:55 (127.0.0.1:60885) received handshake 'Z303'
> 2008-01-09T17:38:52 (127.0.0.1:60885) loadEx() raised exception: 0x00
> Traceback (most recent call last):
>   File "/usr/lib/python2.5/site-packages/ZEO/zrpc/connection.py",  
> line 421, in handle_request
>     ret = meth(*args)
>   File "/usr/lib/python2.5/site-packages/ZEO/StorageServer.py", line  
> 248, in loadEx
>     return self.storage.loadEx(oid, version)
>   File "/usr/lib/python2.5/site-packages/ZODB/FileStorage/ 
> FileStorage.py", line 523, in loadEx
>     pos = self._lookup_pos(oid)
>   File "/usr/lib/python2.5/site-packages/ZODB/FileStorage/ 
> FileStorage.py", line 514, in _lookup_pos
>     raise POSKeyError(oid)
> POSKeyError: 0x00
> 2008-01-09T17:38:53 (11338/127.0.0.1:60885) disconnected
> 2008-01-09T17:38:53 (11338) new connection ('127.0.0.1', 60886):  
> <ManagedServerConnection (' 127.0.0.1', 60886)>
> 2008-01-09T17:38:53 (127.0.0.1:60886) received handshake 'Z303'
> 2008-01-09T17:39:00 (11338/127.0.0.1:60886) disconnected
> 2008-01-09T17:40:45 (11338) terminated by SIGINT
> 2008-01-09T17:40:45 (11338) closing storage '1'
>
> Regards,
> Kenneth Miller
>
>
> On Jan 9, 2008 5:24 PM, Kenneth Miller <xkenneth at gmail.com> wrote:
> Also,
>
>       I've replicated the error on Ubuntu linux.
>
> Here's the server command and output.
>
> xkenneth at xkenneth-desktop:/usr/lib/python2.5/site-packages$  
> python2.5 ZEO/runzeo.py -a localhost:8090 -f /tmp/test.fs
> ------
> 2008-01-09T17:19:38 INFO ZEO.runzeo (6138) opening storage '1' using  
> FileStorage
> ------
> 2008-01-09T17:19:38 INFO ZEO.StorageServer (6138) StorageServer  
> created RW with storages: 1:RW:/tmp/test.fs
> ------
> 2008-01-09T17:19:38 INFO ZEO.zrpc (6138) listening on ('localhost',  
> 8090)
> ------
> 2008-01-09T17:20:41 INFO ZEO.StorageServer (6138) new connection  
> ('127.0.0.1', 37523): <ManagedServerConnection (' 127.0.0.1 ', 37523)>
> ------
> 2008-01-09T17:20:41 INFO ZEO.zrpc.Connection(S) (127.0.0.1:37523)  
> received handshake 'Z303'
> ------
> 2008-01-09T17:20:53 INFO ZEO.zrpc.Connection(S) (127.0.0.1:37523)  
> loadEx() raised exception: 0x00
> Traceback (most recent call last):
>   File "/usr/lib/python2.5/site-packages/ZEO/zrpc/connection.py",  
> line 421, in handle_request
>     ret = meth(*args)
>   File "/usr/lib/python2.5/site-packages/ZEO/StorageServer.py", line  
> 248, in loadEx
>     return self.storage.loadEx(oid, version)
>   File "/usr/lib/python2.5/site-packages/ZODB/FileStorage/ 
> FileStorage.py", line 523, in loadEx
>     pos = self._lookup_pos(oid)
>   File "/usr/lib/python2.5/site-packages/ZODB/FileStorage/ 
> FileStorage.py", line 514, in _lookup_pos
>     raise POSKeyError(oid)
> POSKeyError: 0x00
> ------
> 2008-01-09T17:20:53 INFO ZEO.StorageServer (6138/127.0.0.1:37523)  
> disconnected
> ------
> 2008-01-09T17:20:53 INFO ZEO.StorageServer (6138) new connection ('  
> 127.0.0.1', 37524): <ManagedServerConnection ('127.0.0.1', 37524)>
> ------
> 2008-01-09T17:20:53 INFO ZEO.zrpc.Connection(S) ( 127.0.0.1:37524)  
> received handshake 'Z303'
>
> And here's the client input and error:
>
> xkenneth at xkenneth-desktop :/usr/lib/python2.5/site-packages$ python2.5
> Python 2.5.1 (r251:54863, May  2 2007, 16:56:35)
> [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from ZEO import ClientStorage
> >>> from ZODB import DB
> >>> storage = ClientStorage.ClientStorage(('localhost',8090))
> >>> db = DB( storage )
> No handlers could be found for logger "ZEO.zrpc"
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/usr/lib/python2.5/site-packages/ZODB/DB.py", line 238, in  
> __init__
>     storage.load(z64,'')
>   File "/usr/lib/python2.5/site-packages/ZEO/ClientStorage.py", line  
> 746, in load
>     return self.loadEx(oid, version)[:2]
>   File "/usr/lib/python2.5/site-packages/ZEO/ClientStorage.py", line  
> 769, in loadEx
>     data, tid, ver = self._server.loadEx(oid, version)
>   File "/usr/lib/python2.5/site-packages/ZEO/ServerStub.py", line  
> 192, in loadEx
>     return self.rpc.call("loadEx", oid, version)
>   File "/usr/lib/python2.5/site-packages/ZEO/zrpc/connection.py",  
> line 531, in call
>     r_flags, r_args = self.wait(msgid)
>   File "/usr/lib/python2.5/site-packages/ZEO/zrpc/connection.py",  
> line 621, in wait
>     raise DisconnectedError()
> ZEO.zrpc.error.DisconnectedError
>
>
> Any help would be greatly appreciated.
>
> Regards,
> Kenneth Miller
>
> On Jan 9, 2008 5:03 PM, Kenneth Miller < xkenneth at gmail.com > wrote:
> I applied the patch succesfully, but still recieved the same error.
>
> How can i retrieve the log of the zeo process?
>
> Regards,
> Kenneth Miller
>
> On Jan 9, 2008, at 4:52 PM, Paolo Losi wrote:
>
> > You are maybe being bite by bug https://bugs.launchpad.net/zodb/+bug/135108
> > even if, in my case, it was unix socket instead of tcp socket.
> >
> > Could you please try to apply the patch
> > http://launchpadlibrarian.net/10338640/patch.diff
> > and report back?
> >
> > It would be very useful to have the log of zeo process as well.
> >
> > Paolo
> >
> > Kenneth Miller wrote:
> >> All,
> >> I hope this is the right mailing list for newbie help.
> >> I'm trying to get a basic example of ZEO running for an example,
> >> here's what I've tried so far.
> >> I've installed python2.5 and ZODB/Zeo with MacPorts (Mac OS X
> >> 10.5.1).
> >> To start the zeo server with a temporary filesystem, i've issued
> >> this command:
> >> python2.5 ZEO/runzeo.py -a localhost:8090 -f /tmp/test.fs
> >> To connect to the zeo server i've entered the following commands
> >> and received the following error:
> >> Python 2.5.1 (r251:54863, Oct  5 2007, 21:08:09)
> >> [GCC 4.0.1 (Apple Inc. build 5465)] on darwin
> >> Type "help", "copyright", "credits" or "license" for more
> >> information.
> >> >>> from ZEO import ClientStorage
> >> >>> from ZODB import DB
> >> >>>
> >> >>> storage = ClientStorage.ClientStorage( ('localhost', 8090) )
> >> >>> db = DB( storage )
> >> No handlers could be found for logger " ZEO.zrpc "
> >> Traceback (most recent call last):
> >>  File "<stdin>", line 1, in <module>
> >>  File "/Library/Python/2.5/site-packages/ZODB3-3.7.2-py2.5-
> >> macosx-10.5-i386.egg /ZODB/DB.py", line 246, in __init__
> >>    storage.load(z64,'')
> >>  File "/Library/Python/2.5/site-packages/ZODB3-3.7.2-py2.5-
> >> macosx-10.5-i386.egg/ZEO/ClientStorage.py", line 727, in load
> >>    return self.loadEx(oid, version)[:2]
> >>  File "/Library/Python/2.5/site-packages/ZODB3-3.7.2-py2.5-
> >> macosx-10.5-i386.egg/ZEO/ClientStorage.py", line 750, in loadEx
> >>    data, tid, ver = self._server.loadEx(oid, version)
> >>  File "/Library/Python/2.5/site-packages/ZODB3-3.7.2-py2.5-
> >> macosx-10.5-i386.egg/ZEO/ServerStub.py", line 196, in loadEx
> >>    return self.rpc.call("loadEx", oid, version)
> >>  File "/Library/Python/2.5/site-packages/ZODB3-3.7.2-py2.5-
> >> macosx-10.5-i386.egg/ZEO/zrpc/connection.py", line 645, in call
> >>    r_flags, r_args = self.wait(msgid)
> >>  File "/Library/Python/2.5/site-packages/ZODB3- 3.7.2-py2.5-
> >> macosx-10.5-i386.egg/ZEO/zrpc/connection.py", line 735, in wait
> >>    raise DisconnectedError()
> >> ZEO.zrpc.error.DisconnectedError
> >> I've expiremented with ZODB itself on a standalone FS, and gotten
> >> that to work successfully. I'd really like to use ZEO, so any help
> >> would be appreciated.
> >> Regards,
> >> Kenneth Miller
> >> _______________________________________________
> >> For more information about ZODB, see the ZODB Wiki:
> >> http://www.zope.org/Wikis/ZODB/
> >> ZODB-Dev mailing list  -   ZODB-Dev at zope.org
> >> http://mail.zope.org/mailman/listinfo/zodb-dev
> >
>
>
>
> _______________________________________________
> For more information about ZODB, see the ZODB Wiki:
> http://www.zope.org/Wikis/ZODB/
>
> ZODB-Dev mailing list  -  ZODB-Dev at zope.org
> http://mail.zope.org/mailman/listinfo/zodb-dev

--
Jim Fulton
Zope Corporation




More information about the ZODB-Dev mailing list