mindofbeholder
mindofbeholder16mo ago

Unable to start new Windmill instance with default docker due to "role 'root' does not exist'" error

I'm utilizing the default docker compose with the multiplayer and caddy services removed. When I start up the services I see this error on the db container:
2023-08-08T17:22:25.573703934Z 2023-08-08 17:22:25.573 UTC [431] FATAL: password authentication failed for user "root"
2023-08-08T17:22:25.573732259Z 2023-08-08 17:22:25.573 UTC [431] DETAIL: Role "root" does not exist.
2023-08-08T17:22:25.573703934Z 2023-08-08 17:22:25.573 UTC [431] FATAL: password authentication failed for user "root"
2023-08-08T17:22:25.573732259Z 2023-08-08 17:22:25.573 UTC [431] DETAIL: Role "root" does not exist.
Reviewing the server container I see this:
2023-08-08T17:17:40.260238531Z 2023-08-08T17:17:40.260191Z INFO windmill: Connecting to database...
2023-08-08T17:17:40.265424110Z Error: Connecting to database: error returned from database: password authentication failed for user "root"
2023-08-08T17:17:40.260238531Z 2023-08-08T17:17:40.260191Z INFO windmill: Connecting to database...
2023-08-08T17:17:40.265424110Z Error: Connecting to database: error returned from database: password authentication failed for user "root"
I logged into the db container, installed curl, and ran the "init-db-as-superuser.sql" script but the error continued to occur.
14 Replies
rubenf
rubenf16mo ago
The default docker compose does not use a root user to connect to the db so you probably did more modifications than that
mindofbeholder
mindofbeholderOP16mo ago
I can provide my file if you'd like to see it.
rubenf
rubenf16mo ago
Sure Are you using the .env file as well ?
mindofbeholder
mindofbeholderOP16mo ago
Yerp
rubenf
rubenf16mo ago
Can you send it as well
mindofbeholder
mindofbeholderOP16mo ago
Sorry have to remove and re-add. Left something in there.
mindofbeholder
mindofbeholderOP16mo ago
rubenf
rubenf16mo ago
well yeah your DATABASE_URL is: DATABASE_URL=postgres://db that's what doesn't work
mindofbeholder
mindofbeholderOP16mo ago
I appreciate you taking the time to identify the issue. Can you provide guidance on what that should be? windmill_user@db? I'm not really an ops guy so this is a little out of my wheelhouse
rubenf
rubenf16mo ago
why not use the default .env provided ?
mindofbeholder
mindofbeholderOP16mo ago
Because I didn't see it until you just mentioned it. Thanks. That's on me. Thanks again for taking the time.
rubenf
rubenf16mo ago
no worries, maybe it's a sign it wasn't clear enough
mindofbeholder
mindofbeholderOP16mo ago
I was reading through the self host article and clicked through to the compose. Didn't even think to back up a level on the repo and look for the .env You do have curl commands specifically calling out to copy down the .env but I guess I just glossed right over it.