Watching Zope

by John Samuel Anderson last modified Jan 15, 2009 09:33 PM
Zope reacts to this bug via a web request.

Catching the Bug

In order to see this bug in our "instance fg" window, the request must come via HTTP.  There aforementioned "wget" solution does this at the command-line.  It can also be done manually, via a web browser.  (Fortunately, the ZMI already has a Database packing tool, so we'll use that.)

Sending the Request via the ZMI

 

With the terminal window open, so that we can see Zope's reaction, these are the steps:
  1. Open a web browser to the ZMI.
  2. Navigate to Control Panel > Database management > main.
  3. Enter the value 7 and click "Pack."

The Bug, as seen in the ZMI

 

After about 10 minutes, the ZMI returns with:

Site Error

An error was encountered while publishing this resource.

Error Type: TypeError
Error Value: Odd-length string


The Bug, as seen in on the server:

The terminal window shows much more detail:

2009-01-12 11:51:15 ERROR ZODB.DB packing
Traceback (most recent call last):
  File "/var/Plone/eggs/ZODB3-3.8.1b7-py2.4-linux-x86_64.egg/ZODB/DB.py", line 684, in pack
    self._storage.pack(t, self.references)
  File "/var/Plone/eggs/ZODB3-3.8.1b7-py2.4-linux-x86_64.egg/ZEO/ClientStorage.py", line 831, in pack
    return self._server.pack(t, wait)
  File "/var/Plone/eggs/ZODB3-3.8.1b7-py2.4-linux-x86_64.egg/ZEO/ServerStub.py", line 166, in pack
    self.rpc.call('pack', t, wait)
  File "/var/Plone/eggs/ZODB3-3.8.1b7-py2.4-linux-x86_64.egg/ZEO/zrpc/connection.py", line 699, in call
    raise inst # error raised by server
TypeError: Odd-length string
2009-01-12 11:51:15 ERROR Zope.SiteErrorLog http://localhost:8080/Control_Panel/Database/main/manage_pack
Traceback (innermost last):
  Module ZPublisher.Publish, line 119, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 42, in call_object
  Module , line 3, in _facade
  Module AccessControl.requestmethod, line 64, in _curried
  Module App.ApplicationManager, line 431, in manage_pack
  Module ZODB.DB, line 684, in pack
  Module ZEO.ClientStorage, line 831, in pack
  Module ZEO.ServerStub, line 166, in pack
  Module ZEO.zrpc.connection, line 699, in call
TypeError: Odd-length string

 Advanced Developers: Now, the log files show this trace.

 The key line to note in that is this one:

File "/var/Plone/eggs/ZODB3-3.8.1b7-py2.4-linux-x86_64.egg/ZEO/zrpc/connection.py", line 699, in call
    raise inst # error raised by server
What does it mean? Let's dig a little and find out.