-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connection refused after upgrade #4919
Comments
Hi @MapManagement,
First of all, be sure to re-up the stack after changing env vars since restarting containers alone won't allow the changes to take affect, the containers need to be re-created. Second, Some of the database details can be "sticky" as they are transferred to BookStack's env file on first run when in that kind of setup. Open the |
Hi @ssddanbrown, Eventhough I'm still able to access the database manually within the bookstack container, it tells me that the connection has been refused:
|
Does the database password container any special characters? |
Just letters and numbers. I have also changed it several times to make sure, that there's no problem with length or characters, but BookStack still cannot connect to the DB container. |
Can you access bash in the running BookStack container, then run the following: cd /app/www
php artisan tinker --execute="dd(config('database.connections.mysql'));"
|
First of all, i would like to thank you very much for your help.
All details are correct and are also in use when I try connecting manually.
The given select runs perfectly fine and is not blocked or not permitted.
Yes, the same error I found in the log file:
|
Very strange then, not sure what's going on. |
Output of bash command (only changed the password): PHP Warning: PHP Startup: Invalid date.timezone value '', using 'UTC' instead in Unknown on line 0
array:15 [ // vendor/psy/psysh/src/ExecutionClosure.php(40) : eval()'d code:1
"driver" => "mysql"
"url" => null
"host" => "bookstack_db"
"database" => "bookstackapp"
"username" => "bookstack"
"password" => "my_database_user_password"
"unix_socket" => ""
"port" => "3006"
"charset" => "utf8mb4"
"collation" => "utf8mb4_unicode_ci"
"prefix" => ""
"prefix_indexes" => true
"strict" => false
"engine" => null
"options" => []
] And the manual MySQL command: # connecting from bookstack container (entering password when asked for)
mariadb -u bookstack -p -h bookstack_db
# set database operating on
MariaDB [(none)]> use bookstackapp;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
# executing select
MariaDB [bookstackapp]> select * from users where system_name = 'public' limit 1;
# ...
1 row in set (0.004 sec) |
Hi @MapManagement, Do you have a |
I couldn't see the forest for the trees. It actually was the port definition in my env file. Thank your very much! :) |
Attempted Debugging
Searched GitHub Issues
Describe the Scenario
After upgrading my docker-compose stack (database and bookstack) container, bookstack isn't able to connect to the MariaDB instance anymore. However, I can ping the database host from the bookstack container and I'm also able to connect to the database via mariadb cli tool.
It seems like that my DB_DATABASE environment variable is stored in some file of the PHP app because of the first startup. I forgot to change the variable from "bookstack" to "bookstackapp" and now PHP tries to connect to the "bookstack" database. Even after changing it back in my environment file, it still tries to connect to "bookstack".
Is there anything I can do about it without completeley redeploying my database container?
I also added one of the log files I retrieved some errors from.
Exact BookStack Version
v24.02.2
Log Content
Hosting Environment
Docker compose template of LinuxServer.io on a Debian Bookworm host
The text was updated successfully, but these errors were encountered: