You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i tried running thewindmill docker image for the first time and somehow i ended up with this error error returned from database: role "windmill_user" does not exist.
This happens on initial migrations that are run on setup
2025-01-16T21:45:33.898008Z INFO windmill-api/src/db.rs:154: Finished applying migration 20221104105107
2025-01-16T21:45:33.898034Z INFO windmill-api/src/db.rs:128: Started applying migration 20221104111317: completed job-raw lock
2025-01-16T21:45:33.915238Z INFO windmill-api/src/db.rs:154: Finished applying migration 20221104111317
2025-01-16T21:45:33.915281Z INFO windmill-api/src/db.rs:128: Started applying migration 20221104135246: flow-dependency job
2025-01-16T21:45:33.933547Z INFO windmill-api/src/db.rs:154: Finished applying migration 20221104135246
2025-01-16T21:45:33.933594Z INFO windmill-api/src/db.rs:128: Started applying migration 20221105003256: grant all
2025-01-16T21:45:33.934119Z INFO windmill-api/src/db.rs:154: Finished applying migration 20221105003256
Error: Migrating database: while executing migration 20221105003256: error returned from database: role "windmill_user" does not exist
Caused by:
0: while executing migration 20221105003256: error returned from database: role "windmill_user" does not exist
1: error returned from database: role "windmill_user" does not exist
2: role "windmill_user" does not exist
Binary is in 'standalone' mode
jemalloc enabled
Connecting to database...
2025-01-16T21:45:41.183529Z INFO src/main.rs:366: PostgreSQL version: PostgreSQL 14.15 (Debian 14.15-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit (windmill require PG >= 14)
2025-01-16T21:45:41.184069Z INFO windmill-api/src/db.rs:71: Acquiring global PG lock for potential migration with pid: Some(82)
2025-01-16T21:45:41.184522Z INFO windmill-api/src/db.rs:91: Acquired global PG lock
2025-01-16T21:45:41.185638Z INFO windmill-api/src/db.rs:128: Started applying migration 20221105003256: grant all
2025-01-16T21:45:41.185943Z INFO windmill-api/src/db.rs:154: Finished applying migration 20221105003256
Error: Migrating database: while executing migration 20221105003256: error returned from database: role "windmill_user" does not exist
Caused by:
0: while executing migration 20221105003256: error returned from database: role "windmill_user" does not exist
1: error returned from database: role "windmill_user" does not exist
2: role "windmill_user" does not exist
Binary is in 'standalone' mode
jemalloc enabled
Connecting to database...
any idea what is causing this? the postgres db was also fresh.
Hi @martinjuhasz , are you a superuser of that database?
Can you try with connecting to a local postgres similar to in the docker-compose and then find out the difference with your database?
I'm not the superuser.
My typical approach is to create a user. create a database. and grant all rights to that user to that database.
CREATE DATABASE windmill;
CREATE USER windmill WITH ENCRYPTED PASSWORD 'xyz';
GRANT ALL PRIVILEGES ON DATABASE windmill to windmill;
granting superuser for initial setup worked. i revoked it afterwards.
ALTER USER windmill WITH SUPERUSER
ALTER USER windmill WITH NOSUPERUSER
Is there anything i can do to add additional privileges without granting superuser to be safe in the future? All privileges on the database doesn't seem to be enough.
CREATE ROLE windmill_user;
GRANT ALL
ON ALL TABLES IN SCHEMA public
TO windmill_user;
GRANT ALL PRIVILEGES
ON ALL SEQUENCES IN SCHEMA public
TO windmill_user;
ALTER DEFAULT PRIVILEGES
IN SCHEMA public
GRANT ALL ON TABLES TO windmill_user;
ALTER DEFAULT PRIVILEGES
IN SCHEMA public
GRANT ALL ON SEQUENCES TO windmill_user;
CREATE ROLE windmill_admin WITH BYPASSRLS;
GRANT windmill_user TO windmill_admin;
Describe the bug
hey all,
i tried running thewindmill docker image for the first time and somehow i ended up with this error
error returned from database: role "windmill_user" does not exist
.This happens on initial migrations that are run on setup
any idea what is causing this? the postgres db was also fresh.
To reproduce
run the container
Expected behavior
Just do all migrations and launch
Screenshots
No response
Browser information
FIrefox
Application version
:latest
Additional Context
No response
The text was updated successfully, but these errors were encountered: