zopefoundation / ZEO

ZODB Client-Server framework
Other
42 stars 19 forks source link

ZEO.Exceptions.ServerException: (‘builtins.FileNotFoundError’, (2, ‘No such file or directory’)) in Plone 6.0.7 #239

Closed zopyx closed 11 months ago

zopyx commented 11 months ago

As part of a Plone 6.0.8 import migration, I get this reproducible ZEO error for some content-types. While the handling and the code for all content-types are identical, a few content types raise this error during import.

I am unable to provide a minimal test case.

  File "/home/ajung/src/unibo/incronaca-plone6/parts/instance/bin/interpreter", line 306, in <module>
    exec(_val)
  File "<string>", line 1, in <module>
  File "scripts/migration-import.py", line 491, in <module>
    import_ct(ct)
  File "scripts/migration-import.py", line 235, in import_ct
    import_content(jsonfile=data, return_json=True)
  File "/home/ajung/src/unibo/incronaca-plone6/src/collective.exportimport/src/collective/exportimport/import_content.py", line 184, in __call__
    msg = self.do_import(data)
          ^^^^^^^^^^^^^^^^^^^^
  File "/home/ajung/src/unibo/incronaca-plone6/src/collective.exportimport/src/collective/exportimport/import_content.py", line 254, in do_import
    transaction.commit()
  File "/home/ajung/src/unibo/incronaca-plone6/eggs/transaction-3.1.0-py3.11.egg/transaction/_manager.py", line 257, in commit
    return self.manager.commit()
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/ajung/src/unibo/incronaca-plone6/eggs/transaction-3.1.0-py3.11.egg/transaction/_manager.py", line 134, in commit
    return self.get().commit()
           ^^^^^^^^^^^^^^^^^^^
  File "/home/ajung/src/unibo/incronaca-plone6/eggs/transaction-3.1.0-py3.11.egg/transaction/_transaction.py", line 283, in commit
    reraise(t, v, tb)
  File "/home/ajung/src/unibo/incronaca-plone6/eggs/transaction-3.1.0-py3.11.egg/transaction/_compat.py", line 50, in reraise
    raise value
  File "/home/ajung/src/unibo/incronaca-plone6/eggs/transaction-3.1.0-py3.11.egg/transaction/_transaction.py", line 274, in commit
    self._commitResources()
  File "/home/ajung/src/unibo/incronaca-plone6/eggs/transaction-3.1.0-py3.11.egg/transaction/_transaction.py", line 457, in _commitResources
    reraise(t, v, tb)
  File "/home/ajung/src/unibo/incronaca-plone6/eggs/transaction-3.1.0-py3.11.egg/transaction/_compat.py", line 50, in reraise
    raise value
  File "/home/ajung/src/unibo/incronaca-plone6/eggs/transaction-3.1.0-py3.11.egg/transaction/_transaction.py", line 434, in _commitResources
    rm.tpc_vote(self)
  File "/home/ajung/src/unibo/incronaca-plone6/eggs/ZODB-5.8.1-py3.11.egg/ZODB/Connection.py", line 688, in tpc_vote
    s = vote(transaction)
        ^^^^^^^^^^^^^^^^^
  File "/home/ajung/src/unibo/incronaca-plone6/eggs/ZEO-5.4.1-py3.11.egg/ZEO/ClientStorage.py", line 846, in tpc_vote
    for oid in self._call('vote', id(txn)) or ():
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ajung/src/unibo/incronaca-plone6/eggs/ZEO-5.4.1-py3.11.egg/ZEO/asyncio/client.py", line 883, in call
    return self.io_call(
           ^^^^^^^^^^^^^
  File "/home/ajung/src/unibo/incronaca-plone6/eggs/ZEO-5.4.1-py3.11.egg/ZEO/asyncio/client.py", line 862, in io_call
    return future.result() if wait else future
           ^^^^^^^^^^^^^^^
  File "/home/ajung/src/unibo/incronaca-plone6/eggs/ZEO-5.4.1-py3.11.egg/ZEO/asyncio/futures.py", line 230, in result
    return Future.result(self)
           ^^^^^^^^^^^^^^^^^^^
  File "/home/ajung/src/unibo/incronaca-plone6/eggs/ZEO-5.4.1-py3.11.egg/ZEO/asyncio/futures.py", line 81, in result
    raise self._result
  File "/home/ajung/src/unibo/incronaca-plone6/eggs/ZEO-5.4.1-py3.11.egg/ZEO/asyncio/futures.py", line 273, in step
    result = self.coro.throw(await_result)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ajung/src/unibo/incronaca-plone6/eggs/ZEO-5.4.1-py3.11.egg/ZEO/asyncio/client.py", line 716, in call_sync_co
    _ = yield self.protocol.call_sync(method, args)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ajung/src/unibo/incronaca-plone6/eggs/ZEO-5.4.1-py3.11.egg/ZEO/asyncio/futures.py", line 259, in step
    await_result = awaiting.result()
                   ^^^^^^^^^^^^^^^^^
  File "/home/ajung/src/unibo/incronaca-plone6/eggs/ZEO-5.4.1-py3.11.egg/ZEO/asyncio/futures.py", line 81, in result
    raise self._result
ZEO.Exceptions.ServerException: ('builtins.FileNotFoundError', (2, 'No such file or directory'))
icemac commented 11 months ago

@d-maurer Do you have an idea what's going on here?

zopyx commented 11 months ago

After rebooting the system, the error has gone. It looks to me as two concurrent ZEO servers running/working on the same database...at least, I saw a stale ZEO process...not sure how this could happen 🤷🏻‍♂️ We can likely close this issue.

icemac commented 11 months ago

@zopyx Thank you for reporting back. I am closing the issue now.