如何在ZEO中使用ClientStorage?

时间:2011-10-28 09:13:37

标签: python zodb

您好,我需要使用ZEO服务器上的帮助。

首先,ZEO以'zeoctl -C /etc/zeo.conf start'开头,开始成功。 /etc/zeo.conf的内容:

<zeo>
  address ip.ip.ip.ip:9000
  read-only false
  invalidation-queue-size 100
</zeo>
<filestorage 1>
path /var/tmp/Data.fs
</filestorage>
<eventlog>
<logfile>
path /var/tmp/zeo.log
format %(asctime)s %(message)s
</logfile>
</eventlog>
<runner>
program runzeo -C /etc/zeo.conf
</runner>

问题,当我连接ZEO时,例如:

from ZEO import ClientStorage
from ZODB import DB
import transaction
import ZEO.zrpc.client

addr = ('ip', 9000)
storage = ClientStorage.ClientStorage(addr)
...

它会抛出异常:

error: uncaptured python exception, closing channel <select-trigger (pipe) at 972880c> (<type 'exceptions.OSError'>:[Errno 11] Resource temporarily unavailable [/usr/lib/python2.6/asyncore.py|read|74] [/usr/lib/python2.6/asyncore.py|handle_read_event|413] [/usr/lib/python2.6/site-packages/ZODB3-3.10.3-py2.6-linux-i686.egg/ZEO/zrpc/trigger.py|handle_read|117] [/usr/lib/python2.6/asyncore.py|recv|362] [/usr/lib/python2.6/asyncore.py|recv|588])

为什么呢?谁能帮我?感谢。

记录内容:

[root@localhost tmp]# tail -f zeo.log 
2011-10-28T20:03:44 new connection ('::ffff:127.0.0.1', 50991): <ManagedServerConnection ('::ffff:127.0.0.1', 50991)>
2011-10-28T20:03:44 new connection ('::ffff:127.0.0.1', 50992): <ManagedServerConnection ('::ffff:127.0.0.1', 50992)>
2011-10-28T20:03:44 new connection ('::ffff:127.0.0.1', 50993): <ManagedServerConnection ('::ffff:127.0.0.1', 50993)>
2011-10-28T20:03:54 (unconnected) disconnected
2011-10-28T20:04:23 new connection ('::ffff:127.0.0.1', 50994): <ManagedServerConnection ('::ffff:127.0.0.1', 50994)>
2011-10-28T20:04:23 new connection ('::ffff:127.0.0.1', 50995): <ManagedServerConnection ('::ffff:127.0.0.1', 50995)>
2011-10-28T20:04:23 new connection ('::ffff:127.0.0.1', 50996): <ManagedServerConnection ('::ffff:127.0.0.1', 50996)>
2011-10-28T20:04:24 new connection ('::ffff:127.0.0.1', 50997): <ManagedServerConnection ('::ffff:127.0.0.1', 50997)>
2011-10-28T20:04:24 new connection ('::ffff:127.0.0.1', 50998): <ManagedServerConnection ('::ffff:127.0.0.1', 50998)>
2011-10-28T20:04:24 new connection ('::ffff:127.0.0.1', 50999): <ManagedServerConnection ('::ffff:127.0.0.1', 50999)>
2011-10-28T20:04:33 (unconnected) disconnected
2011-10-28T20:04:34 (unconnected) disconnected
2011-10-28T20:04:44 new connection ('::ffff:127.0.0.1', 51000): <ManagedServerConnection ('::ffff:127.0.0.1', 51000)>
2011-10-28T20:04:44 new connection ('::ffff:127.0.0.1', 51001): <ManagedServerConnection ('::ffff:127.0.0.1', 51001)>
2011-10-28T20:04:44 new connection ('::ffff:127.0.0.1', 51002): <ManagedServerConnection ('::ffff:127.0.0.1', 51002)>
2011-10-28T20:04:54 (unconnected) disconnected
2011-10-28T20:05:23 new connection ('::ffff:127.0.0.1', 51004): <ManagedServerConnection ('::ffff:127.0.0.1', 51004)>
2011-10-28T20:05:23 new connection ('::ffff:127.0.0.1', 51005): <ManagedServerConnection ('::ffff:127.0.0.1', 51005)>
2011-10-28T20:05:23 new connection ('::ffff:127.0.0.1', 51006): <ManagedServerConnection ('::ffff:127.0.0.1', 51006)>
2011-10-28T20:05:25 new connection ('::ffff:127.0.0.1', 51007): <ManagedServerConnection ('::ffff:127.0.0.1', 51007)>
2011-10-28T20:05:25 new connection ('::ffff:127.0.0.1', 51008): <ManagedServerConnection ('::ffff:127.0.0.1', 51008)>
2011-10-28T20:05:25 new connection ('::ffff:127.0.0.1', 51009): <ManagedServerConnection ('::ffff:127.0.0.1', 51009)>
2011-10-28T20:05:45 new connection ('::ffff:127.0.0.1', 51010): <ManagedServerConnection ('::ffff:127.0.0.1', 51010)>
2011-10-28T20:05:45 new connection ('::ffff:127.0.0.1', 51011): <ManagedServerConnection ('::ffff:127.0.0.1', 51011)>
2011-10-28T20:05:45 new connection ('::ffff:127.0.0.1', 51012): <ManagedServerConnection ('::ffff:127.0.0.1', 51012)>

0 个答案:

没有答案