appwrite: π Bug Report: Appwrite manual installation throwing "Failed to connect to database" error
π Reproduction steps
Hello,
Iβm having some trouble with the manual installation steps on Ubuntu22.04. Iβve made my changes in the .env file and ran docker compose up -d --remove-orphans
. After that, judging from the output, everything looks fine. But when I look in the Appwrite container logs I find a database connection error and appwrite also doesnt start properly. I checked in the mariadb container, the credentials I set in the .env file are valid and I can connect to the database.
π Expected behavior
It should install with docker-compose properly with all the changes from the .env file and be reachable over the configured domain.
π Actual Behavior
Database connection not working. Appwrite container logs showing error:
Database not ready. Retrying connection (1)...
Database not ready. Retrying connection (2)...
Database not ready. Retrying connection (3)...
Database not ready. Retrying connection (4)...
Database not ready. Retrying connection (5)...
Database not ready. Retrying connection (6)...
Database not ready. Retrying connection (7)...
Database not ready. Retrying connection (8)...
Database not ready. Retrying connection (9)...
Database not ready. Retrying connection (10)...
Fatal error: Uncaught Exception: Failed to connect to database: Failed to create connection: ERR AUTH <password> called without any password configured for the default user. Are you sure your configuration is correct? in /usr/src/code/app/http.php:82
Stack trace:
#0 {main}
thrown in /usr/src/code/app/http.php on line 82
[2023-11-01 23:19:49 *97.0] ERROR php_swoole_server_rshutdown() (ERRNO 503): Fatal error: Uncaught Exception: Failed to connect to database: Failed to create connection: ERR AUTH <password> called without any password configured for the default user. Are you sure your configuration is correct? in /usr/src/code/app/http.php:82
Stack trace:
#0 {main}
thrown in /usr/src/code/app/http.php on line 82
Checked mariadb container, shows no error. Verified database credentials from .env file are working with mariadb container.
π² Appwrite version
Version 1.4.x
π» Operating system
Linux
𧱠Your Environment
I use a Hetzner Cloud server (CPX21) with Ubuntu 22.04 and am trying to install AppWrite 1.4.8. I always create a separate user for all the docker stuff and run the docker compose command with this user.
π Have you spent some time to check if this issue has been raised before?
- I checked and didnβt find similar issue
π’ Have you read the Code of Conduct?
- I have read the Code of Conduct
About this issue
- Original URL
- State: closed
- Created 8 months ago
- Comments: 21 (9 by maintainers)
Ahh yes. That is probably related to https://github.com/appwrite/appwrite/issues/3309. The library we are/were using doesnβt support passing a user and password. We are moving off of that library, though, so, hopefully, we can get the related issue fixed in the near future.
For now, Iβm going to close this as resolved. Thanks for your patience!
@stnguyen90
I did the wipe using the command you mentioned in your previous post
docker compose down -v
.I did a
docker exec
into theappwrite-mariadb
container and connected to the database from within the container with the mysql-client. This worked and I could connect with both accounts, normal user account and root account with the adjusted credentials from the .env-file. If I try to connect with the mysql-client from outside of the container none of the accounts work.@patrickc-sb, thanks for creating this issue! ππΌ
Did you already have Appwrite running before you did this? If so, updating the database password in the .env file doesnβt actually change the database password. Youβll need to follow the usual mysql/mariadb steps to update the password in the database.