Seafile Server Problem after Docker restart - MariaDB Error?

Hi all,

I’m new and very happy with Seafile and we are using it for our small company as internal cloud solution. We are running seafile in a docker environment on a QNAP NAS behind traefik as reverse proxy. Volumes are mounted to store data files from mysql and seafile (see below).
After updating the container station and a restart there is a problem with the MariaDB container - (Operating system error number 13 in a file operation). Backup or new empty folder shows also a number 13 file operation error.
I havn’t changed any user permissions of existing files and folders on the host system. Changing user permissions and owner from 999 to admin:administrators with backup doesn’t worked and is changed back to 999:999 after docker-compose up.

Hope someone can help me. Thank you very much!

BR
Ralf

User and folder permissions on the host systems look like:
drwxrwx— 6 admin administrators 6 2023-06-19 13:50 ./
drwxrwxrwx 9 admin administrators 10 2023-07-14 10:04 …/
drwxrwx— 3 admin administrators 3 2023-06-19 13:50 logs/
drwxrwx— 8 999 999 18 2023-07-14 11:18 mysql/
drwxrwx— 3 admin administrators 3 2023-06-19 13:50 nginx/
drwxrwx— 7 admin administrators 7 2023-06-19 13:50 seafile/

mysql subfolder:
[/share/Public/Seafile/mysql] # ls -lah
total 112M
drwxrwx— 8 999 999 18 2023-07-14 11:18 ./
drwxrwx— 6 admin administrators 6 2023-06-19 13:50 …/
-rwxrwx— 1 999 999 17M 2023-07-14 11:18 aria_log.00000001*
-rwxrwx— 1 999 999 52 2023-07-14 11:18 aria_log_control*
drwxrwx— 2 999 999 27 2023-06-19 13:50 ccnet_db/
-rwxrwx— 1 999 999 5.0K 2023-07-14 08:33 ib_buffer_pool*
-rwxrwx— 1 999 999 12M 2023-07-14 08:33 ibdata1*
-rwxrwx— 1 999 999 96M 2023-07-14 08:33 ib_logfile0*
-rwxrwx— 1 999 999 14 2023-06-19 13:50 mariadb_upgrade_info*
-rwxrwx— 1 999 999 0 2023-06-19 13:50 multi-master.info*
drwxrwx— 2 999 999 90 2023-06-19 13:50 mysql/
drwxrwx— 2 999 999 3 2023-06-19 13:50 performance_schema/
drwxrwx— 2 999 999 81 2023-06-19 13:50 seafile_db/
drwxrwx— 2 999 999 173 2023-06-19 13:50 seahub_db/
drwxrwx— 2 999 999 106 2023-06-19 13:50 sys/
-rwxrwx— 1 999 999 10M 2023-07-14 08:33 undo001*
-rwxrwx— 1 999 999 10M 2023-07-14 08:33 undo002*
-rwxrwx— 1 999 999 10M 2023-07-14 08:33 undo003*

MariaDB Log:
2023-07-14 09:16:38+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:11.0.2+maria~ubu2204 started.
2023-07-14 09:16:39+00:00 [Note] [Entrypoint]: Switching to dedicated user ‘mysql’
2023-07-14 09:16:39+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:11.0.2+maria~ubu2204 started.
2023-07-14 09:16:39+00:00 [Note] [Entrypoint]: MariaDB upgrade not required
2023-07-14 9:16:39 0 [Note] Starting MariaDB 11.0.2-MariaDB-1:11.0.2+maria~ubu2204 source revision 0005f2f06c8e1aea4915887decad67885108a929 as process 1
2023-07-14 9:16:39 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2023-07-14 9:16:39 0 [Note] InnoDB: Number of transaction pools: 1
2023-07-14 9:16:39 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2023-07-14 9:16:39 0 [Warning] mariadbd: io_uring_queue_init() failed with ENOMEM: try larger memory locked limit, ulimit -l, or htps://mariadb.com/kb/en/systemd/#configuring-limitmemlock under systemd (262144 bytes required)
2023-07-14 9:16:39 0 [Warning] InnoDB: liburing disabled: falling back to innodb_use_native_aio=OFF
2023-07-14 9:16:39 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
2023-07-14 9:16:39 0 [Note] InnoDB: Completed initialization of buffer pool
2023-07-14 9:16:39 0 [Note] InnoDB: Buffered log writes (block size=512 bytes)
2023-07-14 9:16:39 0 [Note] InnoDB: Opened 3 undo tablespaces
2023-07-14 9:16:39 0 [Note] InnoDB: 128 rollback segments in 3 undo tablespaces are active.
2023-07-14 9:16:39 0 [Note] InnoDB: Setting file ‘./ibtmp1’ size to 12.000MiB. Physically writing the file full; Please wait …
2023-07-14 9:16:39 0 [Note] InnoDB: File ‘./ibtmp1’ size is now 12.000MiB.
2023-07-14 9:16:39 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2023-07-14 9:16:39 0 [ERROR] InnoDB: The error means mariadbd does not have the access rights to the directory.
2023-07-14 9:16:39 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2023-07-14 9:16:39 0 [ERROR] InnoDB: The error means mariadbd does not have the access rights to the directory.
2023-07-14 9:16:39 0 [Warning] InnoDB: Cannot open ‘./ibtmp1’.
2023-07-14 9:16:39 0 [ERROR] InnoDB: The innodb_temporary data file cannot be re-opened after check_file_spec() succeeded!
2023-07-14 9:16:39 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2023-07-14 9:16:39 0 [Note] InnoDB: FTS optimize thread exiting.
2023-07-14 9:16:39 0 [Note] InnoDB: Starting shutdown…
2023-07-14 9:16:39 0 [Note] InnoDB: Removed temporary tablespace data file: “./ibtmp1”
2023-07-14 9:16:39 0 [ERROR] Plugin ‘InnoDB’ init function returned error.
2023-07-14 9:16:39 0 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
2023-07-14 9:16:39 0 [Note] Plugin ‘FEEDBACK’ is disabled.
2023-07-14 9:16:39 0 [Note] Plugin ‘wsrep-provider’ is disabled.
2023-07-14 9:16:39 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2023-07-14 9:16:39 0 [ERROR] Aborting

Docker-compose:
version: “3”

services:
  traefik:
    image: traefik:latest
    restart: always
    container_name: traefik

    command:
      - "--log.level=ERROR"
      - "--providers.docker"
      - "--providers.docker.exposedByDefault=false"
      - "--api.dashboard=true"
      - "--entrypoints.web.address=:80"
      - "--entrypoints.websecure.address=:443"
      - "--certificatesresolvers.letsencrypt.acme.email=XXXXXXXXXXXXXXXXXXXXXX"
      - "--certificatesresolvers.letsencrypt.acme.storage=/etc/traefik/acme/acme.json"
      - "--certificatesresolvers.letsencrypt.acme.tlschallenge=true"
      #- "--certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web"
      - "--entrypoints.web.http.redirections.entryPoint.to=websecure"
      - "--entrypoints.web.http.redirections.entryPoint.scheme=https"

    ports:
      - "80:80"
      - "443:443"

    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - ./letsencrypt/acme.json:/etc/traefik/acme/acme.json

    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.dashboard-http.entrypoints=web"
      - "traefik.http.routers.dashboard-http.rule=Host(`XXXXXXXXXXX`)"
      - "traefik.http.routers.dashboard-http.service=api@internal"
      - "traefik.http.routers.dashboard.entrypoints=websecure"
      - "traefik.http.routers.dashboard.rule=Host(`XXXXXXXXXXXX`)"
      - "traefik.http.routers.dashboard.tls=true"
      - "traefik.http.routers.dashboard.tls.certresolver=letsencrypt"
      - "traefik.http.routers.dashboard.service=api@internal"
    networks:
      - service-seafile
  db:
    image: mariadb:latest
    container_name: seafile-mysql
    restart: always
    #user: "0:0" no difference
    environment:
      - MYSQL_ROOT_PASSWORD=db_dev  # Requested, set the root's password of MySQL service.
      - MYSQL_LOG_CONSOLE=true
    volumes:
      - /share/Public/Seafile/mysql:/var/lib/mysql  # Requested, specifies the path to MySQL data persistent store.
    networks:
      - service-seafile

  memcached:
    image: memcached:latest
    container_name: seafile-memcached
    restart: always
    entrypoint: memcached -m 256
    networks:
      - service-seafile  

  seafile:
    image: seafileltd/seafile-mc:latest
    container_name: seafile
    restart: always
    ports:
      - "8888:80"
    volumes:
      - /share/Public/Seafile:/shared   # Requested, specifies the path to Seafile data persistent store.
    environment:
      - DB_HOST=db
      - DB_ROOT_PASSWD=db_dev  # Requested, the value shuold be root's password of MySQL service.
      - SEAFILE_ADMIN_EMAIL=XXXXXXXXX # Specifies Seafile admin user, default is 'me@example.com'.
      - SEAFILE_ADMIN_PASSWORD=asecret     # Specifies Seafile admin password, default is 'asecret'.
      - SEAFILE_SERVER_LETSENCRYPT=false   # Whether to use https or not.
      - SEAFILE_SERVER_HOSTNAME=XXXXXXXXX # Specifies your host name if https is enabled.

    depends_on:
      - db
      - memcached
      - traefik
    networks:
      - service-seafile
    labels:
      - "traefik.enable=true"
      - "traefik.port=8888"
      - "traefik.docker.network=service-seafile"
      - "traefik.http.routers.seafile.tls.certresolver=letsencrypt"
      - "traefik.http.routers.seafile.tls=true"
      - "traefik.http.routers.seafile.tls.options=default"
      - "traefik.http.routers.seafile.rule=Host(`XXXXXXXXXXXX`)"
      - "traefik.http.routers.seafile.entrypoints=websecure"

networks:
  service-seafile: