jonaswinkler/paperless-ng

[BUG] Stale file handle

kakulukia opened this issue · 3 comments

Describe the bug
While scanning the consume directory instead of new documents i get failed tasks with the following error:

[Errno 116] Stale file handle: '../consume/20211203_105551_Sonstiges_000465.pdf' : Traceback (most recent call last):
File "/opt/paperless/.local/lib/python3.9/site-packages/django_q/cluster.py", line 432, in worker
res = f(*task["args"], **task["kwargs"])
File "/opt/paperless/src/documents/tasks.py", line 74, in consume_file
document = Consumer().try_consume_file(
File "/opt/paperless/src/documents/consumer.py", line 197, in try_consume_file
self.pre_check_duplicate()
File "/opt/paperless/src/documents/consumer.py", line 92, in pre_check_duplicate
with open(self.path, "rb") as f:
OSError: [Errno 116] Stale file handle: '../consume/20211203_105551_Sonstiges_000465.pdf'

To Reproduce
Steps to reproduce the behavior:

  1. Restart the consumer with some files in the consume directory

Expected behaviour
New documents should be added to paperless.

Screenshots
When the consumer starts i get entries like those:
SCR-20221101-mto
Its stopping at that stage with no additional error or so in the frontend.

Webserver logs
See task error log above.

Relevant information

  • Host OS of the machine running paperless: Ubuntu 20.04
  • Browser: Chrome
  • Version: 1.5 just installed today
  • Installation method: bare metal
  • Any configuration changes you made in paperless.conf:
    • language set to deu

The user paperless is the owner of the consume folder which is a SMB share.
Im probably going to try to test with a normal folder tomorrow and report if that error persists with this setup.

BTW: Adding new files via the frontend works.

paperless-ng is pretty much abandoned. Have a look at https://github.com/paperless-ngx/paperless-ngx for a maintained fork.

Thanks!