Docker SQL issues?

Hello! i had seafile working just fine in docker-compose for a while, but recently I’ve been seeing issues regarding some seafile SQL user failing - which makes no sense as it has access to a MySQL container’s root user…
here is my compose:

networks: 
  seafile-net: 
    t2_proxy: 
      external: 
        name: t2_proxy
services: 
  memcached: 
    container_name: seafile-memcached
    entrypoint: "memcached -m 256"
    image: "memcached:1.6"
    networks: 
      - seafile-net
    restart: unless-stopped
  seafile: 
    container_name: seafile
    depends_on: 
      - seafile_db
      - memcached
    environment: 
      - DB_HOST=seafile_db
      - DB_ROOT_PASSWD=redacted
      - TIME_ZONE=America/New_York
      - SEAFILE_ADMIN_EMAIL=tekexplorerm@gmail.com
      - SEAFILE_SERVER_LETSENCRYPT=false
      - SEAFILE_SERVER_HOSTNAME=seafile.redacted
    image: "seafileltd/seafile-mc:latest"
    labels: 
      - traefik.enable=true
      - traefik.http.routers.seafile-rtr.entrypoints=https
      - traefik.http.routers.seafile-rtr.rule=Host(`seafile.redacted`)
      - traefik.http.routers.seafhttp-rtr.entrypoints=https
      - "traefik.http.routers.seafhttp-rtr.rule=(Host(`seafile.redacted`) && PathPrefix(`/seafhttp`,`/api`))"
      - traefik.http.routers.seafile-rtr.service=seafile-svc
      - traefik.http.routers.seafhttp-rtr.service=seafile-svc
      - traefik.http.services.seafile-svc.loadbalancer.passhostheader=true
      - traefik.http.services.seafile-svc.loadbalancer.server.port=80
      - traefik.http.routers.seafile-rtr.middlewares=chain-no-auth@file
      - traefik.http.routers.seafhttp-rtr.middlewares=chain-no-auth@file
    networks: 
      - seafile-net
      - t2_proxy
    restart: unless-stopped
    volumes: 
      - "/disk/seafile-data:/shared"
  seafile_db: 
    container_name: seafile-mysql
    environment: 
      - MYSQL_ROOT_PASSWORD=redacted
      - MYSQL_LOG_CONSOLE=true
    image: "mariadb:10.5"
    networks: 
      seafile-net: 
        aliases: 
          - seafile_db
      t2_proxy: 
        aliases: 
          - seafile_db
    restart: unless-stopped
    volumes: 
      - "./seafile-mysql/db:/var/lib/mysql"
version: "2.4"

my errors, according to docker-compose logs:

seafile-memcached | Signal handled: Terminated.

seafile       |  
seafile       | verifying password of user root ...  done
seafile       |  
seafile       | verifying password of user seafile ...   
seafile       | Failed to connect to mysql server using user "seafile" and password "***": Access denied for user 'seafile'@'172.28.0.4' (using password: YES)                                                            
seafile       |  
seafile       | [2021-08-17 17:18:04] Now running setup-seafile-mysql.py in auto mode.
seafile       | Traceback (most recent call last):
seafile       |   File "/scripts/start.py", line 86, in <module>
seafile       |     main()
seafile       |   File "/scripts/start.py", line 56, in main
seafile       |     init_seafile_server()
seafile       |   File "/scripts/bootstrap.py", line 145, in init_seafile_server
seafile       |     call('{} auto -n seafile'.format(setup_script), env=env)
seafile       |   File "/scripts/utils.py", line 70, in call
seafile       |     return subprocess.check_call(*a, **kw)
seafile       |   File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
seafile       |     raise CalledProcessError(retcode, cmd)
seafile       | subprocess.CalledProcessError: Command '/opt/seafile/seafile-server-8.0.7/setup-seafile-mysql.sh auto -n seafile' returned non-zero exit status 255.

seafile-mysql | 2021-08-17 21:26:51 0 [Note] mysqld: ready for connections.
seafile-mysql | Version: '10.5.12-MariaDB-1:10.5.12+maria~focal'  socket: '/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
seafile-mysql | 2021-08-17 21:27:50 3 [Warning] Aborted connection 3 to db: 'unconnected' user: 'root' host: '172.28.0.4' (Got an error reading communication packets)
seafile-mysql | 2021-08-17 21:27:50 5 [Warning] Access denied for user 'seafile'@'172.28.0.4' (using password: YES)
seafile-mysql | 2021-08-17 21:27:50 4 [Warning] Aborted connection 4 to db: 'unconnected' user: 'root' host: '172.28.0.4' (Got an error reading communication packets)

Is there no one on this site?

Hey there!

It looks like for whatever reason seafile can’t connect to the database.
Maybe there is an issue with seafile automatically setting up the correct permissions in the latest version when deploying up from scratch.

Here are my connection permission settings, they might be different for you and that could cause the error.
I am also using docker, but I freshly deployed 8.0.5 iirc.

image