[Zope-ZEO] "Connection refused" error message
Greg Ward
gward@mems-exchange.org
Wed, 10 May 2000 15:21:31 -0400
With ZEO 0.1, if I try to open a ClientStorage to a bogus host or port,
I got fairly obvious error report:
[...]
File "/www/zope/Zope-2.1.5/lib/python/ZEO/ClientStorage.py", line 78, in __init__
self._call=zrpc.syncRPC(connection)
File "/www/zope/Zope-2.1.5/lib/python/ZEO/zrpc.py", line 65, in __init__
s.connect(host, port)
socket.error: (146, 'Connection refused')
(It could be argued that someone somewhere should catch socket.error and
do a sys.exit() with the error message, but that's a minor concern.)
Now, with ZEO 0.2, the error report is far from obvious:
[...]
File "/export/www/zope/Zope-2.2cvs/lib/python/ZODB/DB.py", line 135, in __init__
File "/www/zope/Zope-2.2cvs/lib/python/ZEO/ClientStorage.py", line 378, in tpc_begin
try: r=self._call(self.__begin, id, user, desc, ext)
File "/www/zope/Zope-2.2cvs/lib/python/ZEO/zrpc.py", line 181, in __call__
self.message_output(args)
File "lib/python/ZEO/smac.py", line 185, in message_output
ZEO.smac.Disconnected: This action is temporarily unavailable.<p>
And not only is the error message far from useful, it's got a bit of
HTML in it -- yuck!! ZODB: it's not just for Zope anymore. ;-)
Anyways, I assume this is related to the new "resilient client"
feature. I would hardly argue against that feature, it sounds like a
big win. But a clearer error message would be nice!
Greg
--
Greg Ward - software developer gward@mems-exchange.org
MEMS Exchange / CNRI voice: +1-703-262-5376
Reston, Virginia, USA fax: +1-703-262-5367