I just migrated my deployment to docker and ran into several issues.
First is a missing java runtime when creating previews using libreoffice
I added:
MAYAN_APT_INSTALLS="tesseract-ocr-deu tesseract-ocr-nld openjdk-17-jdk openjdk-17-jdk-headless openjdk-17-jre openjdk-17-jre-headless"
after rebuilding the container with java installed, while generating previews, the log throws the following exceptions:
mayan-app-1 | [2023-02-03 16:27:31,028: ERROR/ForkPoolWorker-2] Error creating document version page cache file named "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855-base_image";
mayan-app-1 |
mayan-app-1 | RAN: /usr/bin/libreoffice --headless --convert-to pdf:writer_pdf_Export /tmp/tmpvtqk63mn --outdir /tmp -env:UserInstallation=file:///tmp/tmpmlzlqcvv/LibreOffice_Conversion
mayan-app-1 |
mayan-app-1 | STDOUT:
mayan-app-1 |
mayan-app-1 |
mayan-app-1 | STDERR:
mayan-app-1 |
mayan-app-1 | Traceback (most recent call last):
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/documents/models/document_version_page_model_mixins.py", line 72, in generate_image
mayan-app-1 | self.cache_partition.get_file(
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/file_caching/model_mixins.py", line 247, in get_file
mayan-app-1 | return self.files.get(filename=filename)
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/django/db/models/manager.py", line 85, in manager_method
mayan-app-1 | return getattr(self.get_queryset(), name)(*args, **kwargs)
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/django/db/models/query.py", line 435, in get
mayan-app-1 | raise self.model.DoesNotExist(
mayan-app-1 | mayan.apps.file_caching.models.CachePartitionFile.DoesNotExist: CachePartitionFile matching query does not exist.
mayan-app-1 |
mayan-app-1 | During handling of the above exception, another exception occurred:
mayan-app-1 |
mayan-app-1 | Traceback (most recent call last):
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/documents/models/document_version_page_model_mixins.py", line 214, in get_image
mayan-app-1 | cache_file = self.cache_partition.get_file(
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/file_caching/model_mixins.py", line 247, in get_file
mayan-app-1 | return self.files.get(filename=filename)
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/django/db/models/manager.py", line 85, in manager_method
mayan-app-1 | return getattr(self.get_queryset(), name)(*args, **kwargs)
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/django/db/models/query.py", line 435, in get
mayan-app-1 | raise self.model.DoesNotExist(
mayan-app-1 | mayan.apps.file_caching.models.CachePartitionFile.DoesNotExist: CachePartitionFile matching query does not exist.
mayan-app-1 |
mayan-app-1 | During handling of the above exception, another exception occurred:
mayan-app-1 |
mayan-app-1 | Traceback (most recent call last):
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/documents/models/document_file_page_model_mixins.py", line 63, in generate_image
mayan-app-1 | self.cache_partition.get_file(
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/file_caching/model_mixins.py", line 247, in get_file
mayan-app-1 | return self.files.get(filename=filename)
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/django/db/models/manager.py", line 85, in manager_method
mayan-app-1 | return getattr(self.get_queryset(), name)(*args, **kwargs)
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/django/db/models/query.py", line 435, in get
mayan-app-1 | raise self.model.DoesNotExist(
mayan-app-1 | mayan.apps.file_caching.models.CachePartitionFile.DoesNotExist: CachePartitionFile matching query does not exist.
mayan-app-1 |
mayan-app-1 | During handling of the above exception, another exception occurred:
mayan-app-1 |
mayan-app-1 | Traceback (most recent call last):
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/documents/models/document_file_page_model_mixins.py", line 173, in get_image
mayan-app-1 | cache_file = self.cache_partition.get_file(filename=cache_filename)
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/file_caching/model_mixins.py", line 247, in get_file
mayan-app-1 | return self.files.get(filename=filename)
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/django/db/models/manager.py", line 85, in manager_method
mayan-app-1 | return getattr(self.get_queryset(), name)(*args, **kwargs)
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/django/db/models/query.py", line 435, in get
mayan-app-1 | raise self.model.DoesNotExist(
mayan-app-1 | mayan.apps.file_caching.models.CachePartitionFile.DoesNotExist: CachePartitionFile matching query does not exist.
mayan-app-1 |
mayan-app-1 | During handling of the above exception, another exception occurred:
mayan-app-1 |
mayan-app-1 | Traceback (most recent call last):
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/documents/models/document_file_model_mixins.py", line 260, in get_intermediate_file
mayan-app-1 | cache_file = self.cache_partition.get_file(filename=cache_filename)
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/file_caching/model_mixins.py", line 247, in get_file
mayan-app-1 | return self.files.get(filename=filename)
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/django/db/models/manager.py", line 85, in manager_method
mayan-app-1 | return getattr(self.get_queryset(), name)(*args, **kwargs)
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/django/db/models/query.py", line 435, in get
mayan-app-1 | raise self.model.DoesNotExist(
mayan-app-1 | mayan.apps.file_caching.models.CachePartitionFile.DoesNotExist: CachePartitionFile matching query does not exist.
mayan-app-1 |
mayan-app-1 | During handling of the above exception, another exception occurred:
mayan-app-1 |
mayan-app-1 | Traceback (most recent call last):
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/converter/classes.py", line 196, in soffice
mayan-app-1 | self.command_libreoffice(*args, **kwargs)
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/sh.py", line 1566, in __call__
mayan-app-1 | return RunningCommand(cmd, call_args, stdin, stdout, stderr)
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/sh.py", line 822, in __init__
mayan-app-1 | self.wait()
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/sh.py", line 879, in wait
mayan-app-1 | self.handle_command_exit_code(exit_code)
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/sh.py", line 905, in handle_command_exit_code
mayan-app-1 | raise exc
mayan-app-1 | sh.ErrorReturnCode_1:
mayan-app-1 |
mayan-app-1 | RAN: /usr/bin/libreoffice --headless --convert-to pdf:writer_pdf_Export /tmp/tmpvtqk63mn --outdir /tmp -env:UserInstallation=file:///tmp/tmpmlzlqcvv/LibreOffice_Conversion
mayan-app-1 |
mayan-app-1 | STDOUT:
mayan-app-1 |
mayan-app-1 |
mayan-app-1 | STDERR:
mayan-app-1 |
mayan-app-1 |
mayan-app-1 | During handling of the above exception, another exception occurred:
mayan-app-1 |
mayan-app-1 | Traceback (most recent call last):
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/documents/models/document_version_page_model_mixins.py", line 221, in get_image
mayan-app-1 | content_object_cache_filename = self.content_object.generate_image(
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/documents/models/document_file_page_model_mixins.py", line 70, in generate_image
mayan-app-1 | image = self.get_image(
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/documents/models/document_file_page_model_mixins.py", line 178, in get_image
mayan-app-1 | with self.document_file.get_intermediate_file() as file_object:
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/documents/models/document_file_model_mixins.py", line 291, in get_intermediate_file
mayan-app-1 | raise exception
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/documents/models/document_file_model_mixins.py", line 269, in get_intermediate_file
mayan-app-1 | with converter.to_pdf() as pdf_file_object:
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/converter/classes.py", line 264, in to_pdf
mayan-app-1 | return self.soffice()
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/converter/classes.py", line 199, in soffice
mayan-app-1 | raise OfficeConversionError(exception)
mayan-app-1 | mayan.apps.converter.exceptions.OfficeConversionError:
mayan-app-1 |
mayan-app-1 | RAN: /usr/bin/libreoffice --headless --convert-to pdf:writer_pdf_Export /tmp/tmpvtqk63mn --outdir /tmp -env:UserInstallation=file:///tmp/tmpmlzlqcvv/LibreOffice_Conversion
mayan-app-1 |
mayan-app-1 | STDOUT:
mayan-app-1 |
mayan-app-1 |
mayan-app-1 | STDERR:
mayan-app-1 |
mayan-app-1 | "
mayan-app-1 | Traceback (most recent call last):
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/documents/models/document_version_page_model_mixins.py", line 72, in generate_image
mayan-app-1 | self.cache_partition.get_file(
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/file_caching/model_mixins.py", line 247, in get_file
mayan-app-1 | return self.files.get(filename=filename)
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/django/db/models/manager.py", line 85, in manager_method
mayan-app-1 | return getattr(self.get_queryset(), name)(*args, **kwargs)
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/django/db/models/query.py", line 435, in get
mayan-app-1 | raise self.model.DoesNotExist(
mayan-app-1 | mayan.apps.file_caching.models.CachePartitionFile.DoesNotExist: CachePartitionFile matching query does not exist.
mayan-app-1 |
mayan-app-1 | During handling of the above exception, another exception occurred:
mayan-app-1 |
mayan-app-1 | Traceback (most recent call last):
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/documents/models/document_version_page_model_mixins.py", line 214, in get_image
mayan-app-1 | cache_file = self.cache_partition.get_file(
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/file_caching/model_mixins.py", line 247, in get_file
mayan-app-1 | return self.files.get(filename=filename)
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/django/db/models/manager.py", line 85, in manager_method
mayan-app-1 | return getattr(self.get_queryset(), name)(*args, **kwargs)
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/django/db/models/query.py", line 435, in get
mayan-app-1 | raise self.model.DoesNotExist(
mayan-app-1 | mayan.apps.file_caching.models.CachePartitionFile.DoesNotExist: CachePartitionFile matching query does not exist.
mayan-app-1 |
mayan-app-1 | During handling of the above exception, another exception occurred:
mayan-app-1 |
mayan-app-1 | Traceback (most recent call last):
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/documents/models/document_file_page_model_mixins.py", line 63, in generate_image
mayan-app-1 | self.cache_partition.get_file(
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/file_caching/model_mixins.py", line 247, in get_file
mayan-app-1 | return self.files.get(filename=filename)
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/django/db/models/manager.py", line 85, in manager_method
mayan-app-1 | return getattr(self.get_queryset(), name)(*args, **kwargs)
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/django/db/models/query.py", line 435, in get
mayan-app-1 | raise self.model.DoesNotExist(
mayan-app-1 | mayan.apps.file_caching.models.CachePartitionFile.DoesNotExist: CachePartitionFile matching query does not exist.
mayan-app-1 |
mayan-app-1 | During handling of the above exception, another exception occurred:
mayan-app-1 |
mayan-app-1 | Traceback (most recent call last):
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/documents/models/document_file_page_model_mixins.py", line 173, in get_image
mayan-app-1 | cache_file = self.cache_partition.get_file(filename=cache_filename)
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/file_caching/model_mixins.py", line 247, in get_file
mayan-app-1 | return self.files.get(filename=filename)
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/django/db/models/manager.py", line 85, in manager_method
mayan-app-1 | return getattr(self.get_queryset(), name)(*args, **kwargs)
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/django/db/models/query.py", line 435, in get
mayan-app-1 | raise self.model.DoesNotExist(
mayan-app-1 | mayan.apps.file_caching.models.CachePartitionFile.DoesNotExist: CachePartitionFile matching query does not exist.
mayan-app-1 |
mayan-app-1 | During handling of the above exception, another exception occurred:
mayan-app-1 |
mayan-app-1 | Traceback (most recent call last):
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/documents/models/document_file_model_mixins.py", line 260, in get_intermediate_file
mayan-app-1 | cache_file = self.cache_partition.get_file(filename=cache_filename)
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/file_caching/model_mixins.py", line 247, in get_file
mayan-app-1 | return self.files.get(filename=filename)
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/django/db/models/manager.py", line 85, in manager_method
mayan-app-1 | return getattr(self.get_queryset(), name)(*args, **kwargs)
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/django/db/models/query.py", line 435, in get
mayan-app-1 | raise self.model.DoesNotExist(
mayan-app-1 | mayan.apps.file_caching.models.CachePartitionFile.DoesNotExist: CachePartitionFile matching query does not exist.
mayan-app-1 |
mayan-app-1 | During handling of the above exception, another exception occurred:
mayan-app-1 |
mayan-app-1 | Traceback (most recent call last):
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/converter/classes.py", line 196, in soffice
mayan-app-1 | self.command_libreoffice(*args, **kwargs)
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/sh.py", line 1566, in __call__
mayan-app-1 | return RunningCommand(cmd, call_args, stdin, stdout, stderr)
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/sh.py", line 822, in __init__
mayan-app-1 | self.wait()
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/sh.py", line 879, in wait
mayan-app-1 | self.handle_command_exit_code(exit_code)
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/sh.py", line 905, in handle_command_exit_code
mayan-app-1 | raise exc
mayan-app-1 | sh.ErrorReturnCode_1:
mayan-app-1 |
mayan-app-1 | RAN: /usr/bin/libreoffice --headless --convert-to pdf:writer_pdf_Export /tmp/tmpqfuyjqen --outdir /tmp -env:UserInstallation=file:///tmp/tmpu5pd9h7r/LibreOffice_Conversion
mayan-app-1 |
mayan-app-1 | STDOUT:
mayan-app-1 |
mayan-app-1 |
mayan-app-1 | STDERR:
mayan-app-1 |
mayan-app-1 |
mayan-app-1 | During handling of the above exception, another exception occurred:
mayan-app-1 |
mayan-app-1 | Traceback (most recent call last):
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/documents/models/document_version_page_model_mixins.py", line 221, in get_image
mayan-app-1 | content_object_cache_filename = self.content_object.generate_image(
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/documents/models/document_file_page_model_mixins.py", line 70, in generate_image
mayan-app-1 | image = self.get_image(
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/documents/models/document_file_page_model_mixins.py", line 178, in get_image
mayan-app-1 | with self.document_file.get_intermediate_file() as file_object:
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/documents/models/document_file_model_mixins.py", line 291, in get_intermediate_file
mayan-app-1 | raise exception
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/documents/models/document_file_model_mixins.py", line 269, in get_intermediate_file
mayan-app-1 | with converter.to_pdf() as pdf_file_object:
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/converter/classes.py", line 264, in to_pdf
mayan-app-1 | return self.soffice()
mayan-app-1 | File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/converter/classes.py", line 199, in soffice
mayan-app-1 | raise OfficeConversionError(exception)
mayan-app-1 | mayan.apps.converter.exceptions.OfficeConversionError:
mayan-app-1 |
mayan-app-1 | RAN: /usr/bin/libreoffice --headless --convert-to pdf:writer_pdf_Export /tmp/tmpqfuyjqen --outdir /tmp -env:UserInstallation=file:///tmp/tmpu5pd9h7r/LibreOffice_Conversion
mayan-app-1 |
mayan-app-1 | STDOUT:
mayan-app-1 |
mayan-app-1 |
mayan-app-1 | STDERR:
mayan-app-1 |
any help is appreciated
Best regards
Bastian