Blank page after installing Bookstack via docker-compose #3847

Closed
opened 2026-02-05 07:39:41 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @sunjerry019 on GitHub (Jun 11, 2023).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

Similar to #4023, except the fixes proposed do not work. Upon fresh installation, I am greeted by a blank screen.

My docker-compose.yml:

services:
  bookstack:
    image: lscr.io/linuxserver/bookstack
    container_name: bookstack
    environment:
      - PUID=1002
      - PGID=1002
      - APP_URL=https://wiki.url
      - DB_HOST=bookstack_db
      - DB_PORT=3306
      - DB_USER=bookstack
      - DB_PASS=<redacted>
      - DB_DATABASE=bookstackapp
    volumes:
      - /home/<user>/bookstack/bookstack_app_data:/config
      - /etc/letsencrypt:/etc/letsencrypt
    ports:
      - 6875:80
    restart: unless-stopped
    depends_on:
      - bookstack_db
  bookstack_db:
    image: lscr.io/linuxserver/mariadb
    container_name: bookstack_db
    environment:
      - PUID=1002
      - PGID=1002
      - MYSQL_ROOT_PASSWORD=<redacted>
      - TZ=Europe/Berlin
      - MYSQL_DATABASE=bookstackapp
      - MYSQL_USER=bookstack
      - MYSQL_PASSWORD=<redacted>
    volumes:
      - /home/<user>/bookstack/bookstack_db_data:/config
    restart: unless-stopped

with the error:

SQLSTATE[HY000] [1045] Access denied for user 'bookstack'@'bookstack.bookstack_default' (using password: YES) (SQL: select * from information_schema.tables where table_schema = bookstackapp and table_name = migrations and table_type = 'BASE TABLE')

I've checked that the database container is accessible from the bookstack container and the user exists and can log in. There however doesn't seem to be any tables with the bookstackapp schema:
select distinct table_schema from information_schema.tables;
gives

+--------------------+
| table_schema       |
+--------------------+
| information_schema |
+--------------------+

Do you have any idea where the problem could lie? Thank you in advance!

Exact BookStack Version

LinuxServer.io Docker Image (v23.05.2)

Log Content

Bookstack container

$ docker logs -f bookstack` gives:

[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] 02-default-location: skipped
[migrations] done
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗ 
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝ 

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1002
User GID:    1002
───────────────────────────────────────

using keys found in /config/keys
App Key found - setting variable for seds
Running config - DB_HOST set
Waiting for DB to be available
PHP Warning:  PHP Startup: Invalid date.timezone value '', using 'UTC' instead in Unknown on line 0

   Illuminate\Database\QueryException 

  SQLSTATE[HY000] [1045] Access denied for user 'bookstack'@'bookstack.bookstack_default' (using password: YES) (SQL: select * from information_schema.tables where table_schema = bookstackapp and table_name = migrations and table_type = 'BASE TABLE')

  at /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:760
    756▕         // If an exception occurs when attempting to run a query, we'll format the error
    757▕         // message to include the bindings with SQL, which will make this exception a
    758▕         // lot more helpful to the developer instead of just the database's errors.
    759▕         catch (Exception $e) {
  ➜ 760▕             throw new QueryException(
    761▕                 $query, $this->prepareBindings($bindings), $e
    762▕             );
    763▕         }
    764▕     }

      +36 vendor frames 
  37  /app/www/artisan:35
      Illuminate\Foundation\Console\Kernel::handle()
[custom-init] No custom files found, skipping...
[10-Jun-2023 19:44:56] NOTICE: PHP message: PHP Warning:  PHP Startup: Invalid date.timezone value '', using 'UTC' instead in Unknown on line 0
[ls.io-init] done.

Bookstack Database container

$ docker logs -f bookstack_db gives:

[migrations] started
[migrations] no migrations found
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗ 
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝ 

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1002
User GID:    1002
───────────────────────────────────────

cp: not replacing '/config/custom.cnf'
[custom-init] No custom files found, skipping...
230610 21:44:47 mysqld_safe Logging to '/config/databases/bdbcf0b607b4.err'.
230610 21:44:47 mysqld_safe Starting mariadbd daemon with databases from /config/databases
[ls.io-init] done.

MariaDB log within the database container

In /config/databases/bdbcf0b607b4.err:

230610 21:44:47 mysqld_safe Starting mariadbd daemon with databases from /config/databases
2023-06-10 21:44:47 0 [Note] Starting MariaDB 10.11.3-MariaDB-log source revision 0bb31039f54bd6a0dc8f0fc7d40e6b58a51998b0 as process 393
2023-06-10 21:44:47 0 [Note] Using unique option prefix 'myisam_recover' is error-prone and can break in the future. Please use the full name 'myisam-recover-options' instead.
2023-06-10 21:44:47 0 [Note] InnoDB: Compressed tables use zlib 1.2.13
2023-06-10 21:44:47 0 [Note] InnoDB: Number of transaction pools: 1
2023-06-10 21:44:47 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2023-06-10 21:44:47 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
2023-06-10 21:44:47 0 [Note] InnoDB: Using Linux native AIO
2023-06-10 21:44:47 0 [Note] InnoDB: Initializing buffer pool, total size = 256.000MiB, chunk size = 4.000MiB
2023-06-10 21:44:47 0 [Note] InnoDB: Completed initialization of buffer pool
2023-06-10 21:44:47 0 [Note] InnoDB: File system buffers for log disabled (block size=512 bytes)
2023-06-10 21:44:47 0 [Note] InnoDB: 128 rollback segments are active.
2023-06-10 21:44:47 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
2023-06-10 21:44:47 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
2023-06-10 21:44:47 0 [Note] InnoDB: log sequence number 47014; transaction id 16
2023-06-10 21:44:47 0 [Note] InnoDB: Loading buffer pool(s) from /config/databases/ib_buffer_pool
2023-06-10 21:44:47 0 [Note] Plugin 'FEEDBACK' is disabled.
2023-06-10 21:44:47 0 [Note] InnoDB: Buffer pool(s) load completed at 230610 21:44:47
2023-06-10 21:44:47 0 [Note] Server socket created on IP: '0.0.0.0'.
2023-06-10 21:44:47 0 [Note] Server socket created on IP: '::'.
2023-06-10 21:44:47 0 [Note] /usr/bin/mariadbd: ready for connections.
Version: '10.11.3-MariaDB-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Alpine Linux
2023-06-10 21:44:48 4 [Warning] Aborted connection 4 to db: 'unconnected' user: 'unauthenticated' host: 'localhost' (This connection closed normally without authentication)
2023-06-10 21:44:49 6 [Warning] Aborted connection 6 to db: 'unconnected' user: 'unauthenticated' host: 'bookstack.bookstack_default' (This connection closed normally without authentication)
2023-06-10 21:44:55 7 [Warning] Aborted connection 7 to db: 'unconnected' user: 'unauthenticated' host: 'bookstack.bookstack_default' (This connection closed normally without authentication)
2023-06-10 21:44:55 8 [Warning] Access denied for user 'bookstack'@'bookstack.bookstack_default' (using password: YES)
2023-06-10 21:45:05 9 [Warning] Access denied for user 'bookstack'@'bookstack.bookstack_default' (using password: YES)
... [and more the same line, but with different time]

PHP Version

Unsure, host system runs php7.4 (fpm) but the container seems to have its own php

Hosting Environment

docker-compose image running on Ubuntu 20.04.6 LTS x86_64 (DigitalOcean Droplet), proxypass to 127.0.0.1:6875 using nginx/1.18.0

MariaDB is already installed on the host system.

Originally created by @sunjerry019 on GitHub (Jun 11, 2023). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario Similar to #4023, except the fixes proposed do not work. Upon fresh installation, I am greeted by a blank screen. My `docker-compose.yml`: ```version: "2" services: bookstack: image: lscr.io/linuxserver/bookstack container_name: bookstack environment: - PUID=1002 - PGID=1002 - APP_URL=https://wiki.url - DB_HOST=bookstack_db - DB_PORT=3306 - DB_USER=bookstack - DB_PASS=<redacted> - DB_DATABASE=bookstackapp volumes: - /home/<user>/bookstack/bookstack_app_data:/config - /etc/letsencrypt:/etc/letsencrypt ports: - 6875:80 restart: unless-stopped depends_on: - bookstack_db bookstack_db: image: lscr.io/linuxserver/mariadb container_name: bookstack_db environment: - PUID=1002 - PGID=1002 - MYSQL_ROOT_PASSWORD=<redacted> - TZ=Europe/Berlin - MYSQL_DATABASE=bookstackapp - MYSQL_USER=bookstack - MYSQL_PASSWORD=<redacted> volumes: - /home/<user>/bookstack/bookstack_db_data:/config restart: unless-stopped ``` with the error: ``` SQLSTATE[HY000] [1045] Access denied for user 'bookstack'@'bookstack.bookstack_default' (using password: YES) (SQL: select * from information_schema.tables where table_schema = bookstackapp and table_name = migrations and table_type = 'BASE TABLE') ``` I've checked that the database container is accessible from the bookstack container and the user exists and can log in. There however doesn't seem to be any tables with the `bookstackapp` schema: ```select distinct table_schema from information_schema.tables;``` gives ``` +--------------------+ | table_schema | +--------------------+ | information_schema | +--------------------+ ``` Do you have any idea where the problem could lie? Thank you in advance! ### Exact BookStack Version LinuxServer.io Docker Image (v23.05.2) ### Log Content ## Bookstack container $ docker logs -f bookstack` gives: ``` [migrations] started [migrations] 01-nginx-site-confs-default: skipped [migrations] 02-default-location: skipped [migrations] done ─────────────────────────────────────── ██╗ ███████╗██╗ ██████╗ ██║ ██╔════╝██║██╔═══██╗ ██║ ███████╗██║██║ ██║ ██║ ╚════██║██║██║ ██║ ███████╗███████║██║╚██████╔╝ ╚══════╝╚══════╝╚═╝ ╚═════╝ Brought to you by linuxserver.io ─────────────────────────────────────── To support LSIO projects visit: https://www.linuxserver.io/donate/ ─────────────────────────────────────── GID/UID ─────────────────────────────────────── User UID: 1002 User GID: 1002 ─────────────────────────────────────── using keys found in /config/keys App Key found - setting variable for seds Running config - DB_HOST set Waiting for DB to be available PHP Warning: PHP Startup: Invalid date.timezone value '', using 'UTC' instead in Unknown on line 0 Illuminate\Database\QueryException SQLSTATE[HY000] [1045] Access denied for user 'bookstack'@'bookstack.bookstack_default' (using password: YES) (SQL: select * from information_schema.tables where table_schema = bookstackapp and table_name = migrations and table_type = 'BASE TABLE') at /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:760 756▕ // If an exception occurs when attempting to run a query, we'll format the error 757▕ // message to include the bindings with SQL, which will make this exception a 758▕ // lot more helpful to the developer instead of just the database's errors. 759▕ catch (Exception $e) { ➜ 760▕ throw new QueryException( 761▕ $query, $this->prepareBindings($bindings), $e 762▕ ); 763▕ } 764▕ } +36 vendor frames 37 /app/www/artisan:35 Illuminate\Foundation\Console\Kernel::handle() [custom-init] No custom files found, skipping... [10-Jun-2023 19:44:56] NOTICE: PHP message: PHP Warning: PHP Startup: Invalid date.timezone value '', using 'UTC' instead in Unknown on line 0 [ls.io-init] done. ``` ## Bookstack Database container `$ docker logs -f bookstack_db` gives: ``` [migrations] started [migrations] no migrations found ─────────────────────────────────────── ██╗ ███████╗██╗ ██████╗ ██║ ██╔════╝██║██╔═══██╗ ██║ ███████╗██║██║ ██║ ██║ ╚════██║██║██║ ██║ ███████╗███████║██║╚██████╔╝ ╚══════╝╚══════╝╚═╝ ╚═════╝ Brought to you by linuxserver.io ─────────────────────────────────────── To support LSIO projects visit: https://www.linuxserver.io/donate/ ─────────────────────────────────────── GID/UID ─────────────────────────────────────── User UID: 1002 User GID: 1002 ─────────────────────────────────────── cp: not replacing '/config/custom.cnf' [custom-init] No custom files found, skipping... 230610 21:44:47 mysqld_safe Logging to '/config/databases/bdbcf0b607b4.err'. 230610 21:44:47 mysqld_safe Starting mariadbd daemon with databases from /config/databases [ls.io-init] done. ``` ### MariaDB log within the database container In `/config/databases/bdbcf0b607b4.err`: ``` 230610 21:44:47 mysqld_safe Starting mariadbd daemon with databases from /config/databases 2023-06-10 21:44:47 0 [Note] Starting MariaDB 10.11.3-MariaDB-log source revision 0bb31039f54bd6a0dc8f0fc7d40e6b58a51998b0 as process 393 2023-06-10 21:44:47 0 [Note] Using unique option prefix 'myisam_recover' is error-prone and can break in the future. Please use the full name 'myisam-recover-options' instead. 2023-06-10 21:44:47 0 [Note] InnoDB: Compressed tables use zlib 1.2.13 2023-06-10 21:44:47 0 [Note] InnoDB: Number of transaction pools: 1 2023-06-10 21:44:47 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions 2023-06-10 21:44:47 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts) 2023-06-10 21:44:47 0 [Note] InnoDB: Using Linux native AIO 2023-06-10 21:44:47 0 [Note] InnoDB: Initializing buffer pool, total size = 256.000MiB, chunk size = 4.000MiB 2023-06-10 21:44:47 0 [Note] InnoDB: Completed initialization of buffer pool 2023-06-10 21:44:47 0 [Note] InnoDB: File system buffers for log disabled (block size=512 bytes) 2023-06-10 21:44:47 0 [Note] InnoDB: 128 rollback segments are active. 2023-06-10 21:44:47 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ... 2023-06-10 21:44:47 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB. 2023-06-10 21:44:47 0 [Note] InnoDB: log sequence number 47014; transaction id 16 2023-06-10 21:44:47 0 [Note] InnoDB: Loading buffer pool(s) from /config/databases/ib_buffer_pool 2023-06-10 21:44:47 0 [Note] Plugin 'FEEDBACK' is disabled. 2023-06-10 21:44:47 0 [Note] InnoDB: Buffer pool(s) load completed at 230610 21:44:47 2023-06-10 21:44:47 0 [Note] Server socket created on IP: '0.0.0.0'. 2023-06-10 21:44:47 0 [Note] Server socket created on IP: '::'. 2023-06-10 21:44:47 0 [Note] /usr/bin/mariadbd: ready for connections. Version: '10.11.3-MariaDB-log' socket: '/var/run/mysqld/mysqld.sock' port: 3306 Alpine Linux 2023-06-10 21:44:48 4 [Warning] Aborted connection 4 to db: 'unconnected' user: 'unauthenticated' host: 'localhost' (This connection closed normally without authentication) 2023-06-10 21:44:49 6 [Warning] Aborted connection 6 to db: 'unconnected' user: 'unauthenticated' host: 'bookstack.bookstack_default' (This connection closed normally without authentication) 2023-06-10 21:44:55 7 [Warning] Aborted connection 7 to db: 'unconnected' user: 'unauthenticated' host: 'bookstack.bookstack_default' (This connection closed normally without authentication) 2023-06-10 21:44:55 8 [Warning] Access denied for user 'bookstack'@'bookstack.bookstack_default' (using password: YES) 2023-06-10 21:45:05 9 [Warning] Access denied for user 'bookstack'@'bookstack.bookstack_default' (using password: YES) ... [and more the same line, but with different time] ``` ### PHP Version Unsure, host system runs php7.4 (fpm) but the container seems to have its own php ### Hosting Environment `docker-compose` image running on Ubuntu 20.04.6 LTS x86_64 (DigitalOcean Droplet), proxypass to `127.0.0.1:6875` using nginx/1.18.0 MariaDB is already installed on the host system.
OVERLORD added the 🐕 Support label 2026-02-05 07:39:41 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Jun 12, 2023):

So it looks like a connection is being made and everything, but it's simply a case of the credentials not matching with what's expected.

With both the app and database container image used in this, the database details are somewhat "sticky", in that they're only used on first start-up, or made persistent via other means after first boot.
This means that any changes made to the compose env details, after an initial boot (boot with existing volume files mounted), may not apply.

Based upon the provided info, I'm assuming this is a fresh system with no pre-existing data (do not continue below if that's not the case).
In that case, I'd advise doing the following:

  • Take down the existing containers.
  • Delete the existing mapped volume folders for these containers on the host system.
  • In your compose stack, Make sure that DB_PASS on the bookstack container is aligned with MYSQL_PASSWORD on the database container. I'd maybe avoid special characters for parsing safety here for these values.
  • Bring the stack up, so that any persistent data is re-created in those mapped volume folders.
@ssddanbrown commented on GitHub (Jun 12, 2023): So it looks like a connection is being made and everything, but it's simply a case of the credentials not matching with what's expected. With both the app and database container image used in this, the database details are somewhat "sticky", in that they're only used on first start-up, or made persistent via other means after first boot. This means that any changes made to the compose env details, after an initial boot (boot with existing volume files mounted), may not apply. Based upon the provided info, I'm assuming this is a fresh system with no pre-existing data (**do not continue below if that's not the case**). In that case, I'd advise doing the following: - Take down the existing containers. - Delete the existing mapped volume folders for these containers on the host system. - In your compose stack, Make sure that `DB_PASS` on the bookstack container is aligned with `MYSQL_PASSWORD` on the database container. I'd maybe avoid special characters for parsing safety here for these values. - Bring the stack up, so that any persistent data is re-created in those mapped volume folders.
Author
Owner

@sunjerry019 commented on GitHub (Jun 16, 2023):

Hi there, sorry I just got the time to look into this again, but that fixed it, thank you so much!

It actually did not occur to me that DB_PASS and MYSQL_PASSWORD should be the same, which in hindsight was extremely obvious. I actually tried making all the password fields the same but that did not work because I only restarted the container and did not delete the existing mapped volume folders.

Thanks once again for the help!

@sunjerry019 commented on GitHub (Jun 16, 2023): Hi there, sorry I just got the time to look into this again, but that fixed it, thank you so much! It actually did not occur to me that `DB_PASS` and `MYSQL_PASSWORD` should be the same, which in hindsight was extremely obvious. I actually tried making all the password fields the same but that did not work because I only restarted the container and did not delete the existing mapped volume folders. Thanks once again for the help!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#3847