Seafile can't connect to database Container

Hi,

I switched from “native” to docker for my Seafile installation.
I used the docker-compose from the manual:

version: ‘2.0’
services:
db:
image: mariadb:10.5
container_name: seafile-mysql
environment:
- MYSQL_ROOT_PASSWORD=XXXX # Requested, set the root’s password of MySQL service.
- MYSQL_LOG_CONSOLE=true
- TIME_ZONE=Europe/Berlin # Optional, default is UTC. Should be uncomment and set to your local time zone.
volumes:
- /opt/seafile-mysql/db:/var/lib/mysql # Requested, specifies the path to MySQL data persistent store.
networks:
- seafile-net

memcached:
image: memcached:1.5.6
container_name: seafile-memcached
entrypoint: memcached -m 256
networks:
- seafile-net

seafile:
image: seafileltd/seafile-mc:latest
container_name: seafile
ports:
- “8443:80”
#- “8482:8082” # If https is enabled, cancel the comment.
- “8480:8080”
volumes:
- /opt/seafile-data:/shared # Requested, specifies the path to Seafile data persistent store.
environment:
- DB_HOST=db
- DB_ROOT_PASSWD=XXXX # Requested, the value shuold be root’s password of MySQL service.
- TIME_ZONE=Europe/Berlin # Optional, default is UTC. Should be uncomment and set to your local time zone.
- SEAFILE_ADMIN_EMAIL=${SEAFILE_USER} # Specifies Seafile admin user, default is ‘me@example.com’.
- SEAFILE_ADMIN_PASSWORD=${SEAFILE_PW} # Specifies Seafile admin password, default is ‘asecret’.
- SEAFILE_SERVER_LETSENCRYPT=false # Whether to use https or not.
- SEAFILE_SERVER_HOSTNAME=xx.xx.xx # Specifies your host name if https is enabled.
depends_on:
- db
- memcached
networks:
- seafile-net

networks:
seafile-net:

All 3 containers are up and running and I can bash into them. I see the database running in the mysql container and I see, that in the Seafile container, Seafile isn’t running. It seems, that since tonight at 01:30 am it stopped working.

2021-12-21 16:23:28 start to serve on pipe client
2021-12-22 08:57:02 start to serve on pipe client
2021-12-22 10:54:29 start to serve on pipe client
2022-01-06 01:23:46 …/common/seaf-db.c(729): Failed to connect to MySQL: Can’t connect to MySQL server on ‘db’ (110)
2022-01-06 01:23:47 http-server.c(869): DB error when check repo existence.
2022-01-06 01:23:54 …/common/seaf-db.c(729): Failed to connect to MySQL: Can’t connect to MySQL server on ‘db’ (110)
2022-01-06 01:23:54 http-server.c(869): DB error when check repo existence.

I restarted and recreated the containers from the docker-compose, but without success.

I can’t find the issue.

The last thing I changed at 2022-01-04 , was installing pihole as a container with DNS/DHCP, following the instructions on docker-pi-hole GitHub Page, (sorry can’t link that) on an Ubuntu System.

Maybe somehow this made some problems, but I can’t find it :frowning:

Anyone some ideas to point me to solve this ?

Regards

The problem seems to be “fixed”, at least it is working again.

What happened:

  • Automatic update from the MariaDB container via watchtower
  • docker-compose stop
  • docker network rm
  • docker-compose rm
  • docker system prune
  • docker-compose up -d

now it’s working again.
I don’t know what fixed the problem, but it is running again. I’ll keep an eye on it, maybe this will help someone later :man_shrugging:t2: