Skip to content
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

[Bug]: When deploying Supabase, the Analytics container gives an ERROR. #3380

Closed
1 of 2 tasks
davyssonlucas opened this issue Sep 10, 2024 · 12 comments · Fixed by #3878
Closed
1 of 2 tasks

[Bug]: When deploying Supabase, the Analytics container gives an ERROR. #3380

davyssonlucas opened this issue Sep 10, 2024 · 12 comments · Fixed by #3878

Comments

@davyssonlucas
Copy link

davyssonlucas commented Sep 10, 2024

Description

I'm on 331, they adjusted the environment variables, but the analytics problem persists. 'failed for user "supabase-admin"'.

Did anyone manage to solve it?

Minimal Reproduction (if possible, example repository)

17259807112514805885415648273123
17259807884048316433469925408319
1725981291582717333908239639381

Exception or Error

Error Postgres

<IP_ADDRESS> <DATE_TIME> [1628] supabase_admin@postgres DETAIL:  User "supabase_admin" has no password assigned.
  Connection matched pg_hba.conf line 89: "host  all  all  <IP_RANGE>  scram-sha-256"
<IP_ADDRESS> <DATE_TIME> [1638] supabase_admin@postgres FATAL:  password authentication failed for user "supabase_admin"
<IP_ADDRESS> <DATE_TIME> [1638] supabase_admin@postgres DETAIL:  User "supabase_admin" has no password assigned.
  Connection matched pg_hba.conf line 89: "host  all  all  <IP_RANGE>  scram-sha-256"
<IP_ADDRESS> <DATE_TIME> [1637] supabase_admin@postgres FATAL:  password authentication failed for user "supabase_admin"
<IP_ADDRESS> <DATE_TIME> [1637] supabase_admin@postgres DETAIL:  User "supabase_admin" has no password assigned.
  Connection matched pg_hba.conf line 89: "host  all  all  <IP_RANGE>  scram-sha-256"
<IP_ADDRESS> <DATE_TIME> [1639] supabase_admin@postgres FATAL:  password authentication failed for user "supabase_admin"
<IP_ADDRESS> <DATE_TIME> [1639] supabase_admin@postgres DETAIL:  User "supabase_admin" has no password assigned.
  Connection matched pg_hba.conf line 89: "host  all  all  <IP_RANGE>  scram-sha-256"
<IP_ADDRESS> <DATE_TIME> [1640] supabase_admin@postgres FATAL:  password authentication failed for user "supabase_admin"
<IP_ADDRESS> <DATE_TIME> [1640] supabase_admin@postgres DETAIL:  User "supabase_admin" has no password assigned.
  Connection matched pg_hba.conf line 89: "host  all  all  <IP_RANGE>  scram-sha-256"
<IP_ADDRESS> <DATE_TIME> [1648] supabase_admin@postgres FATAL:  password authentication failed for user "supabase_admin"
<IP_ADDRESS> <DATE_TIME> [1648] supabase_admin@postgres DETAIL:  User "supabase_admin" has no password assigned.
  Connection matched pg_hba.conf line 89: "host  all  all  <IP_RANGE>  scram-sha-256"
<IP_ADDRESS> <DATE_TIME> [1649] supabase_admin@postgres FATAL:  password authentication failed for user "supabase_admin"
<IP_ADDRESS> <DATE_TIME> [1649] supabase_admin@postgres DETAIL:  User "supabase_admin" has no password assigned.
  Connection matched pg_hba.conf line 89: "host  all  all  <IP_RANGE>  scram-sha-256"
<IP_ADDRESS> <DATE_TIME> [1658] supabase_admin@postgres FATAL:  password authentication failed for user "supabase_admin"
<IP_ADDRESS> <DATE_TIME> [1658] supabase_admin@postgres DETAIL:  User "supabase_admin" has no password assigned.
  Connection matched pg_hba.conf line 89: "host  all  all  <IP_RANGE>  scram-sha-256"

Error Vector:

2024-09-10T15:17:34.118947Z ERROR transform{component_kind="transform" component_id=db_logs component_type=remap component_name=db_logs}: vector::internal_events::remap: Internal log [Mapping failed with event.] is being rate limited.
2024-09-10T15:17:45.352635Z  WARN sink{component_kind="sink" component_id=logflare_db component_type=http component_name=logflare_db}:request{request_id=0}:http: vector::internal_events::http_client: HTTP error. error=error trying to connect: dns error: failed to lookup address information: Try again error_type="request_failed" stage="processing" internal_log_rate_limit=true
2024-09-10T15:17:45.352692Z  WARN sink{component_kind="sink" component_id=logflare_db component_type=http component_name=logflare_db}:request{request_id=0}: vector::sinks::util::retries: Retrying after error. error=Failed to make HTTP(S) request: error trying to connect: dns error: failed to lookup address information: Try again internal_log_rate_limit=true
2024-09-10T15:17:46.970134Z ERROR transform{component_kind="transform" component_id=db_logs component_type=remap component_name=db_logs}: vector::internal_events::remap: Internal log [Mapping failed with event.] has been rate limited 9 times.
2024-09-10T15:17:46.970158Z ERROR transform{component_kind="transform" component_id=db_logs component_type=remap component_name=db_logs}: vector::internal_events::remap: Mapping failed with event. error="function call error for \"upcase\" at (475:515): expected string, got null" error_type="conversion_failed" stage="processing" internal_log_rate_limit=true
2024-09-10T15:17:46.970239Z ERROR transform{component_kind="transform" component_id=db_logs component_type=remap component_name=db_logs}: vector::internal_events::remap: Internal log [Mapping failed with event.] is being rate limited.
2024-09-10T15:17:48.873481Z  INFO source{component_kind="source" component_id=docker_host component_type=docker_logs component_name=docker_host}: vector::internal_events::docker_logs: Stopped watching for container logs. container_id=4a07b34db0242b9c2a21a9784b738c28c712ff70c79952ee82a1f31aacbb393a
2024-09-10T15:17:48.873563Z  INFO source{component_kind="source" component_id=docker_host component_type=docker_logs component_name=docker_host}: vector::internal_events::docker_logs: Started watching for container logs. container_id=4a07b34db0242b9c2a21a9784b738c28c712ff70c79952ee82a1f31aacbb393a
2024-09-10T15:17:49.048138Z ERROR source{component_kind="source" component_id=docker_host component_type=docker_logs component_name=docker_host}: vector::internal_events::docker_logs: Internal log [Received out of order log message.] has been rate limited 6 times.
2024-09-10T15:17:49.048163Z ERROR source{component_kind="source" component_id=docker_host component_type=docker_logs component_name=docker_host}: vector::internal_events::docker_logs: Received out of order log message. error_type="condition_failed" stage="receiving" container_id="4a07b34db0242b9c2a21a9784b738c28c712ff70c79952ee82a1f31aacbb393a" timestamp="2024-09-10T15:17:47.029775077Z" internal_log_rate_limit=true
2024-09-10T15:17:49.048256Z ERROR source{component_kind="source" component_id=docker_host component_type=docker_logs component_name=docker_host}: vector::internal_events::docker_logs: Internal log [Received out of order log message.] is being rate limited.
2024-09-10T15:17:49.049245Z  INFO source{component_kind="source" component_id=docker_host component_type=docker_logs component_name=docker_host}: vector::internal_events::docker_logs: Stopped watching for container logs. container_id=4a07b34db0242b9c2a21a9784b738c28c712ff70c79952ee82a1f31aacbb393a
2024-09-10T15:17:49.287212Z  INFO source{component_kind="source" component_id=docker_host component_type=docker_logs component_name=docker_host}: vector::internal_events::docker_logs: Started watching for container logs. container_id=4a07b34db0242b9c2a21a9784b738c28c712ff70c79952ee82a1f31aacbb393a

Error Analytics:

15:10:12.321 [notice] Application logflare exited: Logflare.Application.start(:normal, []) returned an error: shutdown: failed to start child: Cainophile.Adapters.Postgres
    ** (EXIT) :invalid_password
{"Kernel pid terminated",application_controller,"{application_start_failure,logflare,{{shutdown,{failed_to_start_child,'Elixir.Cainophile.Adapters.Postgres',invalid_password}},{'Elixir.Logflare.Application',start,[normal,[]]}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,logflare,{{shutdown,{failed_to_start_child,'Elixir.Cainophile.Adapters.Postgres',invalid_password}},{'Elixir.Logflare.Application',start,[normal,[]]}}})

Crash dump is being written to: erl_crash.dump...done
LOGFLARE_NODE_HOST is: 127.0.0.1

15:10:15.328 [info] Starting migration

15:10:15.757 [error] Postgrex.Protocol (#PID<0.163.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin"

15:10:15.758 [error] Postgrex.Protocol (#PID<0.162.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin"

15:10:17.755 [error] Postgrex.Protocol (#PID<0.162.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin"

15:10:17.960 [error] Postgrex.Protocol (#PID<0.163.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin"

15:10:22.925 [error] Postgrex.Protocol (#PID<0.163.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin"

15:10:23.667 [error] Postgrex.Protocol (#PID<0.162.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin"

Version

V4.0.0-beta.331

Cloud?

  • Yes
  • No
@tecysismx
Copy link

I have the same problem, I have tried in previous versions that supabase worked fine and it doesn't work either.

@amerkestijn
Copy link
Contributor

amerkestijn commented Sep 11, 2024

The "POSTGRES_HOST" environment variable seems to be "POSTGRES_HOSTNAME" now.
Not sure if that fixes it but please check your compose file & environment variables.
image

@davyssonlucas
Copy link
Author

The variables have been fixed, but the error still persists. Even so, I followed the instructions in this closed issue: Issues 2696, but it didn't solve the problem.

@davyssonlucas
Copy link
Author

In version 335 the reported problem persists.

@THPubs
Copy link

THPubs commented Sep 13, 2024

I'm also facing the same issue. I even added a script to set the password for supabase_admin but still it did not work.

@davyssonlucas
Copy link
Author

Guys, I found this in the Supabase documentation. I'll try to fix the error, you guys try too, and whoever solves it first, share the step by step here.

https://supabase.com/docs/guides/self-hosting/docker
image

@davyssonlucas
Copy link
Author

Guys, just run this and restart the degraded services and most of them will work:

docker exec -it $(docker ps | grep supabase-db | awk '{print $1}') psql -U postgres -c "ALTER USER supabase_admin WITH PASSWORD '<SERVICE_PASSWORD_POSTGRES>';"

use your .env SERVICE_PASSWORD_POSTGRES value to login

Now there is another problem, but only in Kong, Rest, Auth, Realtime and Storage.

@davyssonlucas
Copy link
Author

davyssonlucas commented Sep 17, 2024

docker exec -it $(docker ps | grep supabase-db | awk '{print $1}') psql -U postgres -c "ALTER USER supabase_admin WITH PASSWORD 'SERVICE_PASSWORD_POSTGRES';"
docker exec -it $(docker ps | grep supabase-db | awk '{print $1}') psql -U supabase_admin --password

use your .env SERVICE_PASSWORD_POSTGRES value to login

DROP PUBLICATION logflare_pub; DROP SCHEMA _analytics CASCADE; CREATE SCHEMA _analytics;\q

RESTART DEGRADED SERVICES

docker exec -it $(docker ps | grep supabase-db | awk '{print $1}') psql -U postgres
ALTER ROLE supabase_auth_admin LOGIN;
ALTER ROLE authenticator LOGIN;
ALTER ROLE supabase_storage_admin LOGIN;
ALTER ROLE pgbouncer LOGIN;
ALTER ROLE supabase_auth_admin WITH PASSWORD 'SERVICE_PASSWORD_POSTGRES';
ALTER ROLE authenticator WITH PASSWORD 'SERVICE_PASSWORD_POSTGRES';
ALTER ROLE supabase_storage_admin WITH PASSWORD 'SERVICE_PASSWORD_POSTGRES';
ALTER ROLE pgbouncer WITH PASSWORD 'SERVICE_PASSWORD_POSTGRES';

RESTART DEGRADED SERVICES

sudo chmod 644 /data/coolify/applications/<id>/volumes/api/kong.yml

RESTART DEGRADED SERVICES

By doing this, only 3 services are left out, Supabase Auth, Realtime Dev, Minio Createbucket.

@davyssonlucas
Copy link
Author

davyssonlucas commented Sep 17, 2024

Problema on Supabase Auth

2024-09-17T12:03:06.872850993Z {"level":"info","msg":"Go runtime metrics collection started","time":"2024-09-17T12:03:06Z"}
2024-09-17T12:03:07.289275925Z {"args":[0.406011461],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-09-17T12:03:07Z"}
2024-09-17T12:03:07.292295373Z {"level":"fatal","msg":"running db migrations: error executing /usr/local/etc/auth/migrations/00_init_auth_schema.up.sql, sql: -- auth.users definition\n\nCREATE TABLE IF NOT EXISTS auth.users (\n\tinstance_id uuid NULL,\n\tid uuid NOT NULL UNIQUE,\n\taud varchar(255) NULL,\n\t\"role\" varchar(255) NULL,\n\temail varchar(255) NULL UNIQUE,\n\tencrypted_password varchar(255) NULL,\n\tconfirmed_at timestamptz NULL,\n\tinvited_at timestamptz NULL,\n\tconfirmation_token varchar(255) NULL,\n\tconfirmation_sent_at timestamptz NULL,\n\trecovery_token varchar(255) NULL,\n\trecovery_sent_at timestamptz NULL,\n\temail_change_token varchar(255) NULL,\n\temail_change varchar(255) NULL,\n\temail_change_sent_at timestamptz NULL,\n\tlast_sign_in_at timestamptz NULL,\n\traw_app_meta_data jsonb NULL,\n\traw_user_meta_data jsonb NULL,\n\tis_super_admin bool NULL,\n\tcreated_at timestamptz NULL,\n\tupdated_at timestamptz NULL,\n\tCONSTRAINT users_pkey PRIMARY KEY (id)\n);\nCREATE INDEX IF NOT EXISTS users_instance_id_email_idx ON auth.users USING btree (instance_id, email);\nCREATE INDEX IF NOT EXISTS users_instance_id_idx ON auth.users USING btree (instance_id);\ncomment on table auth.users is 'Auth: Stores user login data within a secure schema.';\n\n-- auth.refresh_tokens definition\n\nCREATE TABLE IF NOT EXISTS auth.refresh_tokens (\n\tinstance_id uuid NULL,\n\tid bigserial NOT NULL,\n\t\"token\" varchar(255) NULL,\n\tuser_id varchar(255) NULL,\n\trevoked bool NULL,\n\tcreated_at timestamptz NULL,\n\tupdated_at timestamptz NULL,\n\tCONSTRAINT refresh_tokens_pkey PRIMARY KEY (id)\n);\nCREATE INDEX IF NOT EXISTS refresh_tokens_instance_id_idx ON auth.refresh_tokens USING btree (instance_id);\nCREATE INDEX IF NOT EXISTS refresh_tokens_instance_id_user_id_idx ON auth.refresh_tokens USING btree (instance_id, user_id);\nCREATE INDEX IF NOT EXISTS refresh_tokens_token_idx ON auth.refresh_tokens USING btree (token);\ncomment on table auth.refresh_tokens is 'Auth: Store of tokens used to refresh JWT tokens once they expire.';\n\n-- auth.instances definition\n\nCREATE TABLE IF NOT EXISTS auth.instances (\n\tid uuid NOT NULL,\n\tuuid uuid NULL,\n\traw_base_config text NULL,\n\tcreated_at timestamptz NULL,\n\tupdated_at timestamptz NULL,\n\tCONSTRAINT instances_pkey PRIMARY KEY (id)\n);\ncomment on table auth.instances is 'Auth: Manages users across multiple sites.';\n\n-- auth.audit_log_entries definition\n\nCREATE TABLE IF NOT EXISTS auth.audit_log_entries (\n\tinstance_id uuid NULL,\n\tid uuid NOT NULL,\n\tpayload json NULL,\n\tcreated_at timestamptz NULL,\n\tCONSTRAINT audit_log_entries_pkey PRIMARY KEY (id)\n);\nCREATE INDEX IF NOT EXISTS audit_logs_instance_id_idx ON auth.audit_log_entries USING btree (instance_id);\ncomment on table auth.audit_log_entries is 'Auth: Audit trail for user actions.';\n\n-- auth.schema_migrations definition\n\nCREATE TABLE IF NOT EXISTS auth.schema_migrations (\n\t\"version\" varchar(255) NOT NULL,\n\tCONSTRAINT schema_migrations_pkey PRIMARY KEY (\"version\")\n);\ncomment on table auth.schema_migrations is 'Auth: Manages updates to the auth system.';\n\t\t\n-- Gets the User ID from the request cookie\ncreate or replace function auth.uid() returns uuid as $$\n  select nullif(current_setting('request.jwt.claim.sub', true), '')::uuid;\n$$ language sql stable;\n\n-- Gets the User ID from the request cookie\ncreate or replace function auth.role() returns text as $$\n  select nullif(current_setting('request.jwt.claim.role', true), '')::text;\n$$ language sql stable;\n: ERROR: must be owner of function uid (SQLSTATE 42501)","time":"2024-09-17T12:03:07Z"}
2024-09-17T12:03:08.942622694Z {"level":"info","msg":"Go runtime metrics collection started","time":"2024-09-17T12:03:08Z"}
2024-09-17T12:03:09.075433561Z {"args":[0.108786076],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-09-17T12:03:09Z"}
2024-09-17T12:03:09.075465401Z {"level":"fatal","msg":"running db migrations: error executing /usr/local/etc/auth/migrations/00_init_auth_schema.up.sql, sql: -- auth.users definition\n\nCREATE TABLE IF NOT EXISTS auth.users (\n\tinstance_id uuid NULL,\n\tid uuid NOT NULL UNIQUE,\n\taud varchar(255) NULL,\n\t\"role\" varchar(255) NULL,\n\temail varchar(255) NULL UNIQUE,\n\tencrypted_password varchar(255) NULL,\n\tconfirmed_at timestamptz NULL,\n\tinvited_at timestamptz NULL,\n\tconfirmation_token varchar(255) NULL,\n\tconfirmation_sent_at timestamptz NULL,\n\trecovery_token varchar(255) NULL,\n\trecovery_sent_at timestamptz NULL,\n\temail_change_token varchar(255) NULL,\n\temail_change varchar(255) NULL,\n\temail_change_sent_at timestamptz NULL,\n\tlast_sign_in_at timestamptz NULL,\n\traw_app_meta_data jsonb NULL,\n\traw_user_meta_data jsonb NULL,\n\tis_super_admin bool NULL,\n\tcreated_at timestamptz NULL,\n\tupdated_at timestamptz NULL,\n\tCONSTRAINT users_pkey PRIMARY KEY (id)\n);\nCREATE INDEX IF NOT EXISTS users_instance_id_email_idx ON auth.users USING btree (instance_id, email);\nCREATE INDEX IF NOT EXISTS users_instance_id_idx ON auth.users USING btree (instance_id);\ncomment on table auth.users is 'Auth: Stores user login data within a secure schema.';\n\n-- auth.refresh_tokens definition\n\nCREATE TABLE IF NOT EXISTS auth.refresh_tokens (\n\tinstance_id uuid NULL,\n\tid bigserial NOT NULL,\n\t\"token\" varchar(255) NULL,\n\tuser_id varchar(255) NULL,\n\trevoked bool NULL,\n\tcreated_at timestamptz NULL,\n\tupdated_at timestamptz NULL,\n\tCONSTRAINT refresh_tokens_pkey PRIMARY KEY (id)\n);\nCREATE INDEX IF NOT EXISTS refresh_tokens_instance_id_idx ON auth.refresh_tokens USING btree (instance_id);\nCREATE INDEX IF NOT EXISTS refresh_tokens_instance_id_user_id_idx ON auth.refresh_tokens USING btree (instance_id, user_id);\nCREATE INDEX IF NOT EXISTS refresh_tokens_token_idx ON auth.refresh_tokens USING btree (token);\ncomment on table auth.refresh_tokens is 'Auth: Store of tokens used to refresh JWT tokens once they expire.';\n\n-- auth.instances definition\n\nCREATE TABLE IF NOT EXISTS auth.instances (\n\tid uuid NOT NULL,\n\tuuid uuid NULL,\n\traw_base_config text NULL,\n\tcreated_at timestamptz NULL,\n\tupdated_at timestamptz NULL,\n\tCONSTRAINT instances_pkey PRIMARY KEY (id)\n);\ncomment on table auth.instances is 'Auth: Manages users across multiple sites.';\n\n-- auth.audit_log_entries definition\n\nCREATE TABLE IF NOT EXISTS auth.audit_log_entries (\n\tinstance_id uuid NULL,\n\tid uuid NOT NULL,\n\tpayload json NULL,\n\tcreated_at timestamptz NULL,\n\tCONSTRAINT audit_log_entries_pkey PRIMARY KEY (id)\n);\nCREATE INDEX IF NOT EXISTS audit_logs_instance_id_idx ON auth.audit_log_entries USING btree (instance_id);\ncomment on table auth.audit_log_entries is 'Auth: Audit trail for user actions.';\n\n-- auth.schema_migrations definition\n\nCREATE TABLE IF NOT EXISTS auth.schema_migrations (\n\t\"version\" varchar(255) NOT NULL,\n\tCONSTRAINT schema_migrations_pkey PRIMARY KEY (\"version\")\n);\ncomment on table auth.schema_migrations is 'Auth: Manages updates to the auth system.';\n\t\t\n-- Gets the User ID from the request cookie\ncreate or replace function auth.uid() returns uuid as $$\n  select nullif(current_setting('request.jwt.claim.sub', true), '')::uuid;\n$$ language sql stable;\n\n-- Gets the User ID from the request cookie\ncreate or replace function auth.role() returns text as $$\n  select nullif(current_setting('request.jwt.claim.role', true), '')::text;\n$$ language sql stable;\n: ERROR: must be owner of function uid (SQLSTATE 42501)","time":"2024-09-17T12:03:09Z"}
2024-09-17T12:03:10.100304702Z {"level":"info","msg":"Go runtime metrics collection started","time":"2024-09-17T12:03:10Z"}
2024-09-17T12:03:10.170439786Z {"args":[0.067230995],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-09-17T12:03:10Z"}
2024-09-17T12:03:10.170482026Z {"level":"fatal","msg":"running db migrations: error executing /usr/local/etc/auth/migrations/00_init_auth_schema.up.sql, sql: -- auth.users definition\n\nCREATE TABLE IF NOT EXISTS auth.users (\n\tinstance_id uuid NULL,\n\tid uuid NOT NULL UNIQUE,\n\taud varchar(255) NULL,\n\t\"role\" varchar(255) NULL,\n\temail varchar(255) NULL UNIQUE,\n\tencrypted_password varchar(255) NULL,\n\tconfirmed_at timestamptz NULL,\n\tinvited_at timestamptz NULL,\n\tconfirmation_token varchar(255) NULL,\n\tconfirmation_sent_at timestamptz NULL,\n\trecovery_token varchar(255) NULL,\n\trecovery_sent_at timestamptz NULL,\n\temail_change_token varchar(255) NULL,\n\temail_change varchar(255) NULL,\n\temail_change_sent_at timestamptz NULL,\n\tlast_sign_in_at timestamptz NULL,\n\traw_app_meta_data jsonb NULL,\n\traw_user_meta_data jsonb NULL,\n\tis_super_admin bool NULL,\n\tcreated_at timestamptz NULL,\n\tupdated_at timestamptz NULL,\n\tCONSTRAINT users_pkey PRIMARY KEY (id)\n);\nCREATE INDEX IF NOT EXISTS users_instance_id_email_idx ON auth.users USING btree (instance_id, email);\nCREATE INDEX IF NOT EXISTS users_instance_id_idx ON auth.users USING btree (instance_id);\ncomment on table auth.users is 'Auth: Stores user login data within a secure schema.';\n\n-- auth.refresh_tokens definition\n\nCREATE TABLE IF NOT EXISTS auth.refresh_tokens (\n\tinstance_id uuid NULL,\n\tid bigserial NOT NULL,\n\t\"token\" varchar(255) NULL,\n\tuser_id varchar(255) NULL,\n\trevoked bool NULL,\n\tcreated_at timestamptz NULL,\n\tupdated_at timestamptz NULL,\n\tCONSTRAINT refresh_tokens_pkey PRIMARY KEY (id)\n);\nCREATE INDEX IF NOT EXISTS refresh_tokens_instance_id_idx ON auth.refresh_tokens USING btree (instance_id);\nCREATE INDEX IF NOT EXISTS refresh_tokens_instance_id_user_id_idx ON auth.refresh_tokens USING btree (instance_id, user_id);\nCREATE INDEX IF NOT EXISTS refresh_tokens_token_idx ON auth.refresh_tokens USING btree (token);\ncomment on table auth.refresh_tokens is 'Auth: Store of tokens used to refresh JWT tokens once they expire.';\n\n-- auth.instances definition\n\nCREATE TABLE IF NOT EXISTS auth.instances (\n\tid uuid NOT NULL,\n\tuuid uuid NULL,\n\traw_base_config text NULL,\n\tcreated_at timestamptz NULL,\n\tupdated_at timestamptz NULL,\n\tCONSTRAINT instances_pkey PRIMARY KEY (id)\n);\ncomment on table auth.instances is 'Auth: Manages users across multiple sites.';\n\n-- auth.audit_log_entries definition\n\nCREATE TABLE IF NOT EXISTS auth.audit_log_entries (\n\tinstance_id uuid NULL,\n\tid uuid NOT NULL,\n\tpayload json NULL,\n\tcreated_at timestamptz NULL,\n\tCONSTRAINT audit_log_entries_pkey PRIMARY KEY (id)\n);\nCREATE INDEX IF NOT EXISTS audit_logs_instance_id_idx ON auth.audit_log_entries USING btree (instance_id);\ncomment on table auth.audit_log_entries is 'Auth: Audit trail for user actions.';\n\n-- auth.schema_migrations definition\n\nCREATE TABLE IF NOT EXISTS auth.schema_migrations (\n\t\"version\" varchar(255) NOT NULL,\n\tCONSTRAINT schema_migrations_pkey PRIMARY KEY (\"version\")\n);\ncomment on table auth.schema_migrations is 'Auth: Manages updates to the auth system.';\n\t\t\n-- Gets the User ID from the request cookie\ncreate or replace function auth.uid() returns uuid as $$\n  select nullif(current_setting('request.jwt.claim.sub', true), '')::uuid;\n$$ language sql stable;\n\n-- Gets the User ID from the request cookie\ncreate or replace function auth.role() returns text as $$\n  select nullif(current_setting('request.jwt.claim.role', true), '')::text;\n$$ language sql stable;\n: ERROR: must be owner of function uid (SQLSTATE 42501)","time":"2024-09-17T12:03:10Z"}
2024-09-17T12:03:11.663456129Z {"level":"info","msg":"Go runtime metrics collection started","time":"2024-09-17T12:03:11Z"}
2024-09-17T12:03:11.721877579Z {"args":[0.062650942],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-09-17T12:03:11Z"}
2024-09-17T12:03:11.721935139Z {"level":"fatal","msg":"running db migrations: error executing /usr/local/etc/auth/migrations/00_init_auth_schema.up.sql, sql: -- auth.users definition\n\nCREATE TABLE IF NOT EXISTS auth.users (\n\tinstance_id uuid NULL,\n\tid uuid NOT NULL UNIQUE,\n\taud varchar(255) NULL,\n\t\"role\" varchar(255) NULL,\n\temail varchar(255) NULL UNIQUE,\n\tencrypted_password varchar(255) NULL,\n\tconfirmed_at timestamptz NULL,\n\tinvited_at timestamptz NULL,\n\tconfirmation_token varchar(255) NULL,\n\tconfirmation_sent_at timestamptz NULL,\n\trecovery_token varchar(255) NULL,\n\trecovery_sent_at timestamptz NULL,\n\temail_change_token varchar(255) NULL,\n\temail_change varchar(255) NULL,\n\temail_change_sent_at timestamptz NULL,\n\tlast_sign_in_at timestamptz NULL,\n\traw_app_meta_data jsonb NULL,\n\traw_user_meta_data jsonb NULL,\n\tis_super_admin bool NULL,\n\tcreated_at timestamptz NULL,\n\tupdated_at timestamptz NULL,\n\tCONSTRAINT users_pkey PRIMARY KEY (id)\n);\nCREATE INDEX IF NOT EXISTS users_instance_id_email_idx ON auth.users USING btree (instance_id, email);\nCREATE INDEX IF NOT EXISTS users_instance_id_idx ON auth.users USING btree (instance_id);\ncomment on table auth.users is 'Auth: Stores user login data within a secure schema.';\n\n-- auth.refresh_tokens definition\n\nCREATE TABLE IF NOT EXISTS auth.refresh_tokens (\n\tinstance_id uuid NULL,\n\tid bigserial NOT NULL,\n\t\"token\" varchar(255) NULL,\n\tuser_id varchar(255) NULL,\n\trevoked bool NULL,\n\tcreated_at timestamptz NULL,\n\tupdated_at timestamptz NULL,\n\tCONSTRAINT refresh_tokens_pkey PRIMARY KEY (id)\n);\nCREATE INDEX IF NOT EXISTS refresh_tokens_instance_id_idx ON auth.refresh_tokens USING btree (instance_id);\nCREATE INDEX IF NOT EXISTS refresh_tokens_instance_id_user_id_idx ON auth.refresh_tokens USING btree (instance_id, user_id);\nCREATE INDEX IF NOT EXISTS refresh_tokens_token_idx ON auth.refresh_tokens USING btree (token);\ncomment on table auth.refresh_tokens is 'Auth: Store of tokens used to refresh JWT tokens once they expire.';\n\n-- auth.instances definition\n\nCREATE TABLE IF NOT EXISTS auth.instances (\n\tid uuid NOT NULL,\n\tuuid uuid NULL,\n\traw_base_config text NULL,\n\tcreated_at timestamptz NULL,\n\tupdated_at timestamptz NULL,\n\tCONSTRAINT instances_pkey PRIMARY KEY (id)\n);\ncomment on table auth.instances is 'Auth: Manages users across multiple sites.';\n\n-- auth.audit_log_entries definition\n\nCREATE TABLE IF NOT EXISTS auth.audit_log_entries (\n\tinstance_id uuid NULL,\n\tid uuid NOT NULL,\n\tpayload json NULL,\n\tcreated_at timestamptz NULL,\n\tCONSTRAINT audit_log_entries_pkey PRIMARY KEY (id)\n);\nCREATE INDEX IF NOT EXISTS audit_logs_instance_id_idx ON auth.audit_log_entries USING btree (instance_id);\ncomment on table auth.audit_log_entries is 'Auth: Audit trail for user actions.';\n\n-- auth.schema_migrations definition\n\nCREATE TABLE IF NOT EXISTS auth.schema_migrations (\n\t\"version\" varchar(255) NOT NULL,\n\tCONSTRAINT schema_migrations_pkey PRIMARY KEY (\"version\")\n);\ncomment on table auth.schema_migrations is 'Auth: Manages updates to the auth system.';\n\t\t\n-- Gets the User ID from the request cookie\ncreate or replace function auth.uid() returns uuid as $$\n  select nullif(current_setting('request.jwt.claim.sub', true), '')::uuid;\n$$ language sql stable;\n\n-- Gets the User ID from the request cookie\ncreate or replace function auth.role() returns text as $$\n  select nullif(current_setting('request.jwt.claim.role', true), '')::text;\n$$ language sql stable;\n: ERROR: must be owner of function uid (SQLSTATE 42501)","time":"2024-09-17T12:03:11Z"}
2024-09-17T12:03:13.482968742Z {"level":"info","msg":"Go runtime metrics collection started","time":"2024-09-17T12:03:13Z"}
2024-09-17T12:03:13.537374380Z {"args":[0.053919077],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-09-17T12:03:13Z"}
2024-09-17T12:03:13.537411860Z {"level":"fatal","msg":"running db migrations: error executing /usr/local/etc/auth/migrations/00_init_auth_schema.up.sql, sql: -- auth.users definition\n\nCREATE TABLE IF NOT EXISTS auth.users (\n\tinstance_id uuid NULL,\n\tid uuid NOT NULL UNIQUE,\n\taud varchar(255) NULL,\n\t\"role\" varchar(255) NULL,\n\temail varchar(255) NULL UNIQUE,\n\tencrypted_password varchar(255) NULL,\n\tconfirmed_at timestamptz NULL,\n\tinvited_at timestamptz NULL,\n\tconfirmation_token varchar(255) NULL,\n\tconfirmation_sent_at timestamptz NULL,\n\trecovery_token varchar(255) NULL,\n\trecovery_sent_at timestamptz NULL,\n\temail_change_token varchar(255) NULL,\n\temail_change varchar(255) NULL,\n\temail_change_sent_at timestamptz NULL,\n\tlast_sign_in_at timestamptz NULL,\n\traw_app_meta_data jsonb NULL,\n\traw_user_meta_data jsonb NULL,\n\tis_super_admin bool NULL,\n\tcreated_at timestamptz NULL,\n\tupdated_at timestamptz NULL,\n\tCONSTRAINT users_pkey PRIMARY KEY (id)\n);\nCREATE INDEX IF NOT EXISTS users_instance_id_email_idx ON auth.users USING btree (instance_id, email);\nCREATE INDEX IF NOT EXISTS users_instance_id_idx ON auth.users USING btree (instance_id);\ncomment on table auth.users is 'Auth: Stores user login data within a secure schema.';\n\n-- auth.refresh_tokens definition\n\nCREATE TABLE IF NOT EXISTS auth.refresh_tokens (\n\tinstance_id uuid NULL,\n\tid bigserial NOT NULL,\n\t\"token\" varchar(255) NULL,\n\tuser_id varchar(255) NULL,\n\trevoked bool NULL,\n\tcreated_at timestamptz NULL,\n\tupdated_at timestamptz NULL,\n\tCONSTRAINT refresh_tokens_pkey PRIMARY KEY (id)\n);\nCREATE INDEX IF NOT EXISTS refresh_tokens_instance_id_idx ON auth.refresh_tokens USING btree (instance_id);\nCREATE INDEX IF NOT EXISTS refresh_tokens_instance_id_user_id_idx ON auth.refresh_tokens USING btree (instance_id, user_id);\nCREATE INDEX IF NOT EXISTS refresh_tokens_token_idx ON auth.refresh_tokens USING btree (token);\ncomment on table auth.refresh_tokens is 'Auth: Store of tokens used to refresh JWT tokens once they expire.';\n\n-- auth.instances definition\n\nCREATE TABLE IF NOT EXISTS auth.instances (\n\tid uuid NOT NULL,\n\tuuid uuid NULL,\n\traw_base_config text NULL,\n\tcreated_at timestamptz NULL,\n\tupdated_at timestamptz NULL,\n\tCONSTRAINT instances_pkey PRIMARY KEY (id)\n);\ncomment on table auth.instances is 'Auth: Manages users across multiple sites.';\n\n-- auth.audit_log_entries definition\n\nCREATE TABLE IF NOT EXISTS auth.audit_log_entries (\n\tinstance_id uuid NULL,\n\tid uuid NOT NULL,\n\tpayload json NULL,\n\tcreated_at timestamptz NULL,\n\tCONSTRAINT audit_log_entries_pkey PRIMARY KEY (id)\n);\nCREATE INDEX IF NOT EXISTS audit_logs_instance_id_idx ON auth.audit_log_entries USING btree (instance_id);\ncomment on table auth.audit_log_entries is 'Auth: Audit trail for user actions.';\n\n-- auth.schema_migrations definition\n\nCREATE TABLE IF NOT EXISTS auth.schema_migrations (\n\t\"version\" varchar(255) NOT NULL,\n\tCONSTRAINT schema_migrations_pkey PRIMARY KEY (\"version\")\n);\ncomment on table auth.schema_migrations is 'Auth: Manages updates to the auth system.';\n\t\t\n-- Gets the User ID from the request cookie\ncreate or replace function auth.uid() returns uuid as $$\n  select nullif(current_setting('request.jwt.claim.sub', true), '')::uuid;\n$$ language sql stable;\n\n-- Gets the User ID from the request cookie\ncreate or replace function auth.role() returns text as $$\n  select nullif(current_setting('request.jwt.claim.role', true), '')::text;\n$$ language sql stable;\n: ERROR: must be owner of function uid (SQLSTATE 42501)","time":"2024-09-17T12:03:13Z"}
2024-09-17T12:03:15.551004398Z {"level":"info","msg":"Go runtime metrics collection started","time":"2024-09-17T12:03:15Z"}
2024-09-17T12:03:15.573416743Z {"args":[0.018789055],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-09-17T12:03:15Z"}
2024-09-17T12:03:15.573457623Z {"level":"fatal","msg":"running db migrations: error executing /usr/local/etc/auth/migrations/00_init_auth_schema.up.sql, sql: -- auth.users definition\n\nCREATE TABLE IF NOT EXISTS auth.users (\n\tinstance_id uuid NULL,\n\tid uuid NOT NULL UNIQUE,\n\taud varchar(255) NULL,\n\t\"role\" varchar(255) NULL,\n\temail varchar(255) NULL UNIQUE,\n\tencrypted_password varchar(255) NULL,\n\tconfirmed_at timestamptz NULL,\n\tinvited_at timestamptz NULL,\n\tconfirmation_token varchar(255) NULL,\n\tconfirmation_sent_at timestamptz NULL,\n\trecovery_token varchar(255) NULL,\n\trecovery_sent_at timestamptz NULL,\n\temail_change_token varchar(255) NULL,\n\temail_change varchar(255) NULL,\n\temail_change_sent_at timestamptz NULL,\n\tlast_sign_in_at timestamptz NULL,\n\traw_app_meta_data jsonb NULL,\n\traw_user_meta_data jsonb NULL,\n\tis_super_admin bool NULL,\n\tcreated_at timestamptz NULL,\n\tupdated_at timestamptz NULL,\n\tCONSTRAINT users_pkey PRIMARY KEY (id)\n);\nCREATE INDEX IF NOT EXISTS users_instance_id_email_idx ON auth.users USING btree (instance_id, email);\nCREATE INDEX IF NOT EXISTS users_instance_id_idx ON auth.users USING btree (instance_id);\ncomment on table auth.users is 'Auth: Stores user login data within a secure schema.';\n\n-- auth.refresh_tokens definition\n\nCREATE TABLE IF NOT EXISTS auth.refresh_tokens (\n\tinstance_id uuid NULL,\n\tid bigserial NOT NULL,\n\t\"token\" varchar(255) NULL,\n\tuser_id varchar(255) NULL,\n\trevoked bool NULL,\n\tcreated_at timestamptz NULL,\n\tupdated_at timestamptz NULL,\n\tCONSTRAINT refresh_tokens_pkey PRIMARY KEY (id)\n);\nCREATE INDEX IF NOT EXISTS refresh_tokens_instance_id_idx ON auth.refresh_tokens USING btree (instance_id);\nCREATE INDEX IF NOT EXISTS refresh_tokens_instance_id_user_id_idx ON auth.refresh_tokens USING btree (instance_id, user_id);\nCREATE INDEX IF NOT EXISTS refresh_tokens_token_idx ON auth.refresh_tokens USING btree (token);\ncomment on table auth.refresh_tokens is 'Auth: Store of tokens used to refresh JWT tokens once they expire.';\n\n-- auth.instances definition\n\nCREATE TABLE IF NOT EXISTS auth.instances (\n\tid uuid NOT NULL,\n\tuuid uuid NULL,\n\traw_base_config text NULL,\n\tcreated_at timestamptz NULL,\n\tupdated_at timestamptz NULL,\n\tCONSTRAINT instances_pkey PRIMARY KEY (id)\n);\ncomment on table auth.instances is 'Auth: Manages users across multiple sites.';\n\n-- auth.audit_log_entries definition\n\nCREATE TABLE IF NOT EXISTS auth.audit_log_entries (\n\tinstance_id uuid NULL,\n\tid uuid NOT NULL,\n\tpayload json NULL,\n\tcreated_at timestamptz NULL,\n\tCONSTRAINT audit_log_entries_pkey PRIMARY KEY (id)\n);\nCREATE INDEX IF NOT EXISTS audit_logs_instance_id_idx ON auth.audit_log_entries USING btree (instance_id);\ncomment on table auth.audit_log_entries is 'Auth: Audit trail for user actions.';\n\n-- auth.schema_migrations definition\n\nCREATE TABLE IF NOT EXISTS auth.schema_migrations (\n\t\"version\" varchar(255) NOT NULL,\n\tCONSTRAINT schema_migrations_pkey PRIMARY KEY (\"version\")\n);\ncomment on table auth.schema_migrations is 'Auth: Manages updates to the auth system.';\n\t\t\n-- Gets the User ID from the request cookie\ncreate or replace function auth.uid() returns uuid as $$\n  select nullif(current_setting('request.jwt.claim.sub', true), '')::uuid;\n$$ language sql stable;\n\n-- Gets the User ID from the request cookie\ncreate or replace function auth.role() returns text as $$\n  select nullif(current_setting('request.jwt.claim.role', true), '')::text;\n$$ language sql stable;\n: ERROR: must be owner of function uid (SQLSTATE 42501)","time":"2024-09-17T12:03:15Z"}
2024-09-17T12:03:19.278358120Z {"level":"info","msg":"Go runtime metrics collection started","time":"2024-09-17T12:03:19Z"}
2024-09-17T12:03:19.302826791Z {"args":[0.021268102],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-09-17T12:03:19Z"}
2024-09-17T12:03:19.302868871Z {"level":"fatal","msg":"running db migrations: error executing /usr/local/etc/auth/migrations/00_init_auth_schema.up.sql, sql: -- auth.users definition\n\nCREATE TABLE IF NOT EXISTS auth.users (\n\tinstance_id uuid NULL,\n\tid uuid NOT NULL UNIQUE,\n\taud varchar(255) NULL,\n\t\"role\" varchar(255) NULL,\n\temail varchar(255) NULL UNIQUE,\n\tencrypted_password varchar(255) NULL,\n\tconfirmed_at timestamptz NULL,\n\tinvited_at timestamptz NULL,\n\tconfirmation_token varchar(255) NULL,\n\tconfirmation_sent_at timestamptz NULL,\n\trecovery_token varchar(255) NULL,\n\trecovery_sent_at timestamptz NULL,\n\temail_change_token varchar(255) NULL,\n\temail_change varchar(255) NULL,\n\temail_change_sent_at timestamptz NULL,\n\tlast_sign_in_at timestamptz NULL,\n\traw_app_meta_data jsonb NULL,\n\traw_user_meta_data jsonb NULL,\n\tis_super_admin bool NULL,\n\tcreated_at timestamptz NULL,\n\tupdated_at timestamptz NULL,\n\tCONSTRAINT users_pkey PRIMARY KEY (id)\n);\nCREATE INDEX IF NOT EXISTS users_instance_id_email_idx ON auth.users USING btree (instance_id, email);\nCREATE INDEX IF NOT EXISTS users_instance_id_idx ON auth.users USING btree (instance_id);\ncomment on table auth.users is 'Auth: Stores user login data within a secure schema.';\n\n-- auth.refresh_tokens definition\n\nCREATE TABLE IF NOT EXISTS auth.refresh_tokens (\n\tinstance_id uuid NULL,\n\tid bigserial NOT NULL,\n\t\"token\" varchar(255) NULL,\n\tuser_id varchar(255) NULL,\n\trevoked bool NULL,\n\tcreated_at timestamptz NULL,\n\tupdated_at timestamptz NULL,\n\tCONSTRAINT refresh_tokens_pkey PRIMARY KEY (id)\n);\nCREATE INDEX IF NOT EXISTS refresh_tokens_instance_id_idx ON auth.refresh_tokens USING btree (instance_id);\nCREATE INDEX IF NOT EXISTS refresh_tokens_instance_id_user_id_idx ON auth.refresh_tokens USING btree (instance_id, user_id);\nCREATE INDEX IF NOT EXISTS refresh_tokens_token_idx ON auth.refresh_tokens USING btree (token);\ncomment on table auth.refresh_tokens is 'Auth: Store of tokens used to refresh JWT tokens once they expire.';\n\n-- auth.instances definition\n\nCREATE TABLE IF NOT EXISTS auth.instances (\n\tid uuid NOT NULL,\n\tuuid uuid NULL,\n\traw_base_config text NULL,\n\tcreated_at timestamptz NULL,\n\tupdated_at timestamptz NULL,\n\tCONSTRAINT instances_pkey PRIMARY KEY (id)\n);\ncomment on table auth.instances is 'Auth: Manages users across multiple sites.';\n\n-- auth.audit_log_entries definition\n\nCREATE TABLE IF NOT EXISTS auth.audit_log_entries (\n\tinstance_id uuid NULL,\n\tid uuid NOT NULL,\n\tpayload json NULL,\n\tcreated_at timestamptz NULL,\n\tCONSTRAINT audit_log_entries_pkey PRIMARY KEY (id)\n);\nCREATE INDEX IF NOT EXISTS audit_logs_instance_id_idx ON auth.audit_log_entries USING btree (instance_id);\ncomment on table auth.audit_log_entries is 'Auth: Audit trail for user actions.';\n\n-- auth.schema_migrations definition\n\nCREATE TABLE IF NOT EXISTS auth.schema_migrations (\n\t\"version\" varchar(255) NOT NULL,\n\tCONSTRAINT schema_migrations_pkey PRIMARY KEY (\"version\")\n);\ncomment on table auth.schema_migrations is 'Auth: Manages updates to the auth system.';\n\t\t\n-- Gets the User ID from the request cookie\ncreate or replace function auth.uid() returns uuid as $$\n  select nullif(current_setting('request.jwt.claim.sub', true), '')::uuid;\n$$ language sql stable;\n\n-- Gets the User ID from the request cookie\ncreate or replace function auth.role() returns text as $$\n  select nullif(current_setting('request.jwt.claim.role', true), '')::text;\n$$ language sql stable;\n: ERROR: must be owner of function uid (SQLSTATE 42501)","time":"2024-09-17T12:03:19Z"}
2024-09-17T12:03:26.076708055Z {"level":"info","msg":"Go runtime metrics collection started","time":"2024-09-17T12:03:26Z"}
2024-09-17T12:03:26.107867346Z {"args":[0.027025199],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-09-17T12:03:26Z"}
2024-09-17T12:03:26.107901146Z {"level":"fatal","msg":"running db migrations: error executing /usr/local/etc/auth/migrations/00_init_auth_schema.up.sql, sql: -- auth.users definition\n\nCREATE TABLE IF NOT EXISTS auth.users (\n\tinstance_id uuid NULL,\n\tid uuid NOT NULL UNIQUE,\n\taud varchar(255) NULL,\n\t\"role\" varchar(255) NULL,\n\temail varchar(255) NULL UNIQUE,\n\tencrypted_password varchar(255) NULL,\n\tconfirmed_at timestamptz NULL,\n\tinvited_at timestamptz NULL,\n\tconfirmation_token varchar(255) NULL,\n\tconfirmation_sent_at timestamptz NULL,\n\trecovery_token varchar(255) NULL,\n\trecovery_sent_at timestamptz NULL,\n\temail_change_token varchar(255) NULL,\n\temail_change varchar(255) NULL,\n\temail_change_sent_at timestamptz NULL,\n\tlast_sign_in_at timestamptz NULL,\n\traw_app_meta_data jsonb NULL,\n\traw_user_meta_data jsonb NULL,\n\tis_super_admin bool NULL,\n\tcreated_at timestamptz NULL,\n\tupdated_at timestamptz NULL,\n\tCONSTRAINT users_pkey PRIMARY KEY (id)\n);\nCREATE INDEX IF NOT EXISTS users_instance_id_email_idx ON auth.users USING btree (instance_id, email);\nCREATE INDEX IF NOT EXISTS users_instance_id_idx ON auth.users USING btree (instance_id);\ncomment on table auth.users is 'Auth: Stores user login data within a secure schema.';\n\n-- auth.refresh_tokens definition\n\nCREATE TABLE IF NOT EXISTS auth.refresh_tokens (\n\tinstance_id uuid NULL,\n\tid bigserial NOT NULL,\n\t\"token\" varchar(255) NULL,\n\tuser_id varchar(255) NULL,\n\trevoked bool NULL,\n\tcreated_at timestamptz NULL,\n\tupdated_at timestamptz NULL,\n\tCONSTRAINT refresh_tokens_pkey PRIMARY KEY (id)\n);\nCREATE INDEX IF NOT EXISTS refresh_tokens_instance_id_idx ON auth.refresh_tokens USING btree (instance_id);\nCREATE INDEX IF NOT EXISTS refresh_tokens_instance_id_user_id_idx ON auth.refresh_tokens USING btree (instance_id, user_id);\nCREATE INDEX IF NOT EXISTS refresh_tokens_token_idx ON auth.refresh_tokens USING btree (token);\ncomment on table auth.refresh_tokens is 'Auth: Store of tokens used to refresh JWT tokens once they expire.';\n\n-- auth.instances definition\n\nCREATE TABLE IF NOT EXISTS auth.instances (\n\tid uuid NOT NULL,\n\tuuid uuid NULL,\n\traw_base_config text NULL,\n\tcreated_at timestamptz NULL,\n\tupdated_at timestamptz NULL,\n\tCONSTRAINT instances_pkey PRIMARY KEY (id)\n);\ncomment on table auth.instances is 'Auth: Manages users across multiple sites.';\n\n-- auth.audit_log_entries definition\n\nCREATE TABLE IF NOT EXISTS auth.audit_log_entries (\n\tinstance_id uuid NULL,\n\tid uuid NOT NULL,\n\tpayload json NULL,\n\tcreated_at timestamptz NULL,\n\tCONSTRAINT audit_log_entries_pkey PRIMARY KEY (id)\n);\nCREATE INDEX IF NOT EXISTS audit_logs_instance_id_idx ON auth.audit_log_entries USING btree (instance_id);\ncomment on table auth.audit_log_entries is 'Auth: Audit trail for user actions.';\n\n-- auth.schema_migrations definition\n\nCREATE TABLE IF NOT EXISTS auth.schema_migrations (\n\t\"version\" varchar(255) NOT NULL,\n\tCONSTRAINT schema_migrations_pkey PRIMARY KEY (\"version\")\n);\ncomment on table auth.schema_migrations is 'Auth: Manages updates to the auth system.';\n\t\t\n-- Gets the User ID from the request cookie\ncreate or replace function auth.uid() returns uuid as $$\n  select nullif(current_setting('request.jwt.claim.sub', true), '')::uuid;\n$$ language sql stable;\n\n-- Gets the User ID from the request cookie\ncreate or replace function auth.role() returns text as $$\n  select nullif(current_setting('request.jwt.claim.role', true), '')::text;\n$$ language sql stable;\n: ERROR: must be owner of function uid (SQLSTATE 42501)","time":"2024-09-17T12:03:26Z"}
2024-09-17T12:03:39.241422906Z {"level":"info","msg":"Go runtime metrics collection started","time":"2024-09-17T12:03:39Z"}
2024-09-17T12:03:39.273471079Z {"args":[0.027844281],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-09-17T12:03:39Z"}
2024-09-17T12:03:39.273612040Z {"level":"fatal","msg":"running db migrations: error executing /usr/local/etc/auth/migrations/00_init_auth_schema.up.sql, sql: -- auth.users definition\n\nCREATE TABLE IF NOT EXISTS auth.users (\n\tinstance_id uuid NULL,\n\tid uuid NOT NULL UNIQUE,\n\taud varchar(255) NULL,\n\t\"role\" varchar(255) NULL,\n\temail varchar(255) NULL UNIQUE,\n\tencrypted_password varchar(255) NULL,\n\tconfirmed_at timestamptz NULL,\n\tinvited_at timestamptz NULL,\n\tconfirmation_token varchar(255) NULL,\n\tconfirmation_sent_at timestamptz NULL,\n\trecovery_token varchar(255) NULL,\n\trecovery_sent_at timestamptz NULL,\n\temail_change_token varchar(255) NULL,\n\temail_change varchar(255) NULL,\n\temail_change_sent_at timestamptz NULL,\n\tlast_sign_in_at timestamptz NULL,\n\traw_app_meta_data jsonb NULL,\n\traw_user_meta_data jsonb NULL,\n\tis_super_admin bool NULL,\n\tcreated_at timestamptz NULL,\n\tupdated_at timestamptz NULL,\n\tCONSTRAINT users_pkey PRIMARY KEY (id)\n);\nCREATE INDEX IF NOT EXISTS users_instance_id_email_idx ON auth.users USING btree (instance_id, email);\nCREATE INDEX IF NOT EXISTS users_instance_id_idx ON auth.users USING btree (instance_id);\ncomment on table auth.users is 'Auth: Stores user login data within a secure schema.';\n\n-- auth.refresh_tokens definition\n\nCREATE TABLE IF NOT EXISTS auth.refresh_tokens (\n\tinstance_id uuid NULL,\n\tid bigserial NOT NULL,\n\t\"token\" varchar(255) NULL,\n\tuser_id varchar(255) NULL,\n\trevoked bool NULL,\n\tcreated_at timestamptz NULL,\n\tupdated_at timestamptz NULL,\n\tCONSTRAINT refresh_tokens_pkey PRIMARY KEY (id)\n);\nCREATE INDEX IF NOT EXISTS refresh_tokens_instance_id_idx ON auth.refresh_tokens USING btree (instance_id);\nCREATE INDEX IF NOT EXISTS refresh_tokens_instance_id_user_id_idx ON auth.refresh_tokens USING btree (instance_id, user_id);\nCREATE INDEX IF NOT EXISTS refresh_tokens_token_idx ON auth.refresh_tokens USING btree (token);\ncomment on table auth.refresh_tokens is 'Auth: Store of tokens used to refresh JWT tokens once they expire.';\n\n-- auth.instances definition\n\nCREATE TABLE IF NOT EXISTS auth.instances (\n\tid uuid NOT NULL,\n\tuuid uuid NULL,\n\traw_base_config text NULL,\n\tcreated_at timestamptz NULL,\n\tupdated_at timestamptz NULL,\n\tCONSTRAINT instances_pkey PRIMARY KEY (id)\n);\ncomment on table auth.instances is 'Auth: Manages users across multiple sites.';\n\n-- auth.audit_log_entries definition\n\nCREATE TABLE IF NOT EXISTS auth.audit_log_entries (\n\tinstance_id uuid NULL,\n\tid uuid NOT NULL,\n\tpayload json NULL,\n\tcreated_at timestamptz NULL,\n\tCONSTRAINT audit_log_entries_pkey PRIMARY KEY (id)\n);\nCREATE INDEX IF NOT EXISTS audit_logs_instance_id_idx ON auth.audit_log_entries USING btree (instance_id);\ncomment on table auth.audit_log_entries is 'Auth: Audit trail for user actions.';\n\n-- auth.schema_migrations definition\n\nCREATE TABLE IF NOT EXISTS auth.schema_migrations (\n\t\"version\" varchar(255) NOT NULL,\n\tCONSTRAINT schema_migrations_pkey PRIMARY KEY (\"version\")\n);\ncomment on table auth.schema_migrations is 'Auth: Manages updates to the auth system.';\n\t\t\n-- Gets the User ID from the request cookie\ncreate or replace function auth.uid() returns uuid as $$\n  select nullif(current_setting('request.jwt.claim.sub', true), '')::uuid;\n$$ language sql stable;\n\n-- Gets the User ID from the request cookie\ncreate or replace function auth.role() returns text as $$\n  select nullif(current_setting('request.jwt.claim.role', true), '')::text;\n$$ language sql stable;\n: ERROR: must be owner of function uid (SQLSTATE 42501)","time":"2024-09-17T12:03:39Z"}

Problema in Realtime Dev

2024-09-17T12:04:15.994982033Z 
2024-09-17T12:04:15.994984833Z     config :realtime, Realtime.Repo,
2024-09-17T12:04:15.994987313Z       migration_source: "some_other_table_for_schema_migrations",
2024-09-17T12:04:15.994989913Z       migration_repo: AnotherRepoForSchemaMigrations
2024-09-17T12:04:15.994992393Z 
2024-09-17T12:04:15.994994633Z The full error report is shown below.
2024-09-17T12:04:15.994997033Z 
2024-09-17T12:04:16.006556067Z ** (Postgrex.Error) ERROR 3F000 (invalid_schema_name) no schema has been selected to create in
2024-09-17T12:04:16.006583867Z     (ecto_sql 3.11.1) lib/ecto/adapters/sql.ex:1054: Ecto.Adapters.SQL.raise_sql_call_error/1
2024-09-17T12:04:16.006587787Z     (elixir 1.16.2) lib/enum.ex:1700: Enum."-map/2-lists^map/1-1-"/2
2024-09-17T12:04:16.006590747Z     (ecto_sql 3.11.1) lib/ecto/adapters/sql.ex:1161: Ecto.Adapters.SQL.execute_ddl/4
2024-09-17T12:04:16.006593507Z     (ecto_sql 3.11.1) lib/ecto/migrator.ex:755: Ecto.Migrator.verbose_schema_migration/3
2024-09-17T12:04:16.006596987Z     (ecto_sql 3.11.1) lib/ecto/migrator.ex:563: Ecto.Migrator.lock_for_migrations/4
2024-09-17T12:04:16.006599667Z     (ecto_sql 3.11.1) lib/ecto/migrator.ex:432: Ecto.Migrator.run/4
2024-09-17T12:04:16.006602147Z     (ecto_sql 3.11.1) lib/ecto/migrator.ex:170: Ecto.Migrator.with_repo/3
2024-09-17T12:04:16.006604747Z     nofile:1: (file)
2024-09-17T12:05:07.525551182Z + ulimit -n
2024-09-17T12:05:07.525585742Z 1048576
2024-09-17T12:05:07.525689422Z + '[' '!' -z 10000 ']'
2024-09-17T12:05:07.525752302Z + echo 'Setting RLIMIT_NOFILE to 10000'
2024-09-17T12:05:07.525815303Z + ulimit -Sn 10000
2024-09-17T12:05:07.525824583Z Setting RLIMIT_NOFILE to 10000
2024-09-17T12:05:07.525825143Z + export ERL_CRASH_DUMP=/tmp/erl_crash.dump
2024-09-17T12:05:07.525832223Z + ERL_CRASH_DUMP=/tmp/erl_crash.dump
2024-09-17T12:05:07.526113863Z Running migrations
2024-09-17T12:05:07.526144583Z + '[' false = true ']'
2024-09-17T12:05:07.526150503Z + echo 'Running migrations'
2024-09-17T12:05:07.526153343Z + sudo -E -u nobody /app/bin/migrate
2024-09-17T12:05:08.530151502Z 12:05:08.528 [error] Could not create schema migrations table. This error usually happens due to the following:
2024-09-17T12:05:08.530226223Z 
2024-09-17T12:05:08.530231663Z   * The database does not exist
2024-09-17T12:05:08.530234903Z   * The "schema_migrations" table, which Ecto uses for managing
2024-09-17T12:05:08.530237703Z     migrations, was defined by another library
2024-09-17T12:05:08.530240263Z   * There is a deadlock while migrating (such as using concurrent
2024-09-17T12:05:08.530242783Z     indexes with a migration_lock)
2024-09-17T12:05:08.530245223Z 
2024-09-17T12:05:08.530247503Z To fix the first issue, run "mix ecto.create" for the desired MIX_ENV.
2024-09-17T12:05:08.530250223Z 
2024-09-17T12:05:08.530252503Z To address the second, you can run "mix ecto.drop" followed by
2024-09-17T12:05:08.530255783Z "mix ecto.create", both for the desired MIX_ENV. Alternatively you may
2024-09-17T12:05:08.530258383Z configure Ecto to use another table and/or repository for managing
2024-09-17T12:05:08.530260943Z migrations:
2024-09-17T12:05:08.530263263Z 
2024-09-17T12:05:08.530265583Z     config :realtime, Realtime.Repo,
2024-09-17T12:05:08.530267983Z       migration_source: "some_other_table_for_schema_migrations",
2024-09-17T12:05:08.530270623Z       migration_repo: AnotherRepoForSchemaMigrations
2024-09-17T12:05:08.530273063Z 
2024-09-17T12:05:08.530275343Z The full error report is shown below.
2024-09-17T12:05:08.530492383Z 
2024-09-17T12:05:08.543006460Z ** (Postgrex.Error) ERROR 3F000 (invalid_schema_name) no schema has been selected to create in
2024-09-17T12:05:08.543064780Z     (ecto_sql 3.11.1) lib/ecto/adapters/sql.ex:1054: Ecto.Adapters.SQL.raise_sql_call_error/1
2024-09-17T12:05:08.543068900Z     (elixir 1.16.2) lib/enum.ex:1700: Enum."-map/2-lists^map/1-1-"/2
2024-09-17T12:05:08.543071820Z     (ecto_sql 3.11.1) lib/ecto/adapters/sql.ex:1161: Ecto.Adapters.SQL.execute_ddl/4
2024-09-17T12:05:08.543074620Z     (ecto_sql 3.11.1) lib/ecto/migrator.ex:755: Ecto.Migrator.verbose_schema_migration/3
2024-09-17T12:05:08.543077260Z     (ecto_sql 3.11.1) lib/ecto/migrator.ex:563: Ecto.Migrator.lock_for_migrations/4
2024-09-17T12:05:08.543079820Z     (ecto_sql 3.11.1) lib/ecto/migrator.ex:432: Ecto.Migrator.run/4
2024-09-17T12:05:08.543082420Z     (ecto_sql 3.11.1) lib/ecto/migrator.ex:170: Ecto.Migrator.with_repo/3
2024-09-17T12:05:08.543085100Z     nofile:1: (file)
2024-09-17T12:06:08.862870317Z 1048576
2024-09-17T12:06:08.862884397Z Setting RLIMIT_NOFILE to 10000
2024-09-17T12:06:08.862887397Z Running migrations
2024-09-17T12:06:08.862900277Z + ulimit -n
2024-09-17T12:06:08.862903637Z + '[' '!' -z 10000 ']'
2024-09-17T12:06:08.862906157Z + echo 'Setting RLIMIT_NOFILE to 10000'
2024-09-17T12:06:08.862908637Z + ulimit -Sn 10000
2024-09-17T12:06:08.862928317Z + export ERL_CRASH_DUMP=/tmp/erl_crash.dump
2024-09-17T12:06:08.862932157Z + ERL_CRASH_DUMP=/tmp/erl_crash.dump
2024-09-17T12:06:08.862934677Z + '[' false = true ']'
2024-09-17T12:06:08.862937037Z + echo 'Running migrations'
2024-09-17T12:06:08.862940317Z + sudo -E -u nobody /app/bin/migrate
2024-09-17T12:06:09.681071775Z 12:06:09.679 [error] Could not create schema migrations table. This error usually happens due to the following:
2024-09-17T12:06:09.681118455Z 
2024-09-17T12:06:09.681126615Z   * The database does not exist
2024-09-17T12:06:09.681129855Z   * The "schema_migrations" table, which Ecto uses for managing
2024-09-17T12:06:09.681132775Z     migrations, was defined by another library
2024-09-17T12:06:09.681135335Z   * There is a deadlock while migrating (such as using concurrent
2024-09-17T12:06:09.681137975Z     indexes with a migration_lock)
2024-09-17T12:06:09.681140455Z 
2024-09-17T12:06:09.681142815Z To fix the first issue, run "mix ecto.create" for the desired MIX_ENV.
2024-09-17T12:06:09.681145415Z 
2024-09-17T12:06:09.681147775Z To address the second, you can run "mix ecto.drop" followed by
2024-09-17T12:06:09.681150575Z "mix ecto.create", both for the desired MIX_ENV. Alternatively you may
2024-09-17T12:06:09.681153935Z configure Ecto to use another table and/or repository for managing
2024-09-17T12:06:09.681156535Z migrations:
2024-09-17T12:06:09.681159095Z 
2024-09-17T12:06:09.681162175Z     config :realtime, Realtime.Repo,
2024-09-17T12:06:09.681164935Z       migration_source: "some_other_table_for_schema_migrations",
2024-09-17T12:06:09.681167495Z       migration_repo: AnotherRepoForSchemaMigrations
2024-09-17T12:06:09.681169975Z 
2024-09-17T12:06:09.681172295Z The full error report is shown below.
2024-09-17T12:06:09.681174735Z 
2024-09-17T12:06:09.699176748Z ** (Postgrex.Error) ERROR 3F000 (invalid_schema_name) no schema has been selected to create in
2024-09-17T12:06:09.699228548Z     (ecto_sql 3.11.1) lib/ecto/adapters/sql.ex:1054: Ecto.Adapters.SQL.raise_sql_call_error/1
2024-09-17T12:06:09.699233268Z     (elixir 1.16.2) lib/enum.ex:1700: Enum."-map/2-lists^map/1-1-"/2
2024-09-17T12:06:09.699236508Z     (ecto_sql 3.11.1) lib/ecto/adapters/sql.ex:1161: Ecto.Adapters.SQL.execute_ddl/4
2024-09-17T12:06:09.699239188Z     (ecto_sql 3.11.1) lib/ecto/migrator.ex:755: Ecto.Migrator.verbose_schema_migration/3
2024-09-17T12:06:09.699241908Z     (ecto_sql 3.11.1) lib/ecto/migrator.ex:563: Ecto.Migrator.lock_for_migrations/4
2024-09-17T12:06:09.699244508Z     (ecto_sql 3.11.1) lib/ecto/migrator.ex:432: Ecto.Migrator.run/4
2024-09-17T12:06:09.699247028Z     (ecto_sql 3.11.1) lib/ecto/migrator.ex:170: Ecto.Migrator.with_repo/3
2024-09-17T12:06:09.699249588Z     nofile:1: (file)

@davyssonlucas
Copy link
Author

image

@beejaz
Copy link

beejaz commented Sep 24, 2024

Im running non-root user mode with Coolify and I have same issue deploying Supabase supabase/studio:20240729-ce42139 template. It doesnt work in non-root mode.

From Discord user OzInClouds https://discord.com/channels/459365938081431553/1272785055911247952/1275797493879275572

Guys I found the solution:
if running non-root 755 your service folder in /data/coolify
do not bind volume to postgres, use named volumes
increase your timeout to storage healthcheck to some 30s
replace healthcheck cmd of analytics as in digitaloceans sample compose
no paswd to logflare, it seems to assign a key internally

@peaklabs-dev
Copy link
Member

A fix for this issue has been implemented and will be available in an upcoming release. Thank you for your patience.

@peaklabs-dev peaklabs-dev added this to the v4.0.0 Stable Release milestone Oct 31, 2024
@peaklabs-dev peaklabs-dev added the 🐛 Bug Reported issues that need to be reproduced by the team. label Oct 31, 2024
@github-actions github-actions bot removed the 🐛 Bug Reported issues that need to be reproduced by the team. label Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants