Another BookStack database connection error (Docker) reddit / selfhosted ---------------------------------------------------------------------- CrashOverride93 · 2023-12-12 21:49 Hello! I already have my own instance of BookStack in my homelab, and it's working as expected. But, after trying to install it as usual on my VPS, I just can't make it work. This is the log from BS: [migrations] started [migrations] 01-nginx-site-confs-default: executing... [migrations] 01-nginx-site-confs-default: succeeded [migrations] 02-default-location: executing... [migrations] 02-default-location: succeeded [migrations] done (...) Setting resolver to 127.0.0.11 Setting worker_processes to 2 generating self-signed keys in /config/keys, you can replace these with your own keys if required (...) Generating BookStack app key for first run App Key set to base64: you can modify the file to update /config/BOOKSTACK_APP_KEY.txt Running config - DB_HOST set **** Insert DB_PORT='20000' into /config/www/.env **** **** APP_URL in /config/www/.env is being updated from https://example.com to http://192.168.200.3:10002 **** **** If this is an existing install, you should run the following line from your host terminal to update the database URL entries: **** ****************************************************************** ****** docker exec -it bookstack php /app/www/artisan bookstack:update- url https://example.com http://192.168.200.3:10002 ****************************************************************** ****** Waiting for DB to be available Illuminate\Database\QueryException SQLSTATE[HY000] [2002] Operation timed out (SQL: select * from information_schema.tables where table_schema = bs01 and table_name = migrations and table_type = 'BASE TABLE') at /app/www/vendor/laravel/framework/src/Illuminate/Database/Con nection.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... [ls.io-init] done. The docker-compose, and all the relevant configuration for the database and so on is exactly de same as per on my homelab installation. This is the docker-compose I'm using on the VPS: services: bookstack-1: image: lscr.io/linuxserver/bookstack:latest container_name: bookstack-1 ports: - "10002:80/tcp" environment: - APP_URL=https:// - DB_HOST=192.168.200.3 - DB_PORT=20000 - DB_USER=bs01 - DB_PASS= - DB_DATABASE=bs01 - SESSION_LIFETIME=43200 - PUID=1000 - PGID=1000 volumes: - /home/debian/docker-data/bookstack-1:/config restart: always networks: - bookstack-net networks: bookstack-net: external: true Obviously, some things have changed (ports, dirs, etc), but the docker-compose file is exactly the same. Also, I connect BookStack to an external MariaDB server as well, as per on my homelab too. The database server that BookStack is trying to connect to is fully accessible, as other services use it already. And the credentials are correct (checked 3 times!) I already saw some threads talking about changing the variable DB\_PASS > DB\_PASSWORD, but that's not the case for me, I think. The .env file inside the mounted dir is configured correctly with the values from the environment variables. ---------------------------------------------------------------------- hdddanbrown · 2023-12-13 00:08 This sub is really becoming a tech support dump for all the people who are too lazy to ask for support on the githubs and such. what a shame ---------------------------------------------------------------------- CrashOverride93 · 2023-12-13 00:12 Thank you for your comment 😉🤝 ---------------------------------------------------------------------- ssddanbrown · 2023-12-13 01:19 I've [responded to your thread](https://www.reddit.com/r/BookStack/com ments/18gzmo6/comment/kd49akl/?utm_source=reddit&utm_medium=web2x&cont ext=3) on the BookStack subreddit. ---------------------------------------------------------------------- CrashOverride93 · 2023-12-13 19:07 Thank you very much.