coollabsio / coolify

An open-source & self-hostable Heroku / Netlify / Vercel alternative.
https://coolify.io
Apache License 2.0
32.92k stars 1.75k forks source link

[Bug]: #2763

Open joshpocock opened 3 months ago

joshpocock commented 3 months ago

Description

I had a fresh install of Ubuntu 22.04. Installed Coolify, went to install Supabase and get this error:

FATAL: password authentication failed for user "supabase_admin" DETAIL: Role "supabase_admin" does not exist.

I've double checked everything, watched youtube videos, looked at the docs, asked Claude and other models, and even reset my server to a fresh install.

Minimal Reproduction (if possible, example repository)

I had a fresh install of Ubuntu 22.04. Installed Coolify. Just tried to install Supabase one click and have this same recurring issue.

Exception or Error

When delopying SB - main log: Container supabase-analytics-qk888gs Error Container supabase-analytics-qk888gs Error Container supabase-analytics-qk888gs Error Container supabase-analytics-qk888gs Error Container supabase-analytics-qk888gs Error Container supabase-analytics-qk888gs Error Container supabase-analytics-qk888gs Error dependency failed to start: container supabase-analytics-qk888gs is unhealthy

Supabase-Analytics Specific log: 2024-07-07T11:18:43.458331179Z 11:18:43.458 [error] Postgrex.Protocol (#PID<0.4720.0>) failed to connect: (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-07-07T11:18:43.493821481Z 2024-07-07T11:18:43.493864610Z 11:18:43.493 [notice] Application logflare exited: Logflare.Application.start(:normal, []) returned an error: shutdown: failed to start child: Cainophile.Adapters.Postgres 2024-07-07T11:18:43.493869549Z (EXIT) :invalid_password 2024-07-07T11:18:45.058084280Z {"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,[]]}}}"} 2024-07-07T11:18:45.058154580Z 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,[]]}}}) 2024-07-07T11:18:45.061481830Z 2024-07-07T11:18:45.258491059Z Crash dump is being written to: erl_crash.dump...done 2024-07-07T11:18:45.681028354Z LOGFLARE_NODE_HOST is: 127.0.0.1 2024-07-07T11:18:46.381427014Z 2024-07-07T11:18:46.381501832Z 11:18:46.377 [info] Starting migration 2024-07-07T11:18:46.679986848Z 2024-07-07T11:18:46.680028485Z 11:18:46.679 [error] Postgrex.Protocol (#PID<0.163.0>) failed to connect: (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-07-07T11:18:46.680033614Z 2024-07-07T11:18:46.680036770Z 11:18:46.679 [error] Postgrex.Protocol (#PID<0.162.0>) failed to connect: (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-07-07T11:18:48.587470936Z 2024-07-07T11:18:48.587491253Z 11:18:48.587 [error] Postgrex.Protocol (#PID<0.162.0>) failed to connect: (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-07-07T11:18:49.192635859Z 2024-07-07T11:18:49.192661315Z 11:18:49.192 [error] Postgrex.Protocol (#PID<0.163.0>) failed to connect: (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-07-07T11:18:53.435552380Z 2024-07-07T11:18:53.435603725Z 11:18:53.435 [error] Postgrex.Protocol (#PID<0.162.0>) failed to connect: (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-07-07T11:18:56.683746049Z 2024-07-07T11:18:56.683822771Z 11:18:56.683 [error] Postgrex.Protocol (#PID<0.163.0>) failed to connect: (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-07-07T11:18:57.591545661Z 2024-07-07T11:18:57.591599671Z 11:18:57.591 [error] Could not create schema migrations table. This error usually happens due to the following: 2024-07-07T11:18:57.591604520Z 2024-07-07T11:18:57.591610822Z The database does not exist 2024-07-07T11:18:57.591614488Z The "schema_migrations" table, which Ecto uses for managing 2024-07-07T11:18:57.591618095Z migrations, was defined by another library 2024-07-07T11:18:57.591621902Z * There is a deadlock while migrating (such as using concurrent 2024-07-07T11:18:57.591625509Z indexes with a migration_lock) 2024-07-07T11:18:57.591629066Z 2024-07-07T11:18:57.591632372Z To fix the first issue, run "mix ecto.create" for the desired MIX_ENV. 2024-07-07T11:18:57.591636198Z 2024-07-07T11:18:57.591639434Z To address the second, you can run "mix ecto.drop" followed by 2024-07-07T11:18:57.591660884Z "mix ecto.create", both for the desired MIX_ENV. Alternatively you may 2024-07-07T11:18:57.591664722Z configure Ecto to use another table and/or repository for managing 2024-07-07T11:18:57.591668499Z migrations: 2024-07-07T11:18:57.591671765Z 2024-07-07T11:18:57.591675140Z config :logflare, Logflare.Repo, 2024-07-07T11:18:57.591678557Z migration_source: "some_other_table_for_schema_migrations", 2024-07-07T11:18:57.591682273Z migration_repo: AnotherRepoForSchemaMigrations 2024-07-07T11:18:57.591685720Z 2024-07-07T11:18:57.591689056Z The full error report is shown below. 2024-07-07T11:18:57.591692412Z 2024-07-07T11:18:57.595975582Z (DBConnection.ConnectionError) connection not available and request was dropped from queue after 10964ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by: 2024-07-07T11:18:57.596017830Z 2024-07-07T11:18:57.596021577Z 1. Ensuring your database is available and that you can connect to it 2024-07-07T11:18:57.596024292Z 2. Tracking down slow queries and making sure they are running fast enough 2024-07-07T11:18:57.596026987Z 3. Increasing the pool_size (although this increases resource consumption) 2024-07-07T11:18:57.596029693Z 4. Allowing requests to wait longer by increasing :queue_target and :queue_interval 2024-07-07T11:18:57.596032438Z 2024-07-07T11:18:57.596034732Z See DBConnection.start_link/2 for more information 2024-07-07T11:18:57.596037798Z 2024-07-07T11:18:57.596040282Z (ecto_sql 3.10.1) lib/ecto/adapters/sql.ex:913: Ecto.Adapters.SQL.raise_sql_call_error/1 2024-07-07T11:18:57.596043088Z (elixir 1.14.4) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2 2024-07-07T11:18:57.596045622Z (ecto_sql 3.10.1) lib/ecto/adapters/sql.ex:1005: Ecto.Adapters.SQL.execute_ddl/4 2024-07-07T11:18:57.596048317Z (ecto_sql 3.10.1) lib/ecto/migrator.ex:738: Ecto.Migrator.verbose_schema_migration/3 2024-07-07T11:18:57.596050862Z (ecto_sql 3.10.1) lib/ecto/migrator.ex:552: Ecto.Migrator.lock_for_migrations/4 2024-07-07T11:18:57.596053457Z (ecto_sql 3.10.1) lib/ecto/migrator.ex:428: Ecto.Migrator.run/4 2024-07-07T11:18:57.596056181Z (ecto_sql 3.10.1) lib/ecto/migrator.ex:170: Ecto.Migrator.with_repo/3 2024-07-07T11:18:57.596059898Z nofile:1: (file) 2024-07-07T11:19:01.091275480Z 2024-07-07T11:19:01.091348916Z 11:19:01.090 [info] Elixir.Logflare.SigtermHandler is being initialized... 2024-07-07T11:19:01.146998220Z 2024-07-07T11:19:01.147055235Z 11:19:01.146 [error] Postgrex.Protocol (#PID<0.4727.0>) failed to connect: (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-07-07T11:19:01.147130824Z 2024-07-07T11:19:01.147178503Z 11:19:01.146 [error] Postgrex.Protocol (#PID<0.4729.0>) failed to connect: (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-07-07T11:19:01.147187279Z 2024-07-07T11:19:01.147191557Z 11:19:01.146 [error] Postgrex.Protocol (#PID<0.4719.0>) failed to connect: (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-07-07T11:19:01.147439886Z 2024-07-07T11:19:01.147449173Z 11:19:01.146 [error] Postgrex.Protocol (#PID<0.4720.0>) failed to connect: (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-07-07T11:19:01.147461887Z 2024-07-07T11:19:01.147464472Z 11:19:01.146 [error] Postgrex.Protocol (#PID<0.4730.0>) failed to connect: (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-07-07T11:19:01.147467528Z 2024-07-07T11:19:01.147469872Z 11:19:01.146 [error] Postgrex.Protocol (#PID<0.4726.0>) failed to connect: (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-07-07T11:19:01.147472767Z 2024-07-07T11:19:01.147475061Z 11:19:01.146 [error] Postgrex.Protocol (#PID<0.4728.0>) failed to connect: (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-07-07T11:19:01.147477786Z 2024-07-07T11:19:01.147480060Z 11:19:01.147 [error] Postgrex.Protocol (#PID<0.4724.0>) failed to connect: (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-07-07T11:19:01.147482845Z 2024-07-07T11:19:01.147485130Z 11:19:01.147 [error] Postgrex.Protocol (#PID<0.4725.0>) failed to connect: (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-07-07T11:19:01.147487975Z 2024-07-07T11:19:01.147490359Z 11:19:01.147 [error] Postgrex.Protocol (#PID<0.4723.0>) failed to connect: (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-07-07T11:19:01.171019113Z 2024-07-07T11:19:01.171060569Z 11:19:01.170 [notice] Application logflare exited: Logflare.Application.start(:normal, []) returned an error: shutdown: failed to start child: Cainophile.Adapters.Postgres 2024-07-07T11:19:01.171065948Z (EXIT) :invalid_password 2024-07-07T11:19:02.755914561Z {"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,[]]}}}"} 2024-07-07T11:19:02.755977877Z 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,[]]}}}) 2024-07-07T11:19:02.759856641Z 2024-07-07T11:19:02.966982706Z Crash dump is being written to: erl_crash.dump...done 2024-07-07T11:19:03.398895999Z LOGFLARE_NODE_HOST is: 127.0.0.1 2024-07-07T11:19:03.948240654Z 2024-07-07T11:19:03.948273334Z 11:19:03.944 [info] Starting migration 2024-07-07T11:19:04.269106104Z 2024-07-07T11:19:04.269169792Z 11:19:04.268 [error] Postgrex.Protocol (#PID<0.162.0>) failed to connect: (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-07-07T11:19:04.269175112Z 2024-07-07T11:19:04.269178238Z 11:19:04.268 [error] Postgrex.Protocol (#PID<0.163.0>) failed to connect: (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-07-07T11:19:05.514914015Z 2024-07-07T11:19:05.514945222Z 11:19:05.514 [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.306

boyhax commented 3 months ago

same problem .it is very difficult to make production work with supabase and coolify make it easier but still the problems don stop showing

ziegenhagel commented 3 months ago

same here

Mortalife commented 3 months ago

This has been resolved as of version beta-309, you'll need to remove the service and recreate it.

adityadhawan22 commented 3 months ago

Same problem, I am on version v4.0.0-beta.311

jaymascarenas commented 3 months ago

I too have the same issue and I'm on v4.0.0-beta.315. I see that the ENV variable for POSTGRES_HOST has been updated to POSTGRES_HOSTNAME = "supabase-db", but the compose yml for environment still has it set to POSTGRES_HOST (- POSTGRES_HOST=/var/run/postgresql) instead of POSTGRES_HOSTNAME. I update it to POSTGRES_HOSTNAME and drop the data docker volume and re-deploy but still get the sam errors in the logs for supabase_analytics:

2024-07-18T17:09:08.404878608Z 17:09:08.400 [info] Starting migration 2024-07-18T17:09:08.895571073Z 2024-07-18T17:09:08.895607682Z 17:09:08.895 [error] Postgrex.Protocol (#PID<0.163.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-07-18T17:09:08.895614152Z 2024-07-18T17:09:08.895618068Z 17:09:08.895 [error] Postgrex.Protocol (#PID<0.162.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin"

Any other suggestions for a fix? Thanks!

alexfares commented 2 months ago

Same problem. v4.0.0-beta.318

thaker0503 commented 2 months ago

Has anyone found any solution, yet ? I am facing the same issue still cannot find any solution.

Legendary256 commented 3 weeks ago

go to supabase/docker directory and pass this command it will delete ALL your db data

rm -df /volumes/db/data

Then try again docker compose up -d. It worked for me. The reason was that if you first run docker compose, it creates volume on your hard drive with posgresdb and it saves the default username and password therefore when you change it later, it will not work out of the box. You can as well go into a container with postgress and manually change the password of the user.