Blank screen on linuxserver.io image #3494

Closed
opened 2026-02-05 06:53:39 +03:00 by OVERLORD · 12 comments
Owner

Originally created by @Inventhrice on GitHub (Feb 7, 2023).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

Referring to #4019 , I'm encountering an error where I get a blank screen. The database is pingable, I've connected to it from inside the container. Any help would be greatly appriciated.

Exact BookStack Version

v23.01.1-LS61

Log Content

2023/02/06 17:45:23 [error] 294#294: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'wiki.users' doesn't exist in /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:368
Stack trace:
#0 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(368): PDO->prepare()
#1 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(705): Illuminate\Database\Connection->Illuminate\Database\{closure}()
#2 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(672): Illuminate\Database\Connection->runQueryCallback()
#3 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(376): Illuminate\Database\Connection->run()
#4 /app/www/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2414): Illuminate\Database\Connection->select()
#5 /app/www/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2402): Illuminate\Database\Query\Builder->runSelect()
#6 /app/www/vendor/larav...PHP message: PHP Fatal error:  Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'wiki.users' doesn't exist in /app/www/vendor/lar>
Stack trace:
#0 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(368): PDO->prepare()
#1 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(705): Illuminate\Database\Connection->Illuminate\Database\{closure}()
#2 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(672): Illuminate\Database\Connection->runQueryCallback()
#3 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(376): Illuminate\Database\Connection->run()
#4 /app/www/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2414): Illuminate\Database\Connection->select()
#5 /app/www/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2402): Illuminate\Database\Query\
2
#6 /app/www/vendor/larav...PHP message: PHP Fatal error:  Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'wiki.users' doesn't exist in /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:368

PHP Version

No response

Hosting Environment

The site is hosted using swag (the container) on a raspberry pi 3.
image

Originally created by @Inventhrice on GitHub (Feb 7, 2023). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario Referring to #4019 , I'm encountering an error where I get a blank screen. The database is pingable, I've connected to it from inside the container. Any help would be greatly appriciated. ### Exact BookStack Version v23.01.1-LS61 ### Log Content ``` 2023/02/06 17:45:23 [error] 294#294: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'wiki.users' doesn't exist in /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:368 Stack trace: #0 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(368): PDO->prepare() #1 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(705): Illuminate\Database\Connection->Illuminate\Database\{closure}() #2 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(672): Illuminate\Database\Connection->runQueryCallback() #3 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(376): Illuminate\Database\Connection->run() #4 /app/www/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2414): Illuminate\Database\Connection->select() #5 /app/www/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2402): Illuminate\Database\Query\Builder->runSelect() #6 /app/www/vendor/larav...PHP message: PHP Fatal error: Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'wiki.users' doesn't exist in /app/www/vendor/lar> Stack trace: #0 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(368): PDO->prepare() #1 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(705): Illuminate\Database\Connection->Illuminate\Database\{closure}() #2 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(672): Illuminate\Database\Connection->runQueryCallback() #3 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(376): Illuminate\Database\Connection->run() #4 /app/www/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2414): Illuminate\Database\Connection->select() #5 /app/www/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2402): Illuminate\Database\Query\ 2 #6 /app/www/vendor/larav...PHP message: PHP Fatal error: Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'wiki.users' doesn't exist in /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:368 ``` ### PHP Version _No response_ ### Hosting Environment The site is hosted using swag (the container) on a raspberry pi 3. ![image](https://user-images.githubusercontent.com/45127310/217121293-7e2c8832-819d-4a90-bf6f-3344fcd6b329.png)
OVERLORD added the 🐕 Support label 2026-02-05 06:53:39 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Feb 7, 2023):

@Inventhrice Can you share the full logs for the start-up of just the bookstack container? So give it a restart and record all docker log output. The error makes it seem like the database has never been migrated, which occurs on container start-up.

@ssddanbrown commented on GitHub (Feb 7, 2023): @Inventhrice Can you share the full logs for the start-up of just the bookstack container? So give it a restart and record all docker log output. The error makes it seem like the database has never been migrated, which occurs on container start-up.
Author
Owner

@Inventhrice commented on GitHub (Feb 7, 2023):

Yes, here it is!
image

@Inventhrice commented on GitHub (Feb 7, 2023): Yes, here it is! ![image](https://user-images.githubusercontent.com/45127310/217303451-f7f58281-13cc-440a-9484-47072d6273bf.png)
Author
Owner

@ssddanbrown commented on GitHub (Feb 7, 2023):

Oaky, that looks fine, but does not align with the errors shared yesterday.
Do you get the new error messages, logging the same error, if you visit the application now after start-up?
Just want to make sure we're looking at current error messages, and not old ones.

@ssddanbrown commented on GitHub (Feb 7, 2023): Oaky, that looks fine, but does not align with the errors shared yesterday. Do you get the new error messages, logging the same error, if you visit the application now after start-up? Just want to make sure we're looking at current error messages, and not old ones.
Author
Owner

@Inventhrice commented on GitHub (Feb 7, 2023):

Yes, I just went to the webpage and I got a blank screen. Pulling the latest message from nginx's error.log it shows:

2023/02/07 16:34:24 [error] 267#267: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'wiki.users' doesn't exist in /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:368
Stack trace:
#0 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(368): PDO->prepare()
#1 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(705): Illuminate\Database\Connection->Illuminate\Database\{closure}()
#2 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(672): Illuminate\Database\Connection->runQueryCallback()
#3 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(376): Illuminate\Database\Connection->run()
#4 /app/www/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2414): Illuminate\Database\Connection->select()
#5 /app/www/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2402): Illuminate\Database\Query\Builder->runSelect()
#6 /app/www/vendor/larav...PHP message: PHP Fatal error:  Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'wiki.users' doesn't exist in /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:368
Stack trace:
#0 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(368): PDO->prepare()
#1 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(705): Illuminate\Database\Connection->Illuminate\Database\{closure}()
#2 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(672): Illuminate\Database\Connection->runQueryCallback()
#3 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(376): Illuminate\Database\Connection->run()
#4 /app/www/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2414): Illuminate\Database\Connection->select()
#5 /app/www/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2402): Illuminate\Database\Query\
@Inventhrice commented on GitHub (Feb 7, 2023): Yes, I just went to the webpage and I got a blank screen. Pulling the latest message from nginx's error.log it shows: ``` 2023/02/07 16:34:24 [error] 267#267: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'wiki.users' doesn't exist in /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:368 Stack trace: #0 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(368): PDO->prepare() #1 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(705): Illuminate\Database\Connection->Illuminate\Database\{closure}() #2 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(672): Illuminate\Database\Connection->runQueryCallback() #3 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(376): Illuminate\Database\Connection->run() #4 /app/www/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2414): Illuminate\Database\Connection->select() #5 /app/www/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2402): Illuminate\Database\Query\Builder->runSelect() #6 /app/www/vendor/larav...PHP message: PHP Fatal error: Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'wiki.users' doesn't exist in /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:368 Stack trace: #0 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(368): PDO->prepare() #1 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(705): Illuminate\Database\Connection->Illuminate\Database\{closure}() #2 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(672): Illuminate\Database\Connection->runQueryCallback() #3 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(376): Illuminate\Database\Connection->run() #4 /app/www/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2414): Illuminate\Database\Connection->select() #5 /app/www/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2402): Illuminate\Database\Query\ ```
Author
Owner

@ssddanbrown commented on GitHub (Feb 7, 2023):

Okay, very odd. Either one of your logs are lying, or there are two different databases at play or different app container instances active, or something similar.
Are your able to access your database and look at the wiki database, and see if it has many tables (Including a users table)?

@ssddanbrown commented on GitHub (Feb 7, 2023): Okay, very odd. Either one of your logs are lying, or there are two different databases at play or different app container instances active, or something similar. Are your able to access your database and look at the `wiki` database, and see if it has many tables (Including a `users` table)?
Author
Owner

@Inventhrice commented on GitHub (Feb 7, 2023):

I double checked, there are no duplicate wiki databases, and under SHOW TABLES, this is the result I got
image

@Inventhrice commented on GitHub (Feb 7, 2023): I double checked, there are no duplicate `wiki` databases, and under SHOW TABLES, this is the result I got ![image](https://user-images.githubusercontent.com/45127310/217308703-116ee46c-c324-497e-9af4-4765e6797448.png)
Author
Owner

@Inventhrice commented on GitHub (Feb 7, 2023):

That's weird, doing SELECT * FROM migrations shows it to be empty

@Inventhrice commented on GitHub (Feb 7, 2023): That's weird, doing `SELECT * FROM migrations` shows it to be empty
Author
Owner

@Inventhrice commented on GitHub (Feb 7, 2023):

If it'd be beneficial I could try stopping bookstack, dropping wiki, restart mariadb, and do a fresh install of bookstack?

@Inventhrice commented on GitHub (Feb 7, 2023): If it'd be beneficial I could try stopping bookstack, dropping `wiki`, restart mariadb, and do a fresh install of bookstack?
Author
Owner

@ssddanbrown commented on GitHub (Feb 7, 2023):

Yeah, You could give it a go. Just be sure to record the bookstack container logs upon first startup.

@ssddanbrown commented on GitHub (Feb 7, 2023): Yeah, You could give it a go. Just be sure to record the bookstack container logs upon first startup.
Author
Owner

@Inventhrice commented on GitHub (Feb 7, 2023):

wahey! that worked! I dunno why lol but that fixed it!

@Inventhrice commented on GitHub (Feb 7, 2023): wahey! that worked! I dunno why lol but that fixed it!
Author
Owner

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

Hi there, sorry for bumping an already closed issue, but I'm facing the same issue, but with a full docker container setup:

services:
  bookstack:
    image: lscr.io/linuxserver/bookstack
    container_name: bookstack
    environment:
      - PUID=1002
      - PGID=1002
      - APP_URL=https://wiki.ssag.eu
      - DB_HOST=bookstack_db
      - DB_PORT=3306
      - DB_USER=bookstack
      - DB_PASS=<redacted>
      - DB_DATABASE=bookstackapp
    volumes:
      - /home/ssag/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/ssag/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!

@sunjerry019 commented on GitHub (Jun 10, 2023): Hi there, sorry for bumping an already closed issue, but I'm facing the same issue, but with a full docker container setup: ```version: "2" services: bookstack: image: lscr.io/linuxserver/bookstack container_name: bookstack environment: - PUID=1002 - PGID=1002 - APP_URL=https://wiki.ssag.eu - DB_HOST=bookstack_db - DB_PORT=3306 - DB_USER=bookstack - DB_PASS=<redacted> - DB_DATABASE=bookstackapp volumes: - /home/ssag/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/ssag/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!
Author
Owner

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

@sunjerry019 Please open a new support thread if you need help, and when doing so please detail whether this is an existing instances being upgrade, or a fresh instance, along with confirmation if docker-compose is being used directly or if you're using an alternative method to run the compose stack.

@ssddanbrown commented on GitHub (Jun 11, 2023): @sunjerry019 Please open a new support thread if you need help, and when doing so please detail whether this is an existing instances being upgrade, or a fresh instance, along with confirmation if docker-compose is being used directly or if you're using an alternative method to run the compose stack.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#3494