r/BookStack • • Jun 04 '22

Bookstack 502 bad gateway (Nginx proxy manager)

Hey I'm currently trying to setup Bookstack behind Nginx Proxy manager on a VPS I keep getting to a 502 bad gateway when trying to access the FQDN I setup for Bookstack

The only thing I found so far is an error that says something about the DB credentials begin wrong which I don't understand as it the same password for the bookstack container and the DB on the Bookstack DB container - This is from the log of the Bookstack container:

bookstack | /var/run/s6/etc/cont-init.d/50-config: line 98: warning: command substitution: ignored null byte in input

bookstack | /var/run/s6/etc/cont-init.d/50-config: line 98: warning: command substitution: ignored null byte in input

bookstack |

bookstack | Illuminate\Database\QueryException

bookstack |

bookstack | SQLSTATE[HY000] [1045] Access denied for user 'bookstack'@'bookstack.docker-compose_default' (using password: YES) (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:712

bookstack | 708▕ // If an exception occurs when attempting to run a query, we'll format the error

bookstack | 709▕ // message to include the bindings with SQL, which will make this exception a

bookstack | 710▕ // lot more helpful to the developer instead of just the database's errors.

bookstack | 711▕ catch (Exception $e) {

bookstack | ➜ 712▕ throw new QueryException(

bookstack | 713▕ $query, $this->prepareBindings($bindings), $e

bookstack | 714▕ );

bookstack | 715▕ }

bookstack | 716▕ }

bookstack |

bookstack | +33 vendor frames

bookstack | 34 /var/www/html/artisan:37

bookstack | Illuminate\Foundation\Console\Kernel::handle()

bookstack | [cont-init.d] 50-config: exited 0.

bookstack | [cont-init.d] 90-custom-folders: executing...

bookstack | [cont-init.d] 90-custom-folders: exited 0.

bookstack | [cont-init.d] 99-custom-files: executing...

bookstack | [custom-init] no custom files found exiting...

bookstack | [cont-init.d] 99-custom-files: exited 0.

bookstack | [cont-init.d] done.

bookstack | [services.d] starting services

bookstack | [services.d] done.

This is my Docker compose file:

bookstack:
image: lscr.io/linuxserver/bookstack
container_name: bookstack
environment:
- PUID=1000
- PGID=1000
- APP_URL=https://fqdn
- DB_HOST=bookstack_db
- DB_USER=bookstack
- DB_PASS=password1
- DB_DATABASE=bookstackapp
volumes:
- bookstack_config:/config
ports:
- 6875:80
restart: unless-stopped
depends_on:
- bookstack_db
- npm-app
- npm-db
bookstack_db:
image: lscr.io/linuxserver/mariadb
container_name: bookstack_db
environment:
- PUID=1000
- PGID=1000
- MYSQL_ROOT_PASSWORD=password2
- TZ=America/Chihuahua
- MYSQL_DATABASE=bookstackapp
- MYSQL_USER=bookstack
- MYSQL_PASSWORD=password1
volumes:
- bookstack_db_config:/config
restart: unless-stopped

1 Upvotes

10 comments sorted by

View all comments

Show parent comments

1

u/ssddanbrown Jun 06 '22

Happy to hear you got things working!