From b01e8707a3354d73b54433ccda6ee02e515a4003 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Thu, 4 Apr 2019 17:07:41 -0400 Subject: [PATCH] Add troubleshooting documenation topic Signed-off-by: Roberto Rosario --- docs/index.rst | 1 + docs/topics/faq.rst | 37 -------------- docs/topics/troubleshooting.rst | 86 +++++++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+), 37 deletions(-) create mode 100644 docs/topics/troubleshooting.rst diff --git a/docs/index.rst b/docs/index.rst index 62afc7c8b8..c5d1cd8f73 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -29,6 +29,7 @@ repository for electronic documents. topics/integration topics/advanced topics/administration + topics/troubleshooting topics/development topics/faq topics/license diff --git a/docs/topics/faq.rst b/docs/topics/faq.rst index 6baea69cdb..45b9b0c362 100644 --- a/docs/topics/faq.rst +++ b/docs/topics/faq.rst @@ -83,43 +83,6 @@ moment this could cause problems is when running South migrations during upgrades, if a migration fails the database structure is left in a transitory state and has to be reverted manually before trying again. -_mysql_exceptions. OperationalError: (1267, "Illegal mix of collations (latin1_swedish_ci, IMPLICIT) and (utf8_general_ci, COERCIBLE) for operation ‘='”) ---------------------------------------------------------------------------------------------------------------------------------------------------------- - -:: - - $ mayan-edms.py shell - >>> from django.db import connection - >>> cursor = connection.cursor() - >>> cursor.execute('SHOW TABLES') - >>> results=[] - >>> for row in cursor.fetchall(): results.append(row) - >>> for row in results: cursor.execute('ALTER TABLE %s CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;' % (row[0])) - -References: - -* http://stackoverflow.com/questions/1073295/django-character-set-with-mysql-weirdness - - -Incorrect string value: ``'xE2x80x95rs6…'`` for column ``'content'`` at row 1 ------------------------------------------------------------------------------ - -When using MySQL and doing OCR on languages other than English - -Use utf-8 collation on MySQL server, or at least in table -‘documents_documentpage', ‘content' field - -References: - -* http://groups.google.com/group/django-users/browse_thread/thread/429447086fca6412 -* http://markmail.org/message/bqajx2utvmtriixi - -Error "django.db.utils.IntegrityError IntegrityError: (1452, ‘Cannot add or update a child row: a foreign key constraint fails (`…`.`…`, CONSTRAINT `…_refs_id_b0252274` FOREIGN KEY (`…`) REFERENCES `…` (`…`))') ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - -Solution: -Convert all MySQL tables to the same type, either all MyISAM or InnoDB - Document versions ================= diff --git a/docs/topics/troubleshooting.rst b/docs/topics/troubleshooting.rst new file mode 100644 index 0000000000..fe7d4a8ce7 --- /dev/null +++ b/docs/topics/troubleshooting.rst @@ -0,0 +1,86 @@ +############### +Troubleshooting +############### + + +******** +Database +******** + +_mysql_exceptions. OperationalError: (1267, "Illegal mix of collations (latin1_swedish_ci, IMPLICIT) and (utf8_general_ci, COERCIBLE) for operation ‘='”) +========================================================================================================================================================= + +:: + + $ mayan-edms.py shell + >>> from django.db import connection + >>> cursor = connection.cursor() + >>> cursor.execute('SHOW TABLES') + >>> results=[] + >>> for row in cursor.fetchall(): results.append(row) + >>> for row in results: cursor.execute('ALTER TABLE %s CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;' % (row[0])) + +References: + +* http://stackoverflow.com/questions/1073295/django-character-set-with-mysql-weirdness + + +Incorrect string value: ``'xE2x80x95rs6…'`` for column ``'content'`` at row 1 +============================================================================= + +When using MySQL and doing OCR on languages other than English + +Use utf-8 collation on MySQL server, or at least in table +‘documents_documentpage', ‘content' field + +References: + +* http://groups.google.com/group/django-users/browse_thread/thread/429447086fca6412 +* http://markmail.org/message/bqajx2utvmtriixi + + +Error "django.db.utils.IntegrityError IntegrityError: (1452, ‘Cannot add or update a child row: a foreign key constraint fails (`…`.`…`, CONSTRAINT `…_refs_id_b0252274` FOREIGN KEY (`…`) REFERENCES `…` (`…`))') +================================================================================================================================================================================================================== + +Solution: +Convert all MySQL tables to the same type, either all MyISAM or InnoDB + + +****** +Docker +****** + +MAYAN_APT_INSTALLS does not work for Archlinux with kernels > 4.14 +================================================================== + +This is caused by a change from kernel 4.18 - 4.19. Metacopy on these kernels +is set to yes in archlinux kernels (/sys/module/overlay/parameters/metacopy) +and overlayfs should override this which it does not at the moment. + +The workaround is to disable metacopy:: + + echo N | sudo tee /sys/module/overlay/parameters/metacopy + +References: + +* https://bbs.archlinux.org/viewtopic.php?id=241866 +* https://www.spinics.net/lists/linux-unionfs/msg06316.html + + + +********* +Passwords +********* + +Missing initial credentials or admin password reset +=================================================== + +First you need to know the name of the Docker container running Mayan EDMS +on your setup with:: + + docker ps + +Then execute the password reset command inside the Docker container:: + + docker exec -ti /bin/bash + /opt/mayan-edms/bin/mayan-edms.py changepassword admin