Mayan EDMS issueshttps://gitlab.com/mayan-edms/mayan-edms/-/issues2023-09-12T10:03:45Zhttps://gitlab.com/mayan-edms/mayan-edms/-/issues/1092Add documentation for Elasticsearch and Docker Compose2023-09-12T10:03:45ZMax BachhuberAdd documentation for Elasticsearch and Docker ComposeI am currently trying to set up the new Whoosh backend with the elasticsearch that is specified in `docker-compose.yml`.
After around two hours digging through the code i think i have to set something in `SEARCH_BACKEND_ARGUMENTS`.
Can...I am currently trying to set up the new Whoosh backend with the elasticsearch that is specified in `docker-compose.yml`.
After around two hours digging through the code i think i have to set something in `SEARCH_BACKEND_ARGUMENTS`.
Can i do this via an environment variable in the .env file? If so what to specify there?
Could you add an example to the docker-compose.yml file? Because there is this elasticsearch service, but no information on how to use it.
Thank you very much in advance :smile:https://gitlab.com/mayan-edms/mayan-edms/-/issues/1070Missing information on using specific volumes with docker-compose2023-09-12T10:03:46ZSteffen NeumannMissing information on using specific volumes with docker-composeHi,
the https://docs.mayan-edms.com/chapters/docker/install_docker_compose.html and the compose/env_file have little information on the storage setup and/or preferred way to use specific storage locations. This is important for e.g. bac...Hi,
the https://docs.mayan-edms.com/chapters/docker/install_docker_compose.html and the compose/env_file have little information on the storage setup and/or preferred way to use specific storage locations. This is important for e.g. backup configuration.
I'd like to see
1. where is data stored by default, e.g. for backup configuration
2. how to specify specific volumes (e.g. on dedicated storage outside the docker host root FS)
Yours,
Steffen
Tags: documentation dockerhttps://gitlab.com/mayan-edms/mayan-edms/-/issues/947Cloudron package issues2022-08-04T05:42:29ZJohannes ZellnerCloudron package issuesWe are in the process of packaging Mayan for Cloudron due to popular demand ( https://forum.cloudron.io/topic/1066/mayan-edms/35 ) unfortunately I hit a road block now and I am unable to resolve this on my own.
The issue is, that on Clo...We are in the process of packaging Mayan for Cloudron due to popular demand ( https://forum.cloudron.io/topic/1066/mayan-edms/35 ) unfortunately I hit a road block now and I am unable to resolve this on my own.
The issue is, that on Cloudron all apps run in a read-only filesystem for data-integrity (update/backup/restore) and security reasons. This means for Mayan, I would have to install dependencies and collect static files during image/package building and then run `mayan-edms.py initialsetup --no-dependencies` to trigger db migration as well as initial admin creation.
This means I am running the following in the package creation:
```
mayan-edms.py installdependencies
mayan-edms.py preparestatic --no-input
mayan-edms.py collectstatic --no-input
```
Note that at this point no postgresdb is available yet, since this is just image/package creation.
When the app is installed and `initalsetup` is called, the db is available and seemingly the app is up and running, however various static assets are missing, like fontawesome and such.
All I could figure out so far is, that the `installdependencies` and the static asset commands produce a different output if run with or without a valid postgres connection (without postgres, a warning about sqlite fallback is shown)
Any pointers into the right direction would be greatly appreciated, also some explanation of why the db connection would make a difference here would also be great to maybe find a solution here.
Thanks in advance!Version 4.4Roberto RosarioEric RiggsRoberto Rosariohttps://gitlab.com/mayan-edms/mayan-edms/-/issues/934mayan_settings folder not created upon Direct Deployment2021-08-21T04:14:57ZBwmayan_settings folder not created upon Direct DeploymentWhen following the [direct deployment](https://docs.mayan-edms.com/chapters/deploying.html) documentation after installation the mayan_settings folder isn't created in my own mayan folder (/data/.envs/mayan3.7) so the explanation of addi...When following the [direct deployment](https://docs.mayan-edms.com/chapters/deploying.html) documentation after installation the mayan_settings folder isn't created in my own mayan folder (/data/.envs/mayan3.7) so the explanation of adding custom config settings as explained in [Settings Documentation](https://docs.mayan-edms.com/chapters/settings.html#via-python-settings-files) doesn't work.
Also recreating the folder and make it a module with the `__init__.py` in it doesn't work.
```
> root@localhost:/data/.envs/mayan3.7/media/mayan_settings# ll
> total 8
> drwxr-xr-x 1 mayan mayan 48 dec 14 10:37 ./
> drwxrwxr-x 1 mayan mayan 226 dec 14 10:40 ../
> -rw-rw-r-- 1 mayan mayan 72 dec 14 10:29 __init__.py
> -rw-r--r-- 1 mayan mayan 94 dec 14 10:33 mysettings.py
> root@localhost:/data/.envs/mayan3.7/media/mayan_settings# cat __init__.py
> root@localhost:/data/.envs/mayan3.7/media/mayan_settings# cat mysettings.py
> from mayan.settings.production import *
> [supervisord]
> environment=
> COMMON_PAGINATE_BY=100
> root@localhost:/data/.envs/mayan3.7/media/mayan_settings#
```
```
> root@localhost:~$ head -n 5 /etc/supervisor/conf.d/mayan.conf
> [supervisord]
> environment=
> PYTHONPATH="/data/.envs/mayan3.7/media/mayan_settings",
> DJANGO_SETTINGS_MODULE=mayan.media.mayan_settings.mysettings,
> MAYAN_MEDIA_ROOT="/data/.envs/mayan3.7/media",
```
Obviously the server isn't running as `mayan.settings.production` isn't loaded nowVersion 4.2https://gitlab.com/mayan-edms/mayan-edms/-/issues/857Troubleshooting entry on how to turn on debug logging2022-08-04T05:25:29ZRoberto RosarioTroubleshooting entry on how to turn on debug loggingProviding a debug log is the first step to diagnose issues. Add an entry to the troubleshooting part of the documentation explaining how to do this via Mayan's logging settings.
Since this has changed completely in version 3.5 by using...Providing a debug log is the first step to diagnose issues. Add an entry to the troubleshooting part of the documentation explaining how to do this via Mayan's logging settings.
Since this has changed completely in version 3.5 by using a separate app to do logging, this issue will need to include two patches. One for the current version (using the logging from the common app) and for the next version (using the logging app).
- Version 3.4 setting: https://gitlab.com/mayan-edms/mayan-edms/-/blob/series/3.4/mayan/apps/common/settings.py#L65
- Version 3.5 setting: https://gitlab.com/mayan-edms/mayan-edms/-/blob/series/3.5/mayan/apps/logging/settings.py#L24
Patches for version 3.4 should be submitted to the branch ``series/3.4`` and to ``series/3.5`` for version 3.5.Version 4.4https://gitlab.com/mayan-edms/mayan-edms/-/issues/829Index mirror does not allow access to documents2022-08-04T05:23:46ZBrandon WIndex mirror does not allow access to documents# Index mirror does not allow access to documents
When an index is mirrored, there is a filesystem that represents the structure of the index (per pp. 165--165 of *Exploring Mayan EDMS*). However, individual documents cannot be read bec...# Index mirror does not allow access to documents
When an index is mirrored, there is a filesystem that represents the structure of the index (per pp. 165--165 of *Exploring Mayan EDMS*). However, individual documents cannot be read because they are reported as 0 bytes (empty):
```console
root@572b11a50b64:/# ls -la /index_creation_date/2020/06
total 0
dr-xr-xr-x 2 root root 0 Jun 11 21:45 .
dr-xr-xr-x 2 root root 0 Jun 11 21:45 ..
-r-xr-xr-x 1 root root 0 Jun 11 21:43 test.pdf
root@572b11a50b64:/# file /index_creation_date/2020/06/test.pdf
/index_creation_date/2020/06/test.pdf: empty
```
`test.pdf` is not readable because it is 0 bytes. When I try to open the file with a PDF reader, I get an "Unable to Open Document (no such file or directory)" error.
## Expected behavior
Expected behavior is that the index mirror should report the actual size of the document and allow the file to be accessed via the filesystem, something like this:
```console
doe@myworkstation:~/Desktop$ # File that I uploaded to Mayan EDMS
doe@myworkstation:~/Desktop$ ls -la test.pdf
-rw-rw-r-- 1 doe doe 3908 Jun 11 15:55 test.pdf
doe@myworkstation:~/Desktop$ file test.pdf
test.pdf: PDF document, version 1.2
```
---
## To reproduce the issue
### Create a reference installation
* Follow directions at
https://docs.mayan-edms.com/chapters/docker/install_docker_compose.html
* Modify default `docker-compose.yml` file's `services/app` portion
- Change port to `"180:8000"` (to get it to work on my system)
- Add additional options to enable FUSE to work (required for mirroring):
```yaml
cap_add:
# Allows mount of FUSE filesystem
+ SYS_ADMIN
devices:
# Enables the FUSE filesystem, which is required for Mayan to mirror an index
+ "/dev/fuse:/dev/fuse"
security_opt:
# Allows access to FUSE filesystem
+ apparmor:unconfined
```
- **Note:** The full `docker-compose.yml` file I'm using is attached to this issue ticket.
* Run `up` command with custom project name: `docker-compose --file docker-compose.yml --project-name mayan_ref up --detach`
### Upload `test.pdf` using Mayan's web interface
* Use temporary admin login (fresh installation)
* Click Documents > New document
* Select "Default" document type, click Next step
* Leave language option at default value ("English") and leave "Expand compressed files" unchecked
* Click on "click here to upload files," select `test.pdf` from local hard drive (`~/Desktop` folder on my system)
* Verify the test document is visible in index
- Click "Indexes," then "Creation date" (this index is created automatically at installation), then navigate to document
- Verify document preview is visible, and click the "Properties" tab in the document view; verify file size is greater than zero (it is 3.8 KB on my system)
* **Note:** The full `test.pdf` file I'm using is also attached to this issue ticket (I've tried with multiple files and they all have the same result, though).
### Log into the Mayan container's terminal
* `doe@myworkstation:~/Desktop$ docker exec -it mayan_ref_app_1 /bin/bash`
* Use this terminal for the rest of the commands
### Mirror the "Creation date" index
* Install fuse: `sudo apt-get update; sudo apt-get install fuse`
* Create the mount point: `mkdir /index_creation_date`
* Execute `mountindex` command: `/opt/mayan-edms/bin/mayan-edms.py mountindex creation_date /index_creation_date &`
### Check file size from the terminal
```
root@572b11a50b64:/# ls -la /index_creation_date/2020/06
total 0
dr-xr-xr-x 2 root root 0 Jun 11 21:45 .
dr-xr-xr-x 2 root root 0 Jun 11 21:45 ..
-r-xr-xr-x 1 root root 0 Jun 11 21:43 test.pdf
root@572b11a50b64:/# file /index_creation_date/2020/06/test.pdf
/index_creation_date/2020/06/test.pdf: empty
```
`test.pdf` is reported as an empty file, 0 bytes, in the file system, even though it is listed as 3.8 KB and is viewable through the web interface.[test.pdf](/uploads/4e5a1c102581c0d14bf7e36e571fb552/test.pdf)Version 4.4https://gitlab.com/mayan-edms/mayan-edms/-/issues/727Add workflow tansition field and context documentation2022-08-04T05:25:47ZRoberto RosarioAdd workflow tansition field and context documentationFrom forum post: https://forum.mayan-edms.com/viewtopic.php?t=1529
Hi there,
How do I go about accessing the value of a workflow transition field from a state action?
For example, if I create a transition field called "test_field", ho...From forum post: https://forum.mayan-edms.com/viewtopic.php?t=1529
Hi there,
How do I go about accessing the value of a workflow transition field from a state action?
For example, if I create a transition field called "test_field", how would I get the content of that field via a template (say to use as part of an HTTP post payload)? I guess something like {{ document.workflow.test_field }} but I've tried several without any success, and can't find anything in the docs.
Many thanks in advance.Version 4.4https://gitlab.com/mayan-edms/mayan-edms/-/issues/551Mayan EDMS NFS Locking Issues2022-01-09T11:52:30ZJ majerusMayan EDMS NFS Locking IssuesWhen trying to run Mayan EDMS docker container off a nfs share you are greeted with the errors below. I tried with a few different NFS settings and had the same issues. Moving the volume to local storage resolved the errors.
`Mayan_EDM...When trying to run Mayan EDMS docker container off a nfs share you are greeted with the errors below. I tried with a few different NFS settings and had the same issues. Moving the volume to local storage resolved the errors.
`Mayan_EDMS_Web | mayan: starting entrypoint.sh
Mayan_EDMS_Web | mayan: os_package_installs()
Mayan_EDMS_Web | mayan: pip_installs()
Mayan_EDMS_Web | mayan: upgrade()
Mayan_EDMS_Web | Operations to perform:
Mayan_EDMS_Web | Apply all migrations: acls, actstream, admin, auth, authtoken, autoadmin, cabinets, checkouts, common, contenttypes, converter, django_gpg, djcelery, document_comments, document_indexing, document_parsing, document_signatures, document_states, documents, dynamic_search, events, linking, lock_manager, mailer, mayan_statistics, metadata, motd, ocr, permissions, sessions, sites, sources, tags, user_management
Mayan_EDMS_Web | Running migrations:
Mayan_EDMS_Web | No migrations to apply.
Mayan_EDMS_Web | Your models have changes that are not yet reflected in a migration, and so won't be applied.
Mayan_EDMS_Web | Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.
Mayan_EDMS_Web | Installing JavaScript packages for app: appearance - /opt/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/appearance/static/appearance
Mayan_EDMS_Web | Installing package: jquery=3.3.1
Mayan_EDMS_Web | Best version: 3.3.1
Mayan_EDMS_Web | Installing package: jquery-match-height=0.7.2
Mayan_EDMS_Web | Best version: 0.7.2
Mayan_EDMS_Web | Installing package: bootstrap=3.3.7
Mayan_EDMS_Web | Best version: 3.3.7
Mayan_EDMS_Web | Installing package: bootswatch=3.3.7
Mayan_EDMS_Web | Best version: 3.3.7
Mayan_EDMS_Web | Installing package: urijs=1.19.1
Mayan_EDMS_Web | Best version: 1.19.1
Mayan_EDMS_Web | Installing package: jquery-lazyload=1.9.3
Mayan_EDMS_Web | Best version: 1.9.3
Mayan_EDMS_Web | Installing package: toastr=2.1.4
Mayan_EDMS_Web | Best version: 2.1.4
Mayan_EDMS_Web | Installing package: select2=4.0.3
Mayan_EDMS_Web | Best version: 4.0.3
Mayan_EDMS_Web | Installing package: jquery-form=4.2.2
Mayan_EDMS_Web | Best version: 4.2.2
Mayan_EDMS_Web | Installing JavaScript packages for app: mayan_statistics - /opt/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/mayan_statistics/static/statistics
Mayan_EDMS_Web | Installing package: chart.js=2.7.2
Mayan_EDMS_Web | Best version: 2.7.2
Mayan_EDMS_Web | Installing JavaScript packages for app: sources - /opt/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/sources/static/sources
Mayan_EDMS_Web | Installing package: dropzone=5.4.0
Mayan_EDMS_Web | Best version: 5.4.0
Mayan_EDMS_Web | Deleting 'appearance/package.json'
Mayan_EDMS_Web | Copying '/opt/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/appearance/static/appearance/package.json'
Mayan_EDMS_Web | Traceback (most recent call last):
Mayan_EDMS_Web | File "/opt/mayan-edms/bin/mayan-edms.py", line 10, in <module>
Mayan_EDMS_Web | execute_from_command_line(sys.argv)
Mayan_EDMS_Web | File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
Mayan_EDMS_Web | utility.execute()
Mayan_EDMS_Web | File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
Mayan_EDMS_Web | self.fetch_command(subcommand).run_from_argv(self.argv)
Mayan_EDMS_Web | File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
Mayan_EDMS_Web | self.execute(*args, **cmd_options)
Mayan_EDMS_Web | File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
Mayan_EDMS_Web | output = self.handle(*args, **options)
Mayan_EDMS_Web | File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 199, in handle
Mayan_EDMS_Web | collected = self.collect()
Mayan_EDMS_Web | File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 124, in collect
Mayan_EDMS_Web | handler(path, prefixed_path, storage)
Mayan_EDMS_Web | File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 364, in copy_file
Mayan_EDMS_Web | self.storage.save(prefixed_path, source_file)
Mayan_EDMS_Web | File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/core/files/storage.py", line 54, in save
Mayan_EDMS_Web | return self._save(name, content)
Mayan_EDMS_Web | File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/core/files/storage.py", line 350, in _save
Mayan_EDMS_Web | locks.lock(fd, locks.LOCK_EX)
Mayan_EDMS_Web | File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/core/files/locks.py", line 108, in lock
Mayan_EDMS_Web | ret = fcntl.flock(_fd(f), flags)
Mayan_EDMS_Web | IOError: [Errno 37] No locks available
^CGracefully stopping... (press Ctrl+C again to force)
`Version 4.3https://gitlab.com/mayan-edms/mayan-edms/-/issues/493Mayan docker container does not successful start when external provisioned st...2022-08-04T05:12:11ZFerronNMayan docker container does not successful start when external provisioned storage is used.I've configured the mayan-edms docker image (mayanedms/mayanedms:latest) to run on my kubernetes cluster.
It's connected to a PostgreSQL server as described in the documentation.
Docker and kubernetes say the container is healthy, but I...I've configured the mayan-edms docker image (mayanedms/mayanedms:latest) to run on my kubernetes cluster.
It's connected to a PostgreSQL server as described in the documentation.
Docker and kubernetes say the container is healthy, but I can't connect to port 80.
Also the log stops at `Copying '/usr/local/lib/python2.7/dist-packages/mayan/apps/appearance/static/appearance/package.json'`
Complete log :
````
mayan: starting entrypoint.sh
mayan: os_package_installs()
mayan: pip_installs()
mayan: initialize()
Operations to perform:
Apply all migrations: acls, actstream, admin, auth, authtoken, autoadmin, cabinets, checkouts, common, contenttypes, converter, django_gpg, djcelery, document_comments, document_indexing, document_parsing, document_signatures, document_states, documents, dynamic_search, events, linking, lock_manager, mailer, mayan_statistics, metadata, motd, ocr, permissions, sessions, sites, sources, tags
Running migrations:
No migrations to apply.
Your models have changes that are not yet reflected in a migration, and so won't be applied.
Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.
Installing JavaScript packages for app: appearance - /usr/local/lib/python2.7/dist-packages/mayan/apps/appearance/static/appearance
Installing package: jquery=3.3.1
Best version: 3.3.1
Installing package: jquery-match-height=0.7.2
Best version: 0.7.2
Installing package: bootstrap=3.3.7
Best version: 3.3.7
Installing package: bootswatch=3.3.7
Best version: 3.3.7
Installing package: urijs=1.19.1
Best version: 1.19.1
Installing package: jquery-lazyload=1.9.3
Best version: 1.9.3
Installing package: toastr=2.1.4
Best version: 2.1.4
Installing package: select2=4.0.3
Best version: 4.0.3
Installing package: jquery-form=4.2.2
Best version: 4.2.2
Installing JavaScript packages for app: mayan_statistics - /usr/local/lib/python2.7/dist-packages/mayan/apps/mayan_statistics/static/statistics
Installing package: chart.js=2.7.2
Best version: 2.7.2
Installing JavaScript packages for app: sources - /usr/local/lib/python2.7/dist-packages/mayan/apps/sources/static/sources
Installing package: dropzone=5.4.0
Best version: 5.4.0
autoadmin.models <8> [ERROR] "create_autoadmin() line 62 Super admin user already exists. -- login: admin"
Deleting 'appearance/package.json'
Copying '/usr/local/lib/python2.7/dist-packages/mayan/apps/appearance/static/appearance/package.json'
````
How can I narrow down the problem?
Thanks!
UPDATE:
I Figured out that the container is not starting when I use provisioned storage (NFS) mounted at `/var/lib/mayan`.
When I use local storage I don't experience this problem.
@rosarior Any idea what can cause this issue and how I can troubleshoot this?
I guess that it goes wrong within the `initialize()` (line 25 entrypoint.sh)Version 4.4Rob KnightRob Knight