Re: Zeopack fails raising KeyError

Jim Fulton <[email protected]>
Newsgroups gmane.comp.web.zope.zodb
Message-ID <CAPDm-Fh8UBSYyteJ7f-XntAy92k6uBX=Uq2gQ85r815c9xMQ8g@mail.gmail.com>
On Tue, Mar 7, 2017 at 7:15 AM, Héctor Velarde <[email protected]>
wrote:

> sorry for the noise: I pasted the error via web and it was broken; hope it
> works better here:
>
> $ bin/zeopack 0
> Traceback (most recent call last):
>   File "bin/zeopack", line 42, in <module>
>     sys.exit(plone.recipe.zeoserver.pack.main(host, port, unix, days,
> username, password, realm, blob_dir, storage))
>   File "/opt/plone/example.com/eggs/plone.recipe.zeoserver-1.2.9-py
> 2.7.egg/plone/recipe/zeoserver/pack.py", line 58, in main
>     _main(*args, **kw)
>   File "/opt/plone/example.com/eggs/plone.recipe.zeoserver-1.2.9-py
> 2.7.egg/plone/recipe/zeoserver/pack.py", line 39, in _main
>     cs.pack(wait=True, days=int(days))
>   File "/opt/plone/example.com/eggs/ZODB3-3.10.5-py2.7-linux-x86_64
> .egg/ZEO/ClientStorage.py", line 916, in pack
>     return self._server.pack(t, wait)
>   File "/opt/plone/example.com/eggs/ZODB3-3.10.5-py2.7-linux-x86_64
> .egg/ZEO/ServerStub.py", line 155, in pack
>     self.rpc.call('pack', t, wait)
>   File "/opt/plone/example.com/eggs/ZODB3-3.10.5-py2.7-linux-x86_64
> .egg/ZEO/zrpc/connection.py", line 768, in call
>     raise inst # error raised by server
> KeyError: '\x1dx'
>

This looks like a case of a reference to an object that's not in the
database.


>
> I checked also the ZEO server logs; this is what I found on the master:
>
> 2017-03-04T17:02:07 (::ffff:127.0.0.1:51715) pack(time=1488571327.685818)
> started...
> 2017-03-04T17:17:14 (1190) Error raised in delayed method
> None
>

Well, that's not helpful. :(  I'm disappointed there's no traceback.  Back
then ZEO tried to be more "clever" about logging.

Perhaps on the secondary, hack ZEO.StorageServer.ZEOStorage._pack_impl to
look like:

    def _pack_impl(self, time):
        self.log("pack(time=%s) started..." % repr(time))
        try:
            self.storage.pack(time, referencesf)
        except:
            logging.getLogger(__name__).exception("pack failed")
            raise
        self.log("pack(time=%s) complete" % repr(time))
        # Broadcast new size statistics
        self.server.invalidate(0, self.storage_id, None,
                               (), self.get_size_info())

And restart and try packing again.

Jim

-- 
Jim Fulton
http://jimfulton.info

-- 
You received this message because you are subscribed to the Google Groups "zodb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.