1

在 3.3 -> 4.1 迁移之后,我在结果页面上出现异常

      File "/fast/buildout-cache/eggs/plone.app.viewletmanager-2.0.2-py2.6.egg/plone/app/viewletmanager/manager.py", line 85, in render
        return u'\n'.join([viewlet.render() for viewlet in self.viewlets])
      File "/fast/buildout-cache/eggs/plone.memoize-1.1.1-py2.6.egg/plone/memoize/volatile.py", line 281, in replacement
        cached_value = cache.get(key, _marker)
      File "/fast/buildout-cache/eggs/plone.memoize-1.1.1-py2.6.egg/plone/memoize/ram.py", line 124, in get
        return self.__getitem__(key)
      File "/fast/buildout-cache/eggs/plone.memoize-1.1.1-py2.6.egg/plone/memoize/ram.py", line 166, in __getitem__
        MARKER)
      File "/fast/buildout-cache/eggs/zope.ramcache-1.0-py2.6.egg/zope/ramcache/ram.py", line 107, in query
        s = self._getStorage()
      File "/fast/buildout-cache/eggs/zope.ramcache-1.0-py2.6.egg/zope/ramcache/ram.py", line 122, in _getStorage
        cacheId = self._cacheId
    AttributeError: 'RAMCache' object has no attribute '_cacheId'

看起来 RAMCache 对象处于无效状态。

同样在此之前在日志中看到:

  2012-06-21 16:42:54 INFO plone.app.upgrade Ran upgrade step: Miscellaneous
  2012-06-21 16:42:54 INFO plone.app.upgrade End of upgrade path, migration has finished
  2012-06-21 16:42:54 INFO plone.app.upgrade Your Plone instance is now up-to-date.
  2012-06-21 16:43:02 ERROR txn.4553572352 Error in tpc_abort() on manager <Connection at 10be48490>
  Traceback (most recent call last):
    File "/fast/buildout-cache/eggs/transaction-1.1.1-py2.6.egg/transaction/_transaction.py", line 484, in _cleanup
      rm.tpc_abort(self)
    File "/fast/buildout-cache/eggs/ZODB3-3.10.5-py2.6-macosx-10.7-x86_64.egg/ZODB/Connection.py", line 730, in tpc_abort
      self._storage.tpc_abort(transaction)
    File "/fast/buildout-cache/eggs/ZODB3-3.10.5-py2.6-macosx-10.7-x86_64.egg/ZEO/ClientStorage.py", line 1157, in tpc_abort
      self._server.tpc_abort(id(txn))
    File "/fast/buildout-cache/eggs/ZODB3-3.10.5-py2.6-macosx-10.7-x86_64.egg/ZEO/ServerStub.py", line 255, in tpc_abort
      self.rpc.call('tpc_abort', id)
    File "/fast/buildout-cache/eggs/ZODB3-3.10.5-py2.6-macosx-10.7-x86_64.egg/ZEO/zrpc/connection.py", line 768, in call
      raise inst # error raised by server
  OSError: [Errno 2] No such file or directory: '/fast/xxx-2012/var/blobstorage/0x00/0x00/0x00/0x00/0x00/0x07/0xdc/0x55/0x00FWigqp.tmp-'
  2012-06-21 16:43:03 ERROR Zope.SiteErrorLog 1340286183.10.000607291180815 http://localhost:9666/xxx/@@plone-upgrade
  Traceback (innermost last):
    Module ZPublisher.Publish, line 134, in publish
    Module Zope2.App.startup, line 301, in commit
    Module transaction._manager, line 89, in commit
    Module transaction._transaction, line 329, in commit
    Module transaction._transaction, line 446, in _commitResources
    Module ZODB.Connection, line 781, in tpc_vote
    Module ZEO.ClientStorage, line 1098, in tpc_vote
    Module ZEO.ClientStorage, line 929, in _check_serials
  IOError: [Errno 2] No such file or directory: '/fast/xxx-2012/var/blobstorage/0x00/0x00/0x00/0x00/0x00/0x07/0xdd/0xca/0x009kWNYQ.tmp-'
  • 为什么会发生这种情况?

  • 任何指针如何重新初始化 RAMCache 对象?

RAMCache 首次由使用@memoize deorator 的 FaviconViewlet 引用,它会导致此错误。

4

1 回答 1

3

好吧,根据回溯,您的迁移显然没有成功完成。因此,我将专注于找出它失败的原因,而不是解决诸如 RAMCache 损坏之类的问题,这可能是迁移未运行的结果。

回溯表明它在尝试中止事务时中断了......因此您可能需要进行一些调试以确定导致它尝试中止的原因,因为您粘贴的日志中没有说明。

于 2012-06-21T20:28:18.077 回答