TypeError: Unable to initialize the document file storage. Check the settings DOCUMENTS FILE STORAGE BACKEND and DOCUMENTS FILE STORAGE BACKEND ARGUMENTS

Trying to use compatible s3 to save the files, but show me this errror:

2023-06-07T13:53:07.318951661Z TypeError: Unable to initialize the document file storage. Check the settings DOCUMENTS_FILE_STORAGE_BACKEND and DOCUMENTS_FILE_STORAGE_BACKEND_ARGUMENTS for formatting errors.

My docker env vars:

MAYAN_DOCUMENTS_FILE_STORAGE_BACKEND=storages.backends.s3boto3.S3Boto3Storage
MAYAN_DOCUMENTS_FILE_STORAGE_BACKEND_ARGUMENTS={'access_key':'WdlnLQtYmgr15','secret_key':'74uUuruhB5nBqzwZURdFanli','bucket_name':'ged','default_acl':'private','endpoint_url':'https://someurl.idrivee2-9.com', 'host': 'someurl.idrivee2-9.com'}

Do I need to add something else, or another env variable?

Try adding double quotes(" ") to vars values.

Also, i would recomend editing/removing sensible information when you need to post public (i mean access and private keys)

Thanks, I’ve tried com single and double quotes. Didn’t work.

These keys are not real keys, thanks for your advice

Didn’t work yet. Another idea?

Missing double quotes.

MAYAN_DOCUMENTS_FILE_STORAGE_BACKEND_ARGUMENTS="{'access_key':'WdlnLQtYmgr15','secret_key':'74uUuruhB5nBqzwZURdFanli','bucket_name':'ged','default_acl':'private','endpoint_url':'https://someurl.idrivee2-9.com', 'host': 'someurl.idrivee2-9.com'}"

https://docs.mayan-edms.com/chapters/object_storage.html#docker-deployments

Thanks @roberto.rosario , but didn’t work too with double quotes.

Maybe a problem with idrive s3? IDrive® e2 IaaS for developers

I changed for verify:False:

{'access_key':'WdlGQNmgr15','secret_key':'74uUuruwZURdFanli','bucket_name':'ged','default_acl':'private','endpoint_url':'https://sameurl.idrivee2-9.com','verify':'False'}

But show me another error:

I tested with verify: True, too:

2023-06-08T18:14:27.132510667Z document, document_file = document_type.new_document(
2023-06-08T18:14:27.132514824Z File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/documents/models/document_type_model_mixins.py", line 71, in new_document
2023-06-08T18:14:27.132519460Z document_file = document.file_new(
2023-06-08T18:14:27.132523832Z File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/documents/models/document_model_mixins.py", line 153, in file_new
2023-06-08T18:14:27.132528446Z document_file.save()
2023-06-08T18:14:27.132532603Z File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/documents/models/document_file_models.py", line 191, in save
2023-06-08T18:14:27.132537035Z result = self._create(*args, **kwargs)
2023-06-08T18:14:27.132540971Z File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/events/decorators.py", line 22, in wrapper
2023-06-08T18:14:27.132545444Z result = func(self, *args, **kwargs)
2023-06-08T18:14:27.132549801Z File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/documents/models/document_file_model_mixins.py", line 93, in _create
2023-06-08T18:14:27.132554523Z result = self._save(*args, **kwargs)
2023-06-08T18:14:27.132558770Z File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/events/decorators.py", line 22, in wrapper
2023-06-08T18:14:27.132563423Z result = func(self, *args, **kwargs)
2023-06-08T18:14:27.132567650Z File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/documents/models/document_file_models.py", line 131, in _save
2023-06-08T18:14:27.132754469Z result = super().save(*args, **kwargs)
2023-06-08T18:14:27.132767313Z File "/opt/mayan-edms/lib/python3.9/site-packages/django/db/models/base.py", line 739, in save
2023-06-08T18:14:27.132781699Z self.save_base(using=using, force_insert=force_insert,
2023-06-08T18:14:27.132786024Z File "/opt/mayan-edms/lib/python3.9/site-packages/django/db/models/base.py", line 776, in save_base
2023-06-08T18:14:27.132790773Z updated = self._save_table(
2023-06-08T18:14:27.132794969Z File "/opt/mayan-edms/lib/python3.9/site-packages/django/db/models/base.py", line 881, in _save_table
2023-06-08T18:14:27.132801803Z results = self._do_insert(cls._base_manager, using, fields, returning_fields, raw)
2023-06-08T18:14:27.132806005Z File "/opt/mayan-edms/lib/python3.9/site-packages/django/db/models/base.py", line 919, in _do_insert
2023-06-08T18:14:27.132810349Z return manager._insert(
2023-06-08T18:14:27.132814309Z File "/opt/mayan-edms/lib/python3.9/site-packages/django/db/models/manager.py", line 85, in manager_method
2023-06-08T18:14:27.132818209Z return getattr(self.get_queryset(), name)(*args, **kwargs)
2023-06-08T18:14:27.132822386Z File "/opt/mayan-edms/lib/python3.9/site-packages/django/db/models/query.py", line 1270, in _insert
2023-06-08T18:14:27.132827125Z return query.get_compiler(using=using).execute_sql(returning_fields)
2023-06-08T18:14:27.132831408Z File "/opt/mayan-edms/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1415, in execute_sql
2023-06-08T18:14:27.132835686Z for sql, params in self.as_sql():
2023-06-08T18:14:27.132839822Z File "/opt/mayan-edms/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1358, in as_sql
2023-06-08T18:14:27.132844152Z value_rows = [
2023-06-08T18:14:27.132847902Z File "/opt/mayan-edms/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1359, in <listcomp>
2023-06-08T18:14:27.132852510Z [self.prepare_value(field, self.pre_save_val(field, obj)) for field in fields]
2023-06-08T18:14:27.132857064Z File "/opt/mayan-edms/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1359, in <listcomp>
2023-06-08T18:14:27.132861673Z [self.prepare_value(field, self.pre_save_val(field, obj)) for field in fields]
2023-06-08T18:14:27.132865912Z File "/opt/mayan-edms/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1310, in pre_save_val
2023-06-08T18:14:27.132870286Z return field.pre_save(obj, add=True)
2023-06-08T18:14:27.132874346Z File "/opt/mayan-edms/lib/python3.9/site-packages/django/db/models/fields/files.py", line 302, in pre_save
2023-06-08T18:14:27.132878612Z file.save(file.name, file.file, save=False)
2023-06-08T18:14:27.132882514Z File "/opt/mayan-edms/lib/python3.9/site-packages/django/db/models/fields/files.py", line 89, in save
2023-06-08T18:14:27.132887116Z self.name = self.storage.save(name, content, max_length=self.field.max_length)
2023-06-08T18:14:27.132891347Z File "/opt/mayan-edms/lib/python3.9/site-packages/mayan/apps/storage/classes.py", line 135, in inner_function
2023-06-08T18:14:27.132896039Z return getattr(
2023-06-08T18:14:27.132906276Z File "/opt/mayan-edms/lib/python3.9/site-packages/django/core/files/storage.py", line 54, in save
2023-06-08T18:14:27.132910759Z name = self._save(name, content)
2023-06-08T18:14:27.132914971Z File "/opt/mayan-edms/lib/python3.9/site-packages/storages/backends/s3boto3.py", line 457, in _save
2023-06-08T18:14:27.132920908Z obj.upload_fileobj(content, ExtraArgs=params, Config=self._transfer_config)
2023-06-08T18:14:27.132925087Z File "/opt/mayan-edms/lib/python3.9/site-packages/boto3/s3/inject.py", line 725, in object_upload_fileobj
2023-06-08T18:14:27.132929595Z return self.meta.client.upload_fileobj(
2023-06-08T18:14:27.132933568Z File "/opt/mayan-edms/lib/python3.9/site-packages/boto3/s3/inject.py", line 636, in upload_fileobj
2023-06-08T18:14:27.132938222Z return future.result()
2023-06-08T18:14:27.132942300Z File "/opt/mayan-edms/lib/python3.9/site-packages/s3transfer/futures.py", line 103, in result
2023-06-08T18:14:27.132946966Z return self._coordinator.result()
2023-06-08T18:14:27.132950902Z File "/opt/mayan-edms/lib/python3.9/site-packages/s3transfer/futures.py", line 266, in result
2023-06-08T18:14:27.132955052Z raise self._exception
2023-06-08T18:14:27.132959041Z File "/opt/mayan-edms/lib/python3.9/site-packages/s3transfer/tasks.py", line 139, in __call__
2023-06-08T18:14:27.132963703Z return self._execute_main(kwargs)
2023-06-08T18:14:27.132967715Z File "/opt/mayan-edms/lib/python3.9/site-packages/s3transfer/tasks.py", line 162, in _execute_main
2023-06-08T18:14:27.132972307Z return_value = self._main(**kwargs)
2023-06-08T18:14:27.132976565Z File "/opt/mayan-edms/lib/python3.9/site-packages/s3transfer/upload.py", line 758, in _main
2023-06-08T18:14:27.132981708Z client.put_object(Bucket=bucket, Key=key, Body=body, **extra_args)
2023-06-08T18:14:27.132986025Z File "/opt/mayan-edms/lib/python3.9/site-packages/botocore/client.py", line 514, in _api_call
2023-06-08T18:14:27.132990360Z return self._make_api_call(operation_name, kwargs)
2023-06-08T18:14:27.132994575Z File "/opt/mayan-edms/lib/python3.9/site-packages/botocore/client.py", line 921, in _make_api_call
2023-06-08T18:14:27.132998933Z http, parsed_response = self._make_request(
2023-06-08T18:14:27.133002975Z File "/opt/mayan-edms/lib/python3.9/site-packages/botocore/client.py", line 944, in _make_request
2023-06-08T18:14:27.133007799Z return self._endpoint.make_request(operation_model, request_dict)
2023-06-08T18:14:27.133012171Z File "/opt/mayan-edms/lib/python3.9/site-packages/botocore/endpoint.py", line 119, in make_request
2023-06-08T18:14:27.133016681Z return self._send_request(request_dict, operation_model)
2023-06-08T18:14:27.133020927Z File "/opt/mayan-edms/lib/python3.9/site-packages/botocore/endpoint.py", line 202, in _send_request
2023-06-08T18:14:27.133025201Z while self._needs_retry(
2023-06-08T18:14:27.133029064Z File "/opt/mayan-edms/lib/python3.9/site-packages/botocore/endpoint.py", line 354, in _needs_retry
2023-06-08T18:14:27.133039689Z responses = self._event_emitter.emit(
2023-06-08T18:14:27.133044093Z File "/opt/mayan-edms/lib/python3.9/site-packages/botocore/hooks.py", line 412, in emit
2023-06-08T18:14:27.133049871Z return self._emitter.emit(aliased_event_name, **kwargs)
2023-06-08T18:14:27.133054221Z File "/opt/mayan-edms/lib/python3.9/site-packages/botocore/hooks.py", line 256, in emit
2023-06-08T18:14:27.133058598Z return self._emit(event_name, kwargs)
2023-06-08T18:14:27.133062780Z File "/opt/mayan-edms/lib/python3.9/site-packages/botocore/hooks.py", line 239, in _emit
2023-06-08T18:14:27.133067130Z response = handler(**kwargs)
2023-06-08T18:14:27.133071171Z File "/opt/mayan-edms/lib/python3.9/site-packages/botocore/retryhandler.py", line 207, in __call__
2023-06-08T18:14:27.133075649Z if self._checker(**checker_kwargs):
2023-06-08T18:14:27.133079640Z File "/opt/mayan-edms/lib/python3.9/site-packages/botocore/retryhandler.py", line 284, in __call__
2023-06-08T18:14:27.133084240Z should_retry = self._should_retry(
2023-06-08T18:14:27.133088406Z File "/opt/mayan-edms/lib/python3.9/site-packages/botocore/retryhandler.py", line 320, in _should_retry
2023-06-08T18:14:27.133093027Z return self._checker(attempt_number, response, caught_exception)
2023-06-08T18:14:27.133097575Z File "/opt/mayan-edms/lib/python3.9/site-packages/botocore/retryhandler.py", line 363, in __call__
2023-06-08T18:14:27.133101867Z checker_response = checker(
2023-06-08T18:14:27.133105936Z File "/opt/mayan-edms/lib/python3.9/site-packages/botocore/retryhandler.py", line 247, in __call__
2023-06-08T18:14:27.133110067Z return self._check_caught_exception(
2023-06-08T18:14:27.133114120Z File "/opt/mayan-edms/lib/python3.9/site-packages/botocore/retryhandler.py", line 416, in _check_caught_exception
2023-06-08T18:14:27.133119142Z raise caught_exception
2023-06-08T18:14:27.133123477Z File "/opt/mayan-edms/lib/python3.9/site-packages/botocore/endpoint.py", line 281, in _do_get_response
2023-06-08T18:14:27.133128029Z http_response = self._send(request)
2023-06-08T18:14:27.133132187Z File "/opt/mayan-edms/lib/python3.9/site-packages/botocore/endpoint.py", line 377, in _send
2023-06-08T18:14:27.133136464Z return self.http_session.send(request)
2023-06-08T18:14:27.133140489Z File "/opt/mayan-edms/lib/python3.9/site-packages/botocore/httpsession.py", line 482, in send
2023-06-08T18:14:27.133144807Z raise SSLError(endpoint_url=request.url, error=e)
2023-06-08T18:14:27.133148970Z botocore.exceptions.SSLError: SSL validation failed for https://ged.c8w3.va12.idrivee2-9.com/ged/779c1b7f-c5ae-425d-b83c-ac7800af709d [Errno 2] No such file or directory