Owncloud Docker Server: from "Waiting for MySQL" to "Database didn't come up in time!"

Steps to reproduce

  1. Follow the docker server setup from the official page
  2. Run docker-compose up
  3. See logs without errors but owncloud_server container fails

Expected behaviour

The server should just run noramlly

Actual behaviour

Server keeps waiting for MySQL for ever even though the mysql container is there, healthy, up and running!

Server configuration

Operating system: Debian

Web server: Nginx

Database: MariaDB

PHP version: none → docker install

ownCloud version: I have tried with all 10.x versions I think

Updated from an older ownCloud or fresh install:
fresh install

Where did you install ownCloud from:
I followed the docker install steps in the owncloud website

Signing status (ownCloud 9.0 and above):
I cannot do this since the server isn’t even starting

The content of config/config.php:
Whichever is set to be in the official docker image

List of activated apps:
None, server not running.

Are you using external storage, if yes which one: no

Are you using encryption: no

Are you using an external user-backend, if yes which one: no

Logs

docker-compose.yml

version: "3"

volumes:
  files:
    driver: local
  mysql:
    driver: local
  redis:
    driver: local

services:
  owncloud:
    image: owncloud/server:${OWNCLOUD_VERSION}
    container_name: owncloud_server
    restart: always
    ports:
      - ${HTTP_PORT}:8080
    depends_on:
      - mariadb
      - redis
    environment:
      - OWNCLOUD_DOMAIN=${OWNCLOUD_DOMAIN}
      - OWNCLOUD_TRUSTED_DOMAINS=${OWNCLOUD_TRUSTED_DOMAINS}
      - OWNCLOUD_DB_TYPE=mysql
      - OWNCLOUD_DB_NAME=owncloud
      - OWNCLOUD_DB_USERNAME=owncloud
      - OWNCLOUD_DB_PASSWORD=owncloud
      - OWNCLOUD_DB_HOST=mariadb
      - OWNCLOUD_ADMIN_USERNAME=${ADMIN_USERNAME}
      - OWNCLOUD_ADMIN_PASSWORD=${ADMIN_PASSWORD}
      - OWNCLOUD_MYSQL_UTF8MB4=true
      - OWNCLOUD_REDIS_ENABLED=true
      - OWNCLOUD_REDIS_HOST=redis
    healthcheck:
      test: ["CMD", "/usr/bin/healthcheck"]
      interval: 30s
      timeout: 10s
      retries: 5
    volumes:
      - files:/mnt/data

  mariadb:
    image: mariadb:10.11 # minimum required ownCloud version is 10.9
    container_name: owncloud_mariadb
    restart: always
    environment:
      - MYSQL_ROOT_PASSWORD=owncloud
      - MYSQL_USER=owncloud
      - MYSQL_PASSWORD=owncloud
      - MYSQL_DATABASE=owncloud
      - MARIADB_AUTO_UPGRADE=1
    command: ["--max-allowed-packet=128M", "--innodb-log-file-size=64M"]
    healthcheck:
      test: ["CMD", "mysqladmin", "ping", "-u", "root", "--password=owncloud"]
      interval: 10s
      timeout: 5s
      retries: 5
    volumes:
      - mysql:/var/lib/mysql

  redis:
    image: redis:6
    container_name: owncloud_redis
    restart: always
    command: ["--databases", "1"]
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 10s
      timeout: 5s
      retries: 5
    volumes:
      - redis:/data

docker-compose up logs

Creating owncloud_redis   ... done
Creating owncloud_mariadb ... done
Creating owncloud_server  ... done
Attaching to owncloud_mariadb, owncloud_redis, owncloud_server
owncloud_mariadb | 2023-12-28 05:52:40+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.11.6+maria~ubu2204 started.
owncloud_mariadb | 2023-12-28 05:52:40+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
owncloud_mariadb | 2023-12-28 05:52:40+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.11.6+maria~ubu2204 started.
owncloud_redis | 1:C 28 Dec 2023 05:52:40.303 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
owncloud_redis | 1:C 28 Dec 2023 05:52:40.303 # Redis version=6.2.14, bits=64, commit=00000000, modified=0, pid=1, just started
owncloud_redis | 1:C 28 Dec 2023 05:52:40.303 # Configuration loaded
owncloud_mariadb | 2023-12-28 05:52:40+00:00 [Note] [Entrypoint]: Initializing database files
owncloud_redis | 1:M 28 Dec 2023 05:52:40.304 * monotonic clock: POSIX clock_gettime
owncloud_redis | 1:M 28 Dec 2023 05:52:40.305 * Running mode=standalone, port=6379.
owncloud_redis | 1:M 28 Dec 2023 05:52:40.305 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
owncloud_redis | 1:M 28 Dec 2023 05:52:40.305 # Server initialized
owncloud_redis | 1:M 28 Dec 2023 05:52:40.305 * Ready to accept connections
owncloud_server | Creating volume folders...
owncloud_mariadb | 2023-12-28  5:52:41 0 [Warning] mariadbd: io_uring_queue_init() failed with ENOSYS: check seccomp filters, and the kernel version (newer than 5.1 required)
owncloud_mariadb | 2023-12-28  5:52:41 0 [Warning] InnoDB: liburing disabled: falling back to innodb_use_native_aio=OFF
owncloud_server | Creating hook folders...
owncloud_server | Waiting for MySQL...
owncloud_mariadb |
owncloud_mariadb |
owncloud_mariadb | PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
owncloud_mariadb | To do so, start the server, then issue the following command:
owncloud_mariadb |
owncloud_mariadb | '/usr/bin/mariadb-secure-installation'
owncloud_mariadb |
owncloud_mariadb | which will also give you the option of removing the test
owncloud_mariadb | databases and anonymous user created by default.  This is
owncloud_mariadb | strongly recommended for production servers.
owncloud_mariadb |
owncloud_mariadb | See the MariaDB Knowledgebase at https://mariadb.com/kb
owncloud_mariadb |
owncloud_mariadb | Please report any problems at https://mariadb.org/jira
owncloud_mariadb |
owncloud_mariadb | The latest information about MariaDB is available at https://mariadb.org/.
owncloud_mariadb |
owncloud_mariadb | Consider joining MariaDB's strong and vibrant community:
owncloud_mariadb | https://mariadb.org/get-involved/
owncloud_mariadb |
owncloud_mariadb | 2023-12-28 05:52:46+00:00 [Note] [Entrypoint]: Database files initialized
owncloud_mariadb | 2023-12-28 05:52:46+00:00 [Note] [Entrypoint]: Starting temporary server
owncloud_mariadb | 2023-12-28 05:52:46+00:00 [Note] [Entrypoint]: Waiting for server startup
owncloud_mariadb | 2023-12-28  5:52:46 0 [Note] Starting MariaDB 10.11.6-MariaDB-1:10.11.6+maria~ubu2204 source revision fecd78b83785d5ae96f2c6ff340375be803cd299 as process 99
owncloud_mariadb | 2023-12-28  5:52:46 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
owncloud_mariadb | 2023-12-28  5:52:46 0 [Note] InnoDB: Number of transaction pools: 1
owncloud_mariadb | 2023-12-28  5:52:46 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
owncloud_mariadb | 2023-12-28  5:52:46 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
owncloud_mariadb | 2023-12-28  5:52:46 0 [Warning] mariadbd: io_uring_queue_init() failed with ENOSYS: check seccomp filters, and the kernel version (newer than 5.1 required)
owncloud_mariadb | 2023-12-28  5:52:46 0 [Warning] InnoDB: liburing disabled: falling back to innodb_use_native_aio=OFF
owncloud_mariadb | 2023-12-28  5:52:46 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
owncloud_mariadb | 2023-12-28  5:52:46 0 [Note] InnoDB: Completed initialization of buffer pool
owncloud_mariadb | 2023-12-28  5:52:46 0 [Note] InnoDB: File system buffers for log disabled (block size=512 bytes)
owncloud_mariadb | 2023-12-28  5:52:46 0 [Note] InnoDB: End of log at LSN=46862
owncloud_mariadb | 2023-12-28  5:52:46 0 [Note] InnoDB: 128 rollback segments are active.
owncloud_mariadb | 2023-12-28  5:52:46 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
owncloud_mariadb | 2023-12-28  5:52:46 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
owncloud_mariadb | 2023-12-28  5:52:46 0 [Note] InnoDB: log sequence number 46862; transaction id 14
owncloud_mariadb | 2023-12-28  5:52:46 0 [Note] Plugin 'FEEDBACK' is disabled.
owncloud_mariadb | 2023-12-28  5:52:46 0 [Warning] 'user' entry 'root@314a2752a282' ignored in --skip-name-resolve mode.
owncloud_mariadb | 2023-12-28  5:52:46 0 [Warning] 'proxies_priv' entry '@% root@314a2752a282' ignored in --skip-name-resolve mode.
owncloud_mariadb | 2023-12-28  5:52:46 0 [Note] mariadbd: ready for connections.
owncloud_mariadb | Version: '10.11.6-MariaDB-1:10.11.6+maria~ubu2204'  socket: '/run/mysqld/mysqld.sock'  port: 0  mariadb.org binary distribution
owncloud_mariadb | 2023-12-28 05:52:47+00:00 [Note] [Entrypoint]: Temporary server started.
owncloud_mariadb | 2023-12-28 05:52:49+00:00 [Note] [Entrypoint]: Creating database owncloud
owncloud_mariadb | 2023-12-28 05:52:49+00:00 [Note] [Entrypoint]: Creating user owncloud
owncloud_mariadb | 2023-12-28 05:52:49+00:00 [Note] [Entrypoint]: Giving user owncloud access to schema owncloud
owncloud_mariadb | 2023-12-28 05:52:49+00:00 [Note] [Entrypoint]: Securing system users (equivalent to running mysql_secure_installation)
owncloud_mariadb |
owncloud_mariadb | 2023-12-28 05:52:49+00:00 [Note] [Entrypoint]: Stopping temporary server
owncloud_mariadb | 2023-12-28  5:52:49 0 [Note] mariadbd (initiated by: unknown): Normal shutdown
owncloud_mariadb | 2023-12-28  5:52:49 0 [Note] InnoDB: FTS optimize thread exiting.
owncloud_mariadb | 2023-12-28  5:52:49 0 [Note] InnoDB: Starting shutdown...
owncloud_mariadb | 2023-12-28  5:52:49 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
owncloud_mariadb | 2023-12-28  5:52:49 0 [Note] InnoDB: Buffer pool(s) dump completed at 231228  5:52:49
owncloud_mariadb | 2023-12-28  5:52:49 0 [Note] InnoDB: Removed temporary tablespace data file: "./ibtmp1"
owncloud_mariadb | 2023-12-28  5:52:49 0 [Note] InnoDB: Shutdown completed; log sequence number 46862; transaction id 15
owncloud_mariadb | 2023-12-28  5:52:49 0 [Note] mariadbd: Shutdown complete
owncloud_mariadb |
owncloud_mariadb | 2023-12-28 05:52:49+00:00 [Note] [Entrypoint]: Temporary server stopped
owncloud_mariadb |
owncloud_mariadb | 2023-12-28 05:52:49+00:00 [Note] [Entrypoint]: MariaDB init process done. Ready for start up.
owncloud_mariadb |
owncloud_mariadb | 2023-12-28  5:52:49 0 [Note] Starting MariaDB 10.11.6-MariaDB-1:10.11.6+maria~ubu2204 source revision fecd78b83785d5ae96f2c6ff340375be803cd299 as process 1
owncloud_mariadb | 2023-12-28  5:52:49 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
owncloud_mariadb | 2023-12-28  5:52:49 0 [Note] InnoDB: Number of transaction pools: 1
owncloud_mariadb | 2023-12-28  5:52:49 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
owncloud_mariadb | 2023-12-28  5:52:49 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
owncloud_mariadb | 2023-12-28  5:52:49 0 [Warning] mariadbd: io_uring_queue_init() failed with ENOSYS: check seccomp filters, and the kernel version (newer than 5.1 required)
owncloud_mariadb | 2023-12-28  5:52:49 0 [Warning] InnoDB: liburing disabled: falling back to innodb_use_native_aio=OFF
owncloud_mariadb | 2023-12-28  5:52:49 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
owncloud_mariadb | 2023-12-28  5:52:49 0 [Note] InnoDB: Completed initialization of buffer pool
owncloud_mariadb | 2023-12-28  5:52:49 0 [Note] InnoDB: File system buffers for log disabled (block size=512 bytes)
owncloud_mariadb | 2023-12-28  5:52:49 0 [Note] InnoDB: End of log at LSN=46862
owncloud_mariadb | 2023-12-28  5:52:49 0 [Note] InnoDB: 128 rollback segments are active.
owncloud_mariadb | 2023-12-28  5:52:49 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
owncloud_mariadb | 2023-12-28  5:52:49 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
owncloud_mariadb | 2023-12-28  5:52:49 0 [Note] InnoDB: log sequence number 46862; transaction id 14
owncloud_mariadb | 2023-12-28  5:52:49 0 [Note] Plugin 'FEEDBACK' is disabled.
owncloud_mariadb | 2023-12-28  5:52:49 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
owncloud_mariadb | 2023-12-28  5:52:49 0 [Warning] You need to use --log-bin to make --expire-logs-days or --binlog-expire-logs-seconds work.
owncloud_mariadb | 2023-12-28  5:52:49 0 [Note] Server socket created on IP: '0.0.0.0'.
owncloud_mariadb | 2023-12-28  5:52:49 0 [Note] Server socket created on IP: '::'.
owncloud_mariadb | 2023-12-28  5:52:49 0 [Note] InnoDB: Buffer pool(s) load completed at 231228  5:52:49
owncloud_mariadb | 2023-12-28  5:52:49 0 [Note] mariadbd: ready for connections.
owncloud_mariadb | Version: '10.11.6-MariaDB-1:10.11.6+maria~ubu2204'  socket: '/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
owncloud_server | services aren't ready in 3m0s
owncloud_server | Database didn't come up in time!
owncloud_server | services aren't ready in 3m0s
owncloud_server | Database didn't come up in time!
owncloud_server exited with code 1
owncloud_server | Creating volume folders...
owncloud_server | Creating hook folders...
owncloud_server | Waiting for MySQL...
owncloud_server | services aren't ready in 3m0s
owncloud_server | Database didn't come up in time!
owncloud_server exited with code 1
owncloud_server | services aren't ready in 3m0s
owncloud_server | Database didn't come up in time!
owncloud_server exited with code 1
owncloud_server | Creating hook folders...
owncloud_server | Waiting for MySQL...
owncloud_server | services aren't ready in 3m0s
owncloud_server | Database didn't come up in time!
owncloud_server exited with code 1
owncloud_server | Waiting for MySQL...

The logs above are from my nth try.
I have tried several versions, I even tried with postgres jsut to try…
also I notice that whichever service I put first under depends_on: the outcome is the same, meaning that if I put redis first the issue is the same but instead of Waiting for MySQL... I would see Waiting for Redis...

Same behaviour everytime, I am lost/blocked.

I started customizing the docker-compose.yml file at the beginning but in the example I am using the “vanilla” files from the documentation and the same issue rises.

I have read all post regarding similar issues and I have tried all solutions, I cleared my whole docker setup, I removed volumes, I tried several versions, I tried with different databases… everything, for hours but I cannot seem to see where I am mistaking.

If anyone has any ideas as to how to properly set up a docker owncloud server I will be eternally thankful

thanks!

Just in case anyone stumbles upon this post, I was able to make everything work by upgrading my whole server.

I upgraded everything:

  • the Debian version to “bullseye”
  • the kernel to version “5.10”
  • docker deamon to the latest version (24.x)

It was only after I did this that the owncloud docker container was able to properly start.

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.