Update to v21.05.4 => 502 Bad Gateway #2353

Closed
opened 2026-02-05 03:46:49 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @Biepa on GitHub (Aug 13, 2021).

Describe the bug
Updated to v21.05.4 with the linuxserver docker image and now get a 502 Error.

Your Configuration (please complete the following information):

  • Exact BookStack Version (v21.05.4
  • Hosting Method (Nginx/Apache/Docker): Linuxserver Docker image

Additional context
bookstack | App Key found - setting variable for seds
bookstack | Running config - db_user set
bookstack |
bookstack | Illuminate\Database\QueryException : SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_schema.tables where table_schema = bookstackapp and table_name = migrations and table_type = 'BASE TABLE')
bookstack |
bookstack | at /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:669
bookstack | 665| // If an exception occurs when attempting to run a query, we'll format the error
bookstack | 666| // message to include the bindings with SQL, which will make this exception a
bookstack | 667| // lot more helpful to the developer instead of just the database's errors.
bookstack | 668| catch (Exception $e) {
bookstack | > 669| throw new QueryException(
bookstack | 670| $query, $this->prepareBindings($bindings), $e
bookstack | 671| );
bookstack | 672| }
bookstack | 673|
bookstack |
bookstack | Exception trace:
bookstack |
bookstack | 1 Doctrine\DBAL\Driver\PDO\Exception::("SQLSTATE[HY000] [2002] Connection refused")
bookstack | /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18
bookstack |
bookstack | 2 Doctrine\DBAL\Driver\PDO\Exception::new(Object(PDOException))
bookstack | /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43

If this is an error in the linuxserver image, I will make a report there.

Originally created by @Biepa on GitHub (Aug 13, 2021). **Describe the bug** Updated to v21.05.4 with the linuxserver docker image and now get a 502 Error. **Your Configuration (please complete the following information):** - Exact BookStack Version (v21.05.4 - Hosting Method (Nginx/Apache/Docker): Linuxserver Docker image **Additional context** bookstack | App Key found - setting variable for seds bookstack | Running config - db_user set bookstack | bookstack | Illuminate\Database\QueryException : SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_schema.tables where table_schema = bookstackapp and table_name = migrations and table_type = 'BASE TABLE') bookstack | bookstack | at /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:669 bookstack | 665| // If an exception occurs when attempting to run a query, we'll format the error bookstack | 666| // message to include the bindings with SQL, which will make this exception a bookstack | 667| // lot more helpful to the developer instead of just the database's errors. bookstack | 668| catch (Exception $e) { bookstack | > 669| throw new QueryException( bookstack | 670| $query, $this->prepareBindings($bindings), $e bookstack | 671| ); bookstack | 672| } bookstack | 673| bookstack | bookstack | Exception trace: bookstack | bookstack | 1 Doctrine\DBAL\Driver\PDO\Exception::("SQLSTATE[HY000] [2002] Connection refused") bookstack | /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18 bookstack | bookstack | 2 Doctrine\DBAL\Driver\PDO\Exception::new(Object(PDOException)) bookstack | /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43 If this is an error in the linuxserver image, I will make a report there.
Author
Owner

@ssddanbrown commented on GitHub (Aug 14, 2021):

Hi @Biepa,
Don't believe this would be an error on our side, Looks like BookStack is having connection issues with the database. Could be the database server not running as expected, DB details used by bookstack not accepted by BookStack, a network issue in-between or something else.

@ssddanbrown commented on GitHub (Aug 14, 2021): Hi @Biepa, Don't believe this would be an error on our side, Looks like BookStack is having connection issues with the database. Could be the database server not running as expected, DB details used by bookstack not accepted by BookStack, a network issue in-between or something else.
Author
Owner

@Biepa commented on GitHub (Aug 14, 2021):

Hey @ssddanbrown,
Thank you very much for taking the time to look into it.

@Biepa commented on GitHub (Aug 14, 2021): Hey @ssddanbrown, Thank you very much for taking the time to look into it.
Author
Owner

@Biepa commented on GitHub (Aug 15, 2021):

I looked into the containers.
The bookstack container can ping the database container via IP and via DB_Host variable.
Checked the DB container ip and used "nc 192.168.16.2 3306" (from bookstack container) and got 5.5.5-10.4.21-MariaDB-1:10.4.21+maria~bionic-.....
So it seems that at least the DB is running.
Do you have an idea, how to find out why bookstack cant connect?

Here is a line that says, .env only supports 172.x.x.x is that right?

This line: /var/run/s6/etc/cont-init.d/50-config: line 91: warning: command substitution: ignored null byte in input
still showing a DB connect problem.

@Biepa commented on GitHub (Aug 15, 2021): I looked into the containers. The bookstack container can ping the database container via IP and via DB_Host variable. Checked the DB container ip and used "nc 192.168.16.2 3306" (from bookstack container) and got 5.5.5-10.4.21-MariaDB-1:10.4.21+maria~bionic-..... So it seems that at least the DB is running. Do you have an idea, how to find out why bookstack cant connect? [Here is a line](https://github.com/linuxserver/docker-bookstack/issues/58#issuecomment-832510345) that says, .env only supports 172.x.x.x is that right? This line: /var/run/s6/etc/cont-init.d/50-config: line 91: warning: command substitution: ignored null byte in input still showing a DB connect problem.
Author
Owner

@Biepa commented on GitHub (Aug 15, 2021):

Ok. Ignoring the errors. After 20 minutes it came online....

@Biepa commented on GitHub (Aug 15, 2021): Ok. Ignoring the errors. After 20 minutes it came online....
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2353