Uploaded documents not visible

When things don't work as they should.
Post Reply
mpleam
Posts: 5
Joined: Fri Mar 06, 2020 6:58 am

Uploaded documents not visible

Post by mpleam »

Hi

Hope someone can help.

I've just had Mayan installed on my server (my support guy opted for a manual install instead of using Docker). Now, I am probably missing something blindingly obvious, but any documents I upload never appearin the list at all.

I have tried uploading as admin and a user, turned on all permissions for the users/roles, but still documents do not appear. Everything else seems to work (I can create cabinets, etc), and if I check on the server, the documents are there (in /opt/mayan-edms/media/document_storage).

When I upload a document it starts off saying step 1 of 4 - document type (I have defined two document types, pdf and docx), step 2 of 4 - select cabinets (I have created a cabinet called 'Manuals'), then step 3 no longer says Step 3 of 4, it says 'Upload a document of type "PDF" from source: Default '. I drag a pdf over, and it uploads, and shows a green tick on the file, but then nothing else happens. If I click on recently added, nothing is shown, although a popup does appear in the top right saying a file has been queued and will be available shortly, but nothing does appear.

I have tried logging out, back in, rebooted my server - nothing makes a difference. Can anyone help me resolve this?

Many thanks

Mark

mpleam
Posts: 5
Joined: Fri Mar 06, 2020 6:58 am

Re: Uploaded documents not visible

Post by mpleam »

mpleam wrote:
Fri Mar 06, 2020 7:10 am
Hi

Hope someone can help.

I've just had Mayan installed on my server (my support guy opted for a manual install instead of using Docker). Now, I am probably missing something blindingly obvious, but any documents I upload never appearin the list at all.

I have tried uploading as admin and a user, turned on all permissions for the users/roles, but still documents do not appear. Everything else seems to work (I can create cabinets, etc), and if I check on the server, the documents are there (in /opt/mayan-edms/media/document_storage).

When I upload a document it starts off saying step 1 of 4 - document type (I have defined two document types, pdf and docx), step 2 of 4 - select cabinets (I have created a cabinet called 'Manuals'), then step 3 no longer says Step 3 of 4, it says 'Upload a document of type "PDF" from source: Default '. I drag a pdf over, and it uploads, and shows a green tick on the file, but then nothing else happens. If I click on recently added, nothing is shown, although a popup does appear in the top right saying a file has been queued and will be available shortly, but nothing does appear.

I have tried logging out, back in, rebooted my server - nothing makes a difference. Can anyone help me resolve this?

Many thanks

Mark
This is making me pull what little hair I have left out! I can't find any reason why things shouldn't work....all the permissions in /opt/mayan-edms are correct, uploaded files are in the document_storage folder, all the relevant helper apps/dependancies are installed (btw this was a direct install on a server running CentOS 8.1), but still documents don't appear.

The only clue (although this may be a red herring) I currently have is that when I chose to send a forgotten password email (which sent fine), the link in the email referenced the mayan-edms.com website....probably nothing to do with it, but hought I would just mention it.

I really would appreciate some help here - everything else in Mayan seems to work as it should (creating tags, cabinets, etc)...I just can't get uploaded documents to appear!

Anyone?????

gtrot
Posts: 10
Joined: Tue Oct 01, 2019 9:03 pm

Re: Uploaded documents not visible

Post by gtrot »

Hi,

Did you press the button on the right (source) after the completion of the upload?
If yes, then I would look in the log.
Image

Regards,
Guillaume
Attachments
screeshot.png
screeshot.png (87.07 KiB) Viewed 337 times

mpleam
Posts: 5
Joined: Fri Mar 06, 2020 6:58 am

Re: Uploaded documents not visible

Post by mpleam »

Hi

Yes, I am pressing the button at the right (thats when I get the document queued for upload message),; as I said previously, the document is being uploaded to the server, it just does not appear in the document list.

Which log are you refererring to? If you mean the event log, there is no mention at all of any file uploads....this is very frustrating! If you are referring to a different log, please advise where I can find it.

Thanks for your input

Mark

gtrot
Posts: 10
Joined: Tue Oct 01, 2019 9:03 pm

Re: Uploaded documents not visible

Post by gtrot »

It's the log in the /mayan-edms/media folder.
screenshot.jpg
screenshot.jpg (9.04 KiB) Viewed 318 times
Maybe it's related to this step of the direct installation:
5. Make the mayan user the owner of the installation directory:

Code: Select all

sudo chown mayan:mayan /opt/mayan-edms -R
in : https://docs.mayan-edms.com/chapters/deploying.html
G

mpleam
Posts: 5
Joined: Fri Mar 06, 2020 6:58 am

Re: Uploaded documents not visible

Post by mpleam »

Hi

Thanks for your continuing assistance. Unfortunately, changing the permissions made no difference. Also, there is no error log either....nor a config.yaml file (although there is a config_backup.yaml file). This makes me wonder if there is an issue with the install...I need to have a think and maybe get my support guy to do a complete reinstall. Strange though that everyting else (creating cabinets, adding users.....) works and is logged, just documents not appearing in the list.

Totally confused - maybe someone can come up with something before I push the button on a reinstall?

mpleam
Posts: 5
Joined: Fri Mar 06, 2020 6:58 am

Re: Uploaded documents not visible

Post by mpleam »

Mmmm....maybe this is a CentOS thing? I lashed up a microserver and installed Debian 10, then did a deployed install as per the instructions on the website - and everything seems to work! Admittedly, its slow, but the server isn't particularly powerful - also, I'm accessing Mayan on the server's local IP, whereas on the CentOS install I'm accessing via a domain (i.e from the internet).

Don't know how this helps me resolve the issue on my CentOS box, but maybe it will give someone some clues? Anyone??

User avatar
rssfed23
Moderator
Moderator
Posts: 212
Joined: Mon Oct 14, 2019 1:18 pm
Location: United Kingdom
Contact:

Re: Uploaded documents not visible

Post by rssfed23 »

You may not have all the package dependencies of Mayan available on centos, or they may be called different things, so it’s possible a dependency is missing so one of the steps fails.

If you’re new to Mayan, a docker installation would likely be simpler as it avoids these types of issues.
Or switch to a Debian/Ubuntu install, as you know that one works.

Conversely, as you mention a support guy this sounds like a company setup, you can reach out to sales@mayan-edms.com and have someone perform/guide the installation for you.

The log files are likely to be in /var/log/supervisor/ by the way. If you do a “tail -F *” inside that directory and then try uploading the file we’ll likely see what the error is. It could be a missing dependency as mentioned above though. The package names are different on centos, and one or two don’t exist at all if I recall (this was a while ago though).
Please bear with us during the current global situation. The team all have families and local communities to look after as well as the community here. Responses may be delayed during this time, but rest assured we will get to your query eventually.

lan
Posts: 2
Joined: Thu Mar 19, 2020 7:40 am

Re: Uploaded documents not visible

Post by lan »

I stumbled upon this error too, and here's what I found:
1. Document is uploading in mayan/media/shared_files
2. Mayan do INSERT to SQL table common_shareduploadedfile about it:

Code: Select all

INSERT INTO "common_shareduploadedfile" ("file", "filename", "datetime") VALUES ('shared-file-30a74a459ed94d919ea0cbc7d55c18b9', 'skyhost.txt
', '2020-03-19T07:20:27.216159+00:00'::timestamptz) RETURNING "common_shareduploadedfile"."id"
COMMIT
3. Then INSERT to SQL table documents_document:

Code: Select all

INSERT INTO "documents_document" ("uuid", "document_type_id", "label", "description", "date_added", "language", "in_trash", "deleted_date_time", "is_stub") VALUES ('dc174490-2ab0-49bb-9596-f6a6415337a0'::uuid, 2, 'skyhost.txt', '', '2020-03-19T07:20:27.263200+00:00'::timestamptz, 'eng', false, NULL, true) RETURNING "documents_document"."id"
 INSERT INTO "documents_recentdocument" ("user_id", "document_id", "datetime_accessed") VALUES (1, 9, '2020-03-19T07:20:27.267869+00:00'::timestamptz) RETURNING "documents_recentdocument"."id"
COMMIT
4. Then INSERT to SQL table documents_documentversion, but then SELECT something about document signature base model and then ROLLBACK! I'll paste all transaction log here.

Code: Select all

BEGIN
SELECT (1) AS "a" FROM "checkouts_newversionblock" WHERE "checkouts_newversionblock"."document_id" = 9 LIMIT 1
INSERT INTO "documents_documentversion" ("document_id", "timestamp", "comment", "file", "mimetype", "encoding", "checksum") VALUES (9, '2020-03-19T07:20:27.300745+00:00'::timestamptz, '', '996042af-e54b-460c-a7c0-4c2b8edc4f63', NULL, NULL, NULL) RETURNING "documents_documentversion"."id" 
SELECT "document_signatures_signaturebasemodel"."id", "document_signatures_signaturebasemodel"."document_version_id", "document_signatures_signaturebasemodel"."date", "document_signatures_signaturebasemodel"."key_id", "document_signatures_signaturebasemodel"."signature_id", "document_signatures_signaturebasemodel"."public_key_fingerprint", "document_signatures_embeddedsignature"."signaturebasemodel_ptr_id" FROM "document_signatures_embeddedsignature" INNER JOIN "document_signatures_signaturebasemodel" ON ("document_signatures_embeddedsignature"."signaturebasemodel_ptr_id" = "document_signatures_signaturebasemodel"."id") WHERE "document_signatures_signaturebasemodel"."document_version_id" = 8 ORDER BY "document_signatures_signaturebasemodel"."id" ASC
ROLLBACK
5. And then in next transaction after couple of SELECTS goes DELETEs:

Code: Select all

DELETE FROM "cabinets_cabinet_documents" WHERE "cabinets_cabinet_documents"."document_id" IN (9)
DELETE FROM "checkouts_documentcheckout" WHERE "checkouts_documentcheckout"."document_id" IN (9)
DELETE FROM "checkouts_newversionblock" WHERE "checkouts_newversionblock"."document_id" IN (9)
DELETE FROM "document_indexing_indexinstancenode_documents" WHERE "document_indexing_indexinstancenode_documents"."document_id" IN (9)
DELETE FROM "documents_duplicateddocument_documents" WHERE "documents_duplicateddocument_documents"."document_id" IN (9)
DELETE FROM "documents_favoritedocument" WHERE "documents_favoritedocument"."document_id" IN (9)
DELETE FROM "documents_recentdocument" WHERE "documents_recentdocument"."document_id" IN (9)
DELETE FROM "events_notification" WHERE "events_notification"."action_id" IN (242)
DELETE FROM "documents_document" WHERE "documents_document"."id" IN (9)
DELETE FROM "actstream_action" WHERE "actstream_action"."id" IN (242)
And so the uploaded document is deleted from documents_document

lan
Posts: 2
Joined: Thu Mar 19, 2020 7:40 am

Re: Uploaded documents not visible

Post by lan »

To all that will stumble upon this problem, it has been resolved, see this issue. In short: Mayan have hardcoded paths to external components, which in OSes other than Debian (in FreeBSD for example) have different paths.

Post Reply