Upgrade from 11 to 12, Docker arm64, seafile fails to start (returned non-zero exit status 1)

Dear all,

I’ve been trying to upgrade my Seafile Pro server from version 11 (working perfectly) to 12. This is my yaml for docker compose

services:

  Memcached:
    image: ${SEAFILE_MEMCACHED_IMAGE:-memcached:1.6.29}
    container_name: seafile-memcached
    entrypoint: memcached -m 256
    networks:
      - seafile-pro-net
    restart: unless-stopped

  seafile:
    platform: linux/arm64
    image: ${SEAFILE_IMAGE:-seafileltd/seafile-pro-mc:12.0-latest}
    container_name: seafile-pro-12
    ports:
      - "8866:80"
    volumes:
      - ${SEAFILE_VOLUME:-./seafile-data}:/shared
      - ${SEAFILE_DATA_VOLUME:-./seafile-data/data}:/shared/seafile/seafile-data
      - type: bind
        source: /mnt/seafuse-data
        target: /seafile-fuse
        bind:
          propagation: rshared
    privileged: true
    cap_add:
      - SYS_ADMIN
    environment:
      - DB_HOST=${SEAFILE_MYSQL_DB_HOST:-db}
      - DB_PORT=${SEAFILE_MYSQL_DB_PORT:-3306}
      - DB_USER=${SEAFILE_MYSQL_DB_USER:-seafile}
      - DB_ROOT_PASSWD=${INIT_SEAFILE_MYSQL_ROOT_PASSWORD:-}
      - DB_PASSWORD=${SEAFILE_MYSQL_DB_PASSWORD:?Variable is not set or empty}
      - SEAFILE_MYSQL_DB_CCNET_DB_NAME=${SEAFILE_MYSQL_DB_CCNET_DB_NAME:-ccnet_db}
      - SEAFILE_MYSQL_DB_SEAFILE_DB_NAME=${SEAFILE_MYSQL_DB_SEAFILE_DB_NAME:-seafile_db}
      - SEAFILE_MYSQL_DB_SEAHUB_DB_NAME=${SEAFILE_MYSQL_DB_SEAHUB_DB_NAME:-seahub_db}
      - TIME_ZONE=${TIME_ZONE:-Etc/UTC}
      - INIT_SEAFILE_ADMIN_EMAIL=${INIT_SEAFILE_ADMIN_EMAIL:-me@example.com}
      - INIT_SEAFILE_ADMIN_PASSWORD=${INIT_SEAFILE_ADMIN_PASSWORD:-asecret}
      - SEAFILE_SERVER_HOSTNAME=${SEAFILE_SERVER_HOSTNAME:?Variable is not set or empty}
      - SEAFILE_SERVER_PROTOCOL=${SEAFILE_SERVER_PROTOCOL:-http}
      - SITE_ROOT=${SITE_ROOT:-/}
      - NON_ROOT=${NON_ROOT:-false}
      - JWT_PRIVATE_KEY=${JWT_PRIVATE_KEY:?Variable is not set or empty}
      - SEAFILE_LOG_TO_STDOUT=${SEAFILE_LOG_TO_STDOUT:-false}
      - ENABLE_SEADOC=${ENABLE_SEADOC:-false}
      - SEADOC_SERVER_URL=${SEADOC_SERVER_URL:-http://seafile.example.com/sdoc-server}
      - INIT_S3_STORAGE_BACKEND_CONFIG=${INIT_S3_STORAGE_BACKEND_CONFIG:-false}
      - INIT_S3_COMMIT_BUCKET=${INIT_S3_COMMIT_BUCKET:-}
      - INIT_S3_FS_BUCKET=${INIT_S3_FS_BUCKET:-}
      - INIT_S3_BLOCK_BUCKET=${INIT_S3_BLOCK_BUCKET:-}
      - INIT_S3_KEY_ID=${INIT_S3_KEY_ID:-}
      - INIT_S3_SECRET_KEY=${INIT_S3_SECRET_KEY:-}
      - INIT_S3_USE_V4_SIGNATURE=${INIT_S3_USE_V4_SIGNATURE:-true}
      - INIT_S3_AWS_REGION=${INIT_S3_AWS_REGION:-us-east-1}
      - INIT_S3_HOST=${INIT_S3_HOST:-us-east-1}
      - INIT_S3_USE_HTTPS=${INIT_S3_USE_HTTPS:-true}
    # labels:
    #   caddy: ${SEAFILE_SERVER_PROTOCOL:-http}://${SEAFILE_SERVER_HOSTNAME:?Variable is not set or empty}
    #   caddy.reverse_proxy: "{{upstreams 80}}"
    depends_on:
      # mariadb:
      #   condition: service_healthy
      - memcached
        # condition: service_started
      # elasticsearch:
      #   condition: service_started
    networks:
      - seafile-pro-net
      - mariadb-net

networks:
  seafile-pro-net:
  mariadb-net:
    external: true

and this is my env file

COMPOSE_FILE='seafile-pro-12.yml'
COMPOSE_PATH_SEPARATOR=','

## Images
SEAFILE_IMAGE=seafileltd/seafile-pro-mc:12.0-latest
SEAFILE_MEMCACHED_IMAGE=memcached:1.6.29

## Persistent Storage
SEAFILE_VOLUME=../seafile
SEAFILE_DATA_VOLUME=/mnt/wdred1/seafile-data

## Database
SEAFILE_MYSQL_DB_HOST=mariadb
SEAFILE_MYSQL_DB_USER=seafile
SEAFILE_MYSQL_DB_PASSWORD=abc

## Scheme
SEAFILE_SERVER_HOSTNAME=seafile.abc.com
SEAFILE_SERVER_PROTOCOL=https

## Startup parameters
TIME_ZONE=Europe/Berlin
JWT_PRIVATE_KEY="abc"

when I run docker compose up, I get the following

[+] Running 3/3
 ✔ Network seafile-pro-12_seafile-pro-net  Created                                                                 0.2s
 ✔ Container seafile-memcached             Created                                                                16.3s
 ✔ Container seafile-pro-12                Created                                                                 0.1s
Attaching to seafile-memcached, seafile-pro-12
seafile-pro-12     | *** Running /etc/my_init.d/01_create_data_links.sh...
seafile-pro-12     | *** Booting runit daemon...
seafile-pro-12     | *** Runit started as PID 20
seafile-pro-12     | *** Running /scripts/enterpoint.sh...
seafile-pro-12     | 2025-02-01 15:20:47 Nginx ready
seafile-pro-12     | 2025-02-01 15:20:47 This is an idle script (infinite loop) to keep container running.
seafile-pro-12     | [2025-02-01 15:20:48] Skip running setup-seafile-mysql.py because there is existing seafile-data folder.
seafile-pro-12     | [2025-02-01 15:20:48] Running scripts /opt/seafile/seafile-pro-server-12.0.8/upgrade/upgrade_11.0_12.0.sh
seafile-pro-12     | [02/01/2025 15:20:48][upgrade]: Running script /opt/seafile/seafile-pro-server-12.0.8/upgrade/upgrade_11.0_12.0.sh
seafile-pro-12     |
seafile-pro-12     | -------------------------------------------------------------
seafile-pro-12     | This script would upgrade your seafile server from 11.0 to 12.0
seafile-pro-12     | Press [ENTER] to contiune
seafile-pro-12     | -------------------------------------------------------------
seafile-pro-12     |
seafile-pro-12     |
seafile-pro-12     | Updating seafile/seahub database ...
seafile-pro-12     |
seafile-pro-12     | [INFO] You are using MySQL
seafile-pro-12     | [INFO] updating seafile database...
seafile-pro-12     | [INFO] updating seahub database...
seafile-pro-12     | [INFO] updating seafevents database...
seafile-pro-12     | Done
seafile-pro-12     |
seafile-pro-12     | migrating avatars ...
seafile-pro-12     |
seafile-pro-12     | Done
seafile-pro-12     |
seafile-pro-12     | updating /opt/seafile/seafile-server-latest symbolic link to /opt/seafile/seafile-pro-server-12.0.8 ...
seafile-pro-12     |
seafile-pro-12     |
seafile-pro-12     |
seafile-pro-12     | -----------------------------------------------------------------
seafile-pro-12     | Upgraded your seafile server successfully.
seafile-pro-12     | -----------------------------------------------------------------
seafile-pro-12     |
seafile-pro-12     |
seafile-pro-12     | Starting seafile server, please wait ...
seafile-pro-12     | License file /opt/seafile/seafile-license.txt does not exist, allow at most 3 trial users
seafile-pro-12     | Failed to start seafile server
seafile-pro-12     | Traceback (most recent call last):
seafile-pro-12     |   File "/scripts/start.py", line 94, in <module>
seafile-pro-12     |     main()
seafile-pro-12     |   File "/scripts/start.py", line 79, in main
seafile-pro-12     |     call('{} start'.format(get_script('seafile.sh')))
seafile-pro-12     |   File "/scripts/utils.py", line 70, in call
seafile-pro-12     |     return subprocess.check_call(*a, **kw)
seafile-pro-12     |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
seafile-pro-12     |   File "/usr/lib/python3.12/subprocess.py", line 413, in check_call
seafile-pro-12     |     raise CalledProcessError(retcode, cmd)
seafile-pro-12     | subprocess.CalledProcessError: Command '/opt/seafile/seafile-pro-server-12.0.8/seafile.sh start' returned non-zero exit status 1.
Gracefully stopping... (press Ctrl+C again to force)

So it looks like the, db, was successful but the seafile fails to start.

Any ideas?

Thank you very much in advance!

I’m going to answer my own question :).

My original Seafile installation was from many years ago, when the db tables were still named, by the official seafile script, seafile-db, seahub-db, etc., rather than seafile_db. The latter is the one in the docker compose yml provided by Seafile. I’ve changed that and now it works.