Issues with Mirroring and also mayan-edms.py

When things don't work as they should.
Post Reply
riopangeran
Posts: 10
Joined: Thu Sep 12, 2019 8:46 am

Issues with Mirroring and also mayan-edms.py

Post by riopangeran » Sat Oct 12, 2019 10:45 pm

I was trying to do the mirroring indexes to file system folder but returned these errors, is that related with the database backend mayan used? i believe that i already use postgresql as the backend, but the mayan-edms.py always warned me with the sqlite backend.

Code: Select all

root@ubuntu-bionic:/opt/mayan-edms/media# sudo -u mayan /opt/mayan-edms/bin/mayan-edms.py mountindex test_004 /srv/shared_index/
/opt/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/common/apps.py:96: DatabaseWarning: Your database backend is set to use SQLite. SQLite should only be used for development and testing, not for production.
  message=force_text(MESSAGE_SQLITE_WARNING)
Traceback (most recent call last):
  File "/opt/mayan-edms/bin/mayan-edms.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/mirroring/management/commands/mountindex.py", line 40, in handle
    operations=IndexFilesystem(index_slug=options['slug']),
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/mirroring/filesystems.py", line 127, in __init__
    self.index = Index.objects.get(slug=index_slug)
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/db/models/query.py", line 374, in get
    num = len(clone)
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/db/models/query.py", line 232, in __len__
    self._fetch_all()
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/db/models/query.py", line 1121, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/db/models/query.py", line 53, in __iter__
    results = compiler.execute_sql(chunked_fetch=self.chunked_fetch)
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 887, in execute_sql
    cursor = self.connection.cursor()
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 254, in cursor
    return self._cursor()
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 229, in _cursor
    self.ensure_connection()
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 213, in ensure_connection
    self.connect()
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/db/utils.py", line 94, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 213, in ensure_connection
    self.connect()
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 189, in connect
    self.connection = self.get_new_connection(conn_params)
  File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py", line 198, in get_new_connection
    conn = Database.connect(**conn_params)
django.db.utils.OperationalError: unable to open database file
Below the screenshot i took from my configuration file
mayan_configuration.jpg
mayan_configuration.jpg (16.88 KiB) Viewed 24 times

User avatar
rosarior
Posts: 393
Joined: Tue Aug 21, 2018 3:28 am

Re: Issues with Mirroring and also mayan-edms.py

Post by rosarior » Sun Oct 13, 2019 10:50 am

Are your Mayan installation and Mayan media folder in different directories?

riopangeran
Posts: 10
Joined: Thu Sep 12, 2019 8:46 am

Re: Issues with Mirroring and also mayan-edms.py

Post by riopangeran » Mon Oct 14, 2019 2:24 am

My Mayan installation and the media folder is in default directories just like the guideline book, it's under mayan-edms folder.

Is that the problem?

Post Reply