Upgrade from 10.0.x to 11.0.5 requires MariaDB 10.4

After following migration steps on Ubuntu 20.04, seahub failed to start. The seahub.log had the following

[ERROR] django.request:241 log_response Internal Server Error: /
Traceback (most recent call last):
  File "/home/seafile/seafile-server-11.0.5/seahub/thirdpart/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
  File "/home/seafile/seafile-server-11.0.5/seahub/thirdpart/django/utils/deprecation.py", line 133, in __call__
    response = self.process_request(request)
  File "/home/seafile/seafile-server-11.0.5/seahub/seahub/base/middleware.py", line 70, in process_request
    self.get_from_db()
  File "/home/seafile/seafile-server-11.0.5/seahub/seahub/base/middleware.py", line 54, in get_from_db
    refresh_cache()
  File "/home/seafile/seafile-server-11.0.5/seahub/seahub/notifications/utils.py", line 23, in refresh_cache
    cache.set('CUR_TOPINFO', Notification.objects.all().filter(primary=1),
  File "/home/seafile/seafile-server-11.0.5/seahub/thirdpart/django/core/cache/backends/filebased.py", line 54, in set
    self._write_content(f, timeout, value)
  File "/home/seafile/seafile-server-11.0.5/seahub/thirdpart/django/core/cache/backends/filebased.py", line 44, in _write_content
    file.write(zlib.compress(pickle.dumps(value, self.pickle_protocol)))
  File "/home/seafile/seafile-server-11.0.5/seahub/thirdpart/django/db/models/query.py", line 351, in __getstate__
    self._fetch_all()
  File "/home/seafile/seafile-server-11.0.5/seahub/thirdpart/django/db/models/query.py", line 1881, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
  File "/home/seafile/seafile-server-11.0.5/seahub/thirdpart/django/db/models/query.py", line 91, in __iter__
    results = compiler.execute_sql(
  File "/home/seafile/seafile-server-11.0.5/seahub/thirdpart/django/db/models/sql/compiler.py", line 1560, in execute_sql
    cursor = self.connection.cursor()
  File "/home/seafile/seafile-server-11.0.5/seahub/thirdpart/django/utils/asyncio.py", line 26, in inner
    return func(*args, **kwargs)
  File "/home/seafile/seafile-server-11.0.5/seahub/thirdpart/django/db/backends/base/base.py", line 330, in cursor
    return self._cursor()
  File "/home/seafile/seafile-server-11.0.5/seahub/thirdpart/django/db/backends/base/base.py", line 306, in _cursor
    self.ensure_connection()
  File "/home/seafile/seafile-server-11.0.5/seahub/thirdpart/django/utils/asyncio.py", line 26, in inner
    return func(*args, **kwargs)
  File "/home/seafile/seafile-server-11.0.5/seahub/thirdpart/django/db/backends/base/base.py", line 289, in ensure_connection
    self.connect()
  File "/home/seafile/seafile-server-11.0.5/seahub/thirdpart/django/utils/asyncio.py", line 26, in inner
    return func(*args, **kwargs)
  File "/home/seafile/seafile-server-11.0.5/seahub/thirdpart/django/db/backends/base/base.py", line 272, in connect
    self.init_connection_state()
  File "/home/seafile/seafile-server-11.0.5/seahub/thirdpart/django/db/backends/mysql/base.py", line 257, in init_connection_state
    super().init_connection_state()
  File "/home/seafile/seafile-server-11.0.5/seahub/thirdpart/django/db/backends/base/base.py", line 239, in init_connection_state
    self.check_database_version_supported()
  File "/home/seafile/seafile-server-11.0.5/seahub/thirdpart/django/db/backends/base/base.py", line 214, in check_database_version_supported
    raise NotSupportedError(
django.db.utils.NotSupportedError: MariaDB 10.4 or later is required (found 10.3.39).

MariaDB 10.4 does not come with Ubuntu 20.04

1 Like

You can install mariadb from the official mariadb repo. Here a simple howto for 10.5.

How To Install MariaDB 10.5 on Ubuntu 22.04|20.04 | ComputingForGeeks

Hope this will help you.

Unfortunately, the requirement for MariaDB 10.4 is not mentioned anywhere in the upgrade notes. This should have been done as the django.db.utils is packaged as part of Seafile.

And MariaDB 10.4 does not come in the Ubuntu repos for Ubuntu 20.04.