Page 1 of 1

Connecting to Wasabi

Posted: Sat Apr 11, 2020 6:53 am
by michaelruge
Hi,

I am trying to use the Non-AWS S3 deployment option to connect Mayan to Wasabi. Their system basically emulates S3 and it should be a drop-in solution. It looks pretty straight forward, but for some reason I cannot get this thing to connect. I have used their S3 connector with other software, so I know it works.

What I have is a fairly new installation thats been local to the docker image. There is only about 50 files currently. I shut down the container, migrated the data, made the changes to the docker container, and finally restarted the container. Now I get the little X symbol when I try to preview the file or a Server Error message pops up when I try to access "properties" for example.

I am using the variables in my docker config as follows (obviously removing the keys and bucket name):

Code: Select all

MAYAN_PIP_INSTALLS='django-storages boto3' \
MAYAN_DOCUMENTS_STORAGE_BACKEND=storages.backends.s3boto3.S3Boto3Storage
MAYAN_DOCUMENTS_STORAGE_BACKEND_ARGUMENTS="{'access_key':'ACCESSKEY','secret_key':'SECRETKEY','bucket_name':'my-mayan-bucket-name','endpoint_url':'https://s3.wasabisys.com','verify':'False'}"
I am getting the following errors in my log. I am assuming they are related:

Code: Select all

llecting django-storages,
Requirement already satisfied: Django>=1.11 in /opt/mayan-edms/lib/python3.7/site-packages (from django-storages) (2.2.10),
Installing collected packages: django-storages, jmespath, docutils, botocore, s3transfer, boto3,
Successfully installed boto3-1.12.39 botocore-1.15.39 django-storages-1.9.1 docutils-0.15.2 jmespath-0.9.5 s3transfer-0.3.3,
TypeError: Unable to initialize the document version storage. Check the settings DOCUMENTS_STORAGE_BACKEND and DOCUMENTS_STORAGE_BACKEND_ARGUMENTS for formatting errors.,
mayan.apps.storage.classes <93> [CRITICAL] "get_storage_instance() line 87 Unable to initialize the document version storage. Check the settings DOCUMENTS_STORAGE_BACKEND and DOCUMENTS_STORAGE_BACKEND_ARGUMENTS for formatting errors.",
[2020-04-11 06:28:01,445: CRITICAL/ForkPoolWorker-2] Unable to initialize the document version storage. Check the settings DOCUMENTS_STORAGE_BACKEND and DOCUMENTS_STORAGE_BACKEND_ARGUMENTS for formatting errors.,
mayan.apps.documents.models.document_version_models <93> [ERROR] "get_intermediate_file() line 241 Error creating intermediate file "intermediate_file"; Unable to initialize the document version storage. Check the settings DOCUMENTS_STORAGE_BACKEND and DOCUMENTS_STORAGE_BACKEND_ARGUMENTS for formatting errors..",
[2020-04-11 06:28:01,445: ERROR/ForkPoolWorker-2] Error creating intermediate file "intermediate_file"; Unable to initialize the document version storage. Check the settings DOCUMENTS_STORAGE_BACKEND and DOCUMENTS_STORAGE_BACKEND_ARGUMENTS for formatting errors..,
mayan.apps.documents.models.document_page_models <93> [ERROR] "get_image() line 240 Error creating page cache file "base_image"; Unable to initialize the document version storage. Check the settings DOCUMENTS_STORAGE_BACKEND and DOCUMENTS_STORAGE_BACKEND_ARGUMENTS for formatting errors.",
[2020-04-11 06:28:01,446: ERROR/ForkPoolWorker-2] Error creating page cache file "base_image"; Unable to initialize the document version storage. Check the settings DOCUMENTS_STORAGE_BACKEND and DOCUMENTS_STORAGE_BACKEND_ARGUMENTS for formatting errors.,
[2020-04-11 06:28:01,448: ERROR/ForkPoolWorker-2] Task mayan.apps.documents.tasks.task_generate_document_page_image[773b2d78-a338-411f-ac20-e961d3d2647b] raised unexpected: TypeError('Unable to initialize the document version storage. Check the settings DOCUMENTS_STORAGE_BACKEND and DOCUMENTS_STORAGE_BACKEND_ARGUMENTS for formatting errors.')
Any advice would be greatly appreciated!

Thank you,
Michael Ruge

Re: Connecting to Wasabi

Posted: Sun Apr 19, 2020 7:59 pm
by michael
Everything looks fine.

Try adding quotes to the MAYAN_DOCUMENTS_STORAGE_BACKEND line in case the shell is not liking the dots.

Invert the quotes for MAYAN_DOCUMENTS_STORAGE_BACKEND_ARGUMENTS. I've seen some shell that treat single and double quotes in different ways.

There is a continuation backslash on the first line but not on the following ones. Try adding it to the other lines, or remove it from the first one.

Hope this helps.

Re: Connecting to Wasabi

Posted: Sun Apr 19, 2020 8:05 pm
by michael
I'll see if we can split the initialization of the storage in such a way to better pinpoint is the formatting error is with the backend path or the argument.

Re: Connecting to Wasabi

Posted: Tue Apr 21, 2020 5:05 am
by michaelruge
Hi Michael!

I had a syntax error. I ended up having to take the quotes out of this line:

Code: Select all

MAYAN_DOCUMENTS_STORAGE_BACKEND_ARGUMENTS="{'access_key':'ACCESSKEY','secret_key':'SECRETKEY','bucket_name':'my-mayan-bucket-name','endpoint_url':'https://s3.wasabisys.com','verify':'False'}"
That fixed that problem, but now I am getting this error ( removed the specific file for security reasons and replaced them with the filepath and filename placeholders:

Code: Select all

botocore.exceptions.SSLError: SSL validation failed for https://s3.us-east-2.wasabisys.com/<filepath>/<filename>  [Errno 2] No such file or directory
I checked with Wasabi Tech Support and they are not seeing anything hit their end. I have googled a million different things and tried a bunch of them without success.