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]: Supabase initialization error - due to unfinished supabase-db config, supabase-analytics and related services can't start #4665

Open
mkpanq opened this issue Dec 25, 2024 · 9 comments
Labels
🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization.

Comments

@mkpanq
Copy link

mkpanq commented Dec 25, 2024

Error Message and Logs

I'm adding fresh, out of the box Supabase service using Coolify menu. After initial creation, I'm not changing anything and just click "Deploy":
Everything is going OK, until supabase-db service creation - there is an error during service initialization - service started, but not every init script was properly run.

supabase-db logs:

2024-12-25T12:02:26.412789465Z The files belonging to this database system will be owned by user "postgres".
2024-12-25T12:02:26.412856906Z This user must also own the server process.
2024-12-25T12:02:26.412863626Z 
2024-12-25T12:02:26.413186191Z The database cluster will be initialized with this locale configuration:
2024-12-25T12:02:26.413217272Z   provider:    libc
2024-12-25T12:02:26.413223992Z   LC_COLLATE:  C.UTF-8
2024-12-25T12:02:26.413228712Z   LC_CTYPE:    C.UTF-8
2024-12-25T12:02:26.413232992Z   LC_MESSAGES: en_US.UTF-8
2024-12-25T12:02:26.413237232Z   LC_MONETARY: en_US.UTF-8
2024-12-25T12:02:26.413241392Z   LC_NUMERIC:  en_US.UTF-8
2024-12-25T12:02:26.413245912Z   LC_TIME:     en_US.UTF-8
2024-12-25T12:02:26.413250632Z The default database encoding has accordingly been set to "UTF8".
2024-12-25T12:02:26.413255272Z The default text search configuration will be set to "english".
2024-12-25T12:02:26.413259832Z 
2024-12-25T12:02:26.413263672Z Data page checksums are disabled.
2024-12-25T12:02:26.413267953Z 
2024-12-25T12:02:26.413271873Z fixing permissions on existing directory /var/lib/postgresql/data ... ok
2024-12-25T12:02:26.413828441Z creating subdirectories ... ok
2024-12-25T12:02:26.413985443Z selecting dynamic shared memory implementation ... posix
2024-12-25T12:02:26.440818686Z selecting default max_connections ... 100
2024-12-25T12:02:26.466407750Z selecting default shared_buffers ... 128MB
2024-12-25T12:02:26.483149081Z selecting default time zone ... Etc/UTC
2024-12-25T12:02:26.484556903Z creating configuration files ... ok
2024-12-25T12:02:26.632789407Z running bootstrap script ... ok
2024-12-25T12:02:27.069914968Z performing post-bootstrap initialization ... ok
2024-12-25T12:02:27.198416497Z syncing data to disk ... ok
2024-12-25T12:02:27.198462098Z 
2024-12-25T12:02:27.198468538Z 
2024-12-25T12:02:27.198473058Z Success. You can now start the database server using:
2024-12-25T12:02:27.198477698Z 
2024-12-25T12:02:27.198481538Z     pg_ctl -D /var/lib/postgresql/data -l logfile start
2024-12-25T12:02:27.198485818Z 
2024-12-25T12:02:27.199523554Z initdb: warning: enabling "trust" authentication for local connections
2024-12-25T12:02:27.199658356Z initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.
2024-12-25T12:02:27.439698918Z waiting for server to start.... done
2024-12-25T12:02:27.440083324Z server started
2024-12-25T12:02:27.499529136Z 
2024-12-25T12:02:27.499600938Z /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/init-scripts
2024-12-25T12:02:27.499622258Z 
2024-12-25T12:02:27.499625138Z /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/migrate.sh
2024-12-25T12:02:27.502567142Z /docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/init-scripts/00-schema.sql
2024-12-25T12:02:27.548857037Z CREATE ROLE
2024-12-25T12:02:27.551459396Z REVOKE
2024-12-25T12:02:27.553081900Z CREATE SCHEMA
2024-12-25T12:02:27.555328534Z CREATE FUNCTION
2024-12-25T12:02:27.556474951Z REVOKE
2024-12-25T12:02:27.558644824Z GRANT
2024-12-25T12:02:27.558675344Z /docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/init-scripts/00000000000000-initial-schema.sql
2024-12-25T12:02:27.603127331Z CREATE PUBLICATION
2024-12-25T12:02:27.603453576Z CREATE ROLE
2024-12-25T12:02:27.604182947Z ALTER ROLE
2024-12-25T12:02:27.605173802Z CREATE ROLE
2024-12-25T12:02:27.606012335Z CREATE ROLE
2024-12-25T12:02:27.607265914Z GRANT ROLE
2024-12-25T12:02:27.608218768Z CREATE SCHEMA
2024-12-25T12:02:27.614003575Z CREATE EXTENSION
2024-12-25T12:02:27.623886083Z CREATE EXTENSION
2024-12-25T12:02:27.629093881Z CREATE EXTENSION
2024-12-25T12:02:27.629927294Z CREATE ROLE
2024-12-25T12:02:27.630631104Z CREATE ROLE
2024-12-25T12:02:27.631467157Z CREATE ROLE
2024-12-25T12:02:27.632124247Z CREATE ROLE
2024-12-25T12:02:27.632670855Z GRANT ROLE
2024-12-25T12:02:27.633636149Z GRANT ROLE
2024-12-25T12:02:27.634188998Z GRANT ROLE
2024-12-25T12:02:27.634840487Z GRANT ROLE
2024-12-25T12:02:27.635520138Z GRANT
2024-12-25T12:02:27.637334645Z ALTER DEFAULT PRIVILEGES
2024-12-25T12:02:27.638325260Z ALTER DEFAULT PRIVILEGES
2024-12-25T12:02:27.639391796Z ALTER DEFAULT PRIVILEGES
2024-12-25T12:02:27.640733736Z GRANT
2024-12-25T12:02:27.641477707Z ALTER ROLE
2024-12-25T12:02:27.642344480Z ALTER DEFAULT PRIVILEGES
2024-12-25T12:02:27.643278454Z ALTER DEFAULT PRIVILEGES
2024-12-25T12:02:27.644150787Z ALTER DEFAULT PRIVILEGES
2024-12-25T12:02:27.645204123Z ALTER ROLE
2024-12-25T12:02:27.646154017Z ALTER ROLE
2024-12-25T12:02:27.647316795Z /docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/init-scripts/00000000000001-auth-schema.sql
2024-12-25T12:02:27.692098347Z CREATE SCHEMA
2024-12-25T12:02:27.703449237Z CREATE TABLE
2024-12-25T12:02:27.707318215Z CREATE INDEX
2024-12-25T12:02:27.709341966Z CREATE INDEX
2024-12-25T12:02:27.710286500Z COMMENT
2024-12-25T12:02:27.716379711Z CREATE TABLE
2024-12-25T12:02:27.718864829Z CREATE INDEX
2024-12-25T12:02:27.724100787Z CREATE INDEX
2024-12-25T12:02:27.726867469Z CREATE INDEX
2024-12-25T12:02:27.727695441Z COMMENT
2024-12-25T12:02:27.733105122Z CREATE TABLE
2024-12-25T12:02:27.734183898Z COMMENT
2024-12-25T12:02:27.740095827Z CREATE TABLE
2024-12-25T12:02:27.742412942Z CREATE INDEX
2024-12-25T12:02:27.743163593Z COMMENT
2024-12-25T12:02:27.746119438Z CREATE TABLE
2024-12-25T12:02:27.746801008Z COMMENT
2024-12-25T12:02:27.748221469Z INSERT 0 7
2024-12-25T12:02:27.749369926Z CREATE FUNCTION
2024-12-25T12:02:27.750057377Z CREATE FUNCTION
2024-12-25T12:02:27.750834908Z CREATE FUNCTION
2024-12-25T12:02:27.751720202Z GRANT
2024-12-25T12:02:27.752434452Z CREATE ROLE
2024-12-25T12:02:27.753082582Z GRANT
2024-12-25T12:02:27.754018516Z GRANT
2024-12-25T12:02:27.754737207Z GRANT
2024-12-25T12:02:27.755698741Z ALTER ROLE
2024-12-25T12:02:27.757060922Z ALTER TABLE
2024-12-25T12:02:27.758509624Z ALTER TABLE
2024-12-25T12:02:27.759634040Z ALTER TABLE
2024-12-25T12:02:27.760399612Z ALTER TABLE
2024-12-25T12:02:27.761487388Z ALTER TABLE
2024-12-25T12:02:27.762517764Z /docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/init-scripts/00000000000002-storage-schema.sql
2024-12-25T12:02:27.810149239Z CREATE SCHEMA
2024-12-25T12:02:27.811694542Z GRANT
2024-12-25T12:02:27.812993481Z ALTER DEFAULT PRIVILEGES
2024-12-25T12:02:27.813768013Z ALTER DEFAULT PRIVILEGES
2024-12-25T12:02:27.814863469Z ALTER DEFAULT PRIVILEGES
2024-12-25T12:02:27.828817879Z CREATE TABLE
2024-12-25T12:02:27.828852239Z CREATE INDEX
2024-12-25T12:02:27.834974691Z CREATE TABLE
2024-12-25T12:02:27.838283981Z CREATE INDEX
2024-12-25T12:02:27.841196545Z CREATE INDEX
2024-12-25T12:02:27.842126599Z ALTER TABLE
2024-12-25T12:02:27.843831504Z CREATE FUNCTION
2024-12-25T12:02:27.844793279Z CREATE FUNCTION
2024-12-25T12:02:27.846688347Z CREATE FUNCTION
2024-12-25T12:02:27.848177329Z CREATE FUNCTION
2024-12-25T12:02:27.854196540Z CREATE TABLE
2024-12-25T12:02:27.855103193Z CREATE ROLE
2024-12-25T12:02:27.855794204Z GRANT
2024-12-25T12:02:27.857294226Z GRANT
2024-12-25T12:02:27.857540230Z GRANT
2024-12-25T12:02:27.858403283Z ALTER ROLE
2024-12-25T12:02:27.859838704Z ALTER TABLE
2024-12-25T12:02:27.861060403Z ALTER TABLE
2024-12-25T12:02:27.862191260Z ALTER TABLE
2024-12-25T12:02:27.863488519Z ALTER FUNCTION
2024-12-25T12:02:27.864130129Z ALTER FUNCTION
2024-12-25T12:02:27.865273666Z ALTER FUNCTION
2024-12-25T12:02:27.866321202Z ALTER FUNCTION
2024-12-25T12:02:27.867470419Z /docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/init-scripts/00000000000003-post-setup.sql
2024-12-25T12:02:27.911102274Z ALTER ROLE
2024-12-25T12:02:27.912251331Z ALTER ROLE
2024-12-25T12:02:27.914984572Z CREATE FUNCTION
2024-12-25T12:02:27.916288152Z CREATE EVENT TRIGGER
2024-12-25T12:02:27.917764454Z COMMENT
2024-12-25T12:02:27.919107114Z CREATE FUNCTION
2024-12-25T12:02:27.919832685Z COMMENT
2024-12-25T12:02:27.921570751Z DO
2024-12-25T12:02:27.922233681Z CREATE ROLE
2024-12-25T12:02:27.923128374Z GRANT
2024-12-25T12:02:27.923821145Z GRANT
2024-12-25T12:02:27.924460634Z GRANT
2024-12-25T12:02:27.925043003Z GRANT
2024-12-25T12:02:27.926053498Z GRANT
2024-12-25T12:02:27.926267702Z GRANT
2024-12-25T12:02:27.927296717Z GRANT
2024-12-25T12:02:27.927648802Z GRANT
2024-12-25T12:02:27.927864405Z GRANT
2024-12-25T12:02:27.929678113Z GRANT
2024-12-25T12:02:27.931097894Z GRANT
2024-12-25T12:02:27.934484865Z GRANT
2024-12-25T12:02:27.935897246Z /docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/init-scripts/98-webhooks.sql
2024-12-25T12:02:27.980054909Z psql: error: /docker-entrypoint-initdb.d/init-scripts/98-webhooks.sql: Permission denied
2024-12-25T12:02:28.418001562Z 
2024-12-25T12:02:28.418063283Z PostgreSQL Database directory appears to contain a database; Skipping initialization
2024-12-25T12:02:28.418075963Z 
2024-12-25T12:02:35.062604977Z 10.0.3.6 2024-12-25 12:02:35.061 UTC [49] supabase_admin@_supabase FATAL:  password authentication failed for user "supabase_admin"
2024-12-25T12:02:35.062665977Z 10.0.3.6 2024-12-25 12:02:35.061 UTC [49] supabase_admin@_supabase DETAIL:  User "supabase_admin" has no password assigned.
2024-12-25T12:02:35.062679818Z 	Connection matched pg_hba.conf line 88: "host  all  all  10.0.0.0/8  scram-sha-256"

Because of this, supabase-analytics can't properly start:
supabase-analytics logs:

2024-12-25T12:02:34.045060543Z LOGFLARE_NODE_HOST is: 127.0.0.1
2024-12-25T12:02:34.704624123Z 
2024-12-25T12:02:34.704693284Z 12:02:34.700 [info] Starting migration
2024-12-25T12:02:35.092995513Z 
2024-12-25T12:02:35.093046353Z 12:02:35.092 [error] Postgrex.Protocol (#PID<0.162.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin"
2024-12-25T12:02:35.093057954Z 
2024-12-25T12:02:35.093062274Z 12:02:35.092 [error] Postgrex.Protocol (#PID<0.163.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin"
2024-12-25T12:02:36.553599957Z 
2024-12-25T12:02:36.553627717Z 12:02:36.553 [error] Postgrex.Protocol (#PID<0.162.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin"
2024-12-25T12:02:37.743508578Z 
2024-12-25T12:02:37.743564539Z 12:02:37.742 [error] Postgrex.Protocol (#PID<0.163.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin"
2024-12-25T12:02:40.178259126Z 
2024-12-25T12:02:40.178313246Z 12:02:40.176 [error] Postgrex.Protocol (#PID<0.162.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin"
2024-12-25T12:02:43.407266197Z 
2024-12-25T12:02:43.407324918Z 12:02:43.406 [error] Postgrex.Protocol (#PID<0.163.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin"
2024-12-25T12:02:45.099835085Z 
2024-12-25T12:02:45.099884126Z 12:02:45.096 [error] Postgrex.Protocol (#PID<0.162.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin"
2024-12-25T12:02:45.968388363Z 
2024-12-25T12:02:45.968441644Z 12:02:45.967 [error] Could not create schema migrations table. This error usually happens due to the following:
2024-12-25T12:02:45.968448884Z 
2024-12-25T12:02:45.968452564Z   * The database does not exist
2024-12-25T12:02:45.968456004Z   * The "schema_migrations" table, which Ecto uses for managing
2024-12-25T12:02:45.968459644Z     migrations, was defined by another library
2024-12-25T12:02:45.968462844Z   * There is a deadlock while migrating (such as using concurrent
2024-12-25T12:02:45.968466124Z     indexes with a migration_lock)
2024-12-25T12:02:45.968469484Z 
2024-12-25T12:02:45.968472364Z To fix the first issue, run "mix ecto.create" for the desired MIX_ENV.
2024-12-25T12:02:45.968475725Z 
2024-12-25T12:02:45.968478445Z To address the second, you can run "mix ecto.drop" followed by
2024-12-25T12:02:45.968481805Z "mix ecto.create", both for the desired MIX_ENV. Alternatively you may
2024-12-25T12:02:45.968508445Z configure Ecto to use another table and/or repository for managing
2024-12-25T12:02:45.968514725Z migrations:
2024-12-25T12:02:45.968517645Z 
2024-12-25T12:02:45.968522605Z     config :logflare, Logflare.Repo,
2024-12-25T12:02:45.968525925Z       migration_source: "some_other_table_for_schema_migrations",
2024-12-25T12:02:45.968531725Z       migration_repo: AnotherRepoForSchemaMigrations
2024-12-25T12:02:45.968534845Z 
2024-12-25T12:02:45.968539925Z The full error report is shown below.
2024-12-25T12:02:45.968543486Z 
2024-12-25T12:02:45.982048128Z ** (DBConnection.ConnectionError) connection not available and request was dropped from queue after 10957ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by:
2024-12-25T12:02:45.982093769Z 
2024-12-25T12:02:45.982097929Z   1. Ensuring your database is available and that you can connect to it
2024-12-25T12:02:45.982100489Z   2. Tracking down slow queries and making sure they are running fast enough
2024-12-25T12:02:45.982104369Z   3. Increasing the pool_size (although this increases resource consumption)
2024-12-25T12:02:45.982106889Z   4. Allowing requests to wait longer by increasing :queue_target and :queue_interval
2024-12-25T12:02:45.982109249Z 
2024-12-25T12:02:45.982112729Z See DBConnection.start_link/2 for more information
2024-12-25T12:02:45.982115009Z 
2024-12-25T12:02:45.982116849Z     (ecto_sql 3.10.1) lib/ecto/adapters/sql.ex:913: Ecto.Adapters.SQL.raise_sql_call_error/1
2024-12-25T12:02:45.982119049Z     (elixir 1.14.4) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
2024-12-25T12:02:45.982122609Z     (ecto_sql 3.10.1) lib/ecto/adapters/sql.ex:1005: Ecto.Adapters.SQL.execute_ddl/4
2024-12-25T12:02:45.982124929Z     (ecto_sql 3.10.1) lib/ecto/migrator.ex:738: Ecto.Migrator.verbose_schema_migration/3
2024-12-25T12:02:45.982127129Z     (ecto_sql 3.10.1) lib/ecto/migrator.ex:552: Ecto.Migrator.lock_for_migrations/4
2024-12-25T12:02:45.982130690Z     (ecto_sql 3.10.1) lib/ecto/migrator.ex:428: Ecto.Migrator.run/4
2024-12-25T12:02:45.982133050Z     (ecto_sql 3.10.1) lib/ecto/migrator.ex:170: Ecto.Migrator.with_repo/3
2024-12-25T12:02:45.982135250Z     nofile:1: (file)
2024-12-25T12:02:50.068754398Z 

Eventually, supabase-db service is displayed as healthy (because service is running properly), but due to unfinished configuration, supabase-analytics (and the rest of the related services, marked depended in compose file) can't start:

Image

Steps to Reproduce

  1. Create fresh Supabase service (New Resource -> New -> Supabase)
  2. Deploy fresh service instance, without any changes to configuration or compose file
  3. Error is happening as described

Example Repository URL

No response

Coolify Version

v4.0.0-beta.379

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

Ubuntu 24.04.1 LTS (Noble Numbat)

Additional Information

No response

@mkpanq mkpanq added 🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization. labels Dec 25, 2024
@sarnakov
Copy link

I got the same error on my Coolify Cloud

@pongraczi
Copy link

Not a solution, but a report about a working config.

I'm in a test drive with self-hosted coolify on Hetzner (arm64, 2GB RAM), where the target VPS has 8GB RAM (arm64).
The supabase version shipped with coolify v4.0.0-beta.379 was working fine, without problem.
I tested the upgrading process of supabase self-host which went fine (after I fixed a small glitch with pgsodium, which related to supabase itself and nothing to do with coolify, ref.: supabase/supabase#30834 ).

I assume, as the coolify uses the official self-host docker file, it should work in the same way as the supabase self-host.

Anyway, I found this supabase/supabase#30232 , maybe it somehow relates to your issue (and could be related to coolify, too).
In this case the question is, why I got it running without any issue (install + upgrading some supabase images to the latest version).

@y4my4my4m
Copy link

I personally had to change this in docker-compose.yml

analytics:
   # ...
   environment:
      # DB_DATABASE: _supabase    # change this for ↓
      DB_DATABASE: ${POSTGRES_DB}

@mkpanq
Copy link
Author

mkpanq commented Dec 26, 2024

Unfortunately, the problem is still the same... I'll try to look into @pongraczi proposition later

@sudguru
Copy link

sudguru commented Dec 27, 2024

I tried as @y4my4my4m sugessted. I still get the same error:

 Container supabase-analytics-xokso8w4kk4c4kw8ccs804w8  Error
dependency failed to start: container supabase-analytics-xokso8w4kk4c4kw8ccs804w8 is unhealthy

@y4my4my4m , any suggestion?

@pongraczi
Copy link

@y4my4my4m , any suggestion?

What is in your docker log?

Image

@mkpanq
Copy link
Author

mkpanq commented Dec 27, 2024

For newest Coolify version (v4.0.0-beta.380) problem still exists

@sudguru
Copy link

sudguru commented Dec 28, 2024

@pongraczi

Here is my log:

2024-12-28T05:51:01.423665453Z 05:51:01.422 [error] Postgrex.Protocol (#PID<0.4727.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-12-28T05:51:01.423667942Z 2024-12-28T05:51:01.423670094Z 05:51:01.422 [error] Postgrex.Protocol (#PID<0.4720.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-12-28T05:51:01.440468398Z 2024-12-28T05:51:01.440511368Z 05:51:01.440 [notice] Application logflare exited: Logflare.Application.start(:normal, []) returned an error: shutdown: failed to start child: Cainophile.Adapters.Postgres 2024-12-28T05:51:01.440516554Z ** (EXIT) :invalid_password 2024-12-28T05:51:03.018939365Z {"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-12-28T05:51:03.019042167Z 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-12-28T05:51:03.022912395Z 2024-12-28T05:51:03.221143870Z Crash dump is being written to: erl_crash.dump...done 2024-12-28T05:51:03.753497631Z LOGFLARE_NODE_HOST is: 127.0.0.1 2024-12-28T05:51:04.293522707Z 2024-12-28T05:51:04.293552658Z 05:51:04.290 [info] Starting migration 2024-12-28T05:51:04.572612401Z 2024-12-28T05:51:04.572640306Z 05:51:04.572 [error] Postgrex.Protocol (#PID<0.162.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-12-28T05:51:04.572644571Z 2024-12-28T05:51:04.572646923Z 05:51:04.572 [error] Postgrex.Protocol (#PID<0.163.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-12-28T05:51:06.258465628Z 2024-12-28T05:51:06.258485263Z 05:51:06.258 [error] Postgrex.Protocol (#PID<0.163.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-12-28T05:51:06.840563056Z 2024-12-28T05:51:06.840598325Z 05:51:06.840 [error] Postgrex.Protocol (#PID<0.162.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-12-28T05:51:10.152886553Z 2024-12-28T05:51:10.152934115Z 05:51:10.152 [error] Postgrex.Protocol (#PID<0.163.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-12-28T05:51:11.033263163Z 2024-12-28T05:51:11.033298013Z 05:51:11.032 [error] Postgrex.Protocol (#PID<0.162.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-12-28T05:51:15.472830971Z 2024-12-28T05:51:15.472869908Z 05:51:15.472 [error] Could not create schema migrations table. This error usually happens due to the following: 2024-12-28T05:51:15.472873763Z 2024-12-28T05:51:15.472876144Z * The database does not exist 2024-12-28T05:51:15.472878996Z * The "schema_migrations" table, which Ecto uses for managing 2024-12-28T05:51:15.472881714Z migrations, was defined by another library 2024-12-28T05:51:15.472884308Z * There is a deadlock while migrating (such as using concurrent 2024-12-28T05:51:15.472886875Z indexes with a migration_lock) 2024-12-28T05:51:15.472889169Z 2024-12-28T05:51:15.472891419Z To fix the first issue, run "mix ecto.create" for the desired MIX_ENV. 2024-12-28T05:51:15.472894105Z 2024-12-28T05:51:15.472896309Z To address the second, you can run "mix ecto.drop" followed by 2024-12-28T05:51:15.472898845Z "mix ecto.create", both for the desired MIX_ENV. Alternatively you may 2024-12-28T05:51:15.472901580Z configure Ecto to use another table and/or repository for managing 2024-12-28T05:51:15.472904372Z migrations: 2024-12-28T05:51:15.472906707Z 2024-12-28T05:51:15.472908933Z config :logflare, Logflare.Repo, 2024-12-28T05:51:15.472911281Z migration_source: "some_other_table_for_schema_migrations", 2024-12-28T05:51:15.472913850Z migration_repo: AnotherRepoForSchemaMigrations 2024-12-28T05:51:15.472916165Z 2024-12-28T05:51:15.472918467Z The full error report is shown below. 2024-12-28T05:51:15.472920753Z 2024-12-28T05:51:15.476421970Z ** (DBConnection.ConnectionError) connection not available and request was dropped from queue after 10967ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by: 2024-12-28T05:51:15.476463640Z 2024-12-28T05:51:15.476466712Z 1. Ensuring your database is available and that you can connect to it 2024-12-28T05:51:15.476469160Z 2. Tracking down slow queries and making sure they are running fast enough 2024-12-28T05:51:15.476471488Z 3. Increasing the pool_size (although this increases resource consumption) 2024-12-28T05:51:15.476473774Z 4. Allowing requests to wait longer by increasing :queue_target and :queue_interval 2024-12-28T05:51:15.476476197Z 2024-12-28T05:51:15.476478534Z See DBConnection.start_link/2 for more information 2024-12-28T05:51:15.476480983Z 2024-12-28T05:51:15.476483318Z (ecto_sql 3.10.1) lib/ecto/adapters/sql.ex:913: Ecto.Adapters.SQL.raise_sql_call_error/1 2024-12-28T05:51:15.476485555Z (elixir 1.14.4) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2 2024-12-28T05:51:15.476487867Z (ecto_sql 3.10.1) lib/ecto/adapters/sql.ex:1005: Ecto.Adapters.SQL.execute_ddl/4 2024-12-28T05:51:15.476490215Z (ecto_sql 3.10.1) lib/ecto/migrator.ex:738: Ecto.Migrator.verbose_schema_migration/3 2024-12-28T05:51:15.476492551Z (ecto_sql 3.10.1) lib/ecto/migrator.ex:552: Ecto.Migrator.lock_for_migrations/4 2024-12-28T05:51:15.476494871Z (ecto_sql 3.10.1) lib/ecto/migrator.ex:428: Ecto.Migrator.run/4 2024-12-28T05:51:15.476497178Z (ecto_sql 3.10.1) lib/ecto/migrator.ex:170: Ecto.Migrator.with_repo/3 2024-12-28T05:51:15.476498993Z nofile:1: (file) 2024-12-28T05:51:18.772917699Z 2024-12-28T05:51:18.772967129Z 05:51:18.772 [info] Elixir.Logflare.SigtermHandler is being initialized... 2024-12-28T05:51:18.802141327Z 2024-12-28T05:51:18.802156482Z 05:51:18.801 [error] Postgrex.Protocol (#PID<0.4719.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-12-28T05:51:18.802763401Z 2024-12-28T05:51:18.802772503Z 05:51:18.801 [error] Postgrex.Protocol (#PID<0.4725.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-12-28T05:51:18.802775631Z 2024-12-28T05:51:18.802777991Z 05:51:18.802 [error] Postgrex.Protocol (#PID<0.4729.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-12-28T05:51:18.802780874Z 2024-12-28T05:51:18.802783119Z 05:51:18.802 [error] Postgrex.Protocol (#PID<0.4724.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-12-28T05:51:18.802785920Z 2024-12-28T05:51:18.802788436Z 05:51:18.802 [error] Postgrex.Protocol (#PID<0.4730.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-12-28T05:51:18.802790928Z 2024-12-28T05:51:18.802800698Z 05:51:18.802 [error] Postgrex.Protocol (#PID<0.4723.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-12-28T05:51:18.802803165Z 2024-12-28T05:51:18.802805315Z 05:51:18.802 [error] Postgrex.Protocol (#PID<0.4727.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-12-28T05:51:18.802807769Z 2024-12-28T05:51:18.802809865Z 05:51:18.802 [error] Postgrex.Protocol (#PID<0.4728.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-12-28T05:51:18.804746028Z 2024-12-28T05:51:18.804756990Z 05:51:18.804 [error] Postgrex.Protocol (#PID<0.4726.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-12-28T05:51:18.804760631Z 2024-12-28T05:51:18.804762856Z 05:51:18.804 [error] Postgrex.Protocol (#PID<0.4720.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-12-28T05:51:18.827147770Z 2024-12-28T05:51:18.827163891Z 05:51:18.826 [notice] Application logflare exited: Logflare.Application.start(:normal, []) returned an error: shutdown: failed to start child: Cainophile.Adapters.Postgres 2024-12-28T05:51:18.827167141Z ** (EXIT) :invalid_password 2024-12-28T05:51:20.390561623Z {"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-12-28T05:51:20.390607929Z 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-12-28T05:51:20.394765272Z 2024-12-28T05:51:20.590307658Z Crash dump is being written to: erl_crash.dump...done 2024-12-28T05:51:21.075053408Z LOGFLARE_NODE_HOST is: 127.0.0.1 2024-12-28T05:51:21.564239943Z 2024-12-28T05:51:21.564270541Z 05:51:21.559 [info] Starting migration 2024-12-28T05:51:21.844453838Z 2024-12-28T05:51:21.844485008Z 05:51:21.844 [error] Postgrex.Protocol (#PID<0.163.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin" 2024-12-28T05:51:21.844488894Z 2024-12-28T05:51:21.844491461Z 05:51:21.844 [error] Postgrex.Protocol (#PID<0.162.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "supabase_admin"

@pongraczi
Copy link

Are you sure, you have enough resurces and the target folders do not exist before?

2024-12-25T12:02:28.418063283Z PostgreSQL Database directory appears to contain a database; Skipping initialization

I just tried again (4th time) this and I am not able to reproduce:

  • upgrading coolify to the latest version (v4.0.0-beta.380) from the previous (...379)
  • Hetzner VPS, both servers: coolify (arm64, 2GB RAM) and target with supabase+rabbitmq+wiregueard (arm64, 8GB RAM, Ubuntu 24.04.1 LTS)
  • removing previously installed and upgraded supabase (checked with docker volume ls)
  • adding resource to project, selecting target server (supabase-full on target)
  • deploying (I did not change anything)
  • things are cooking (aka deploying)
  • everything are up and running without any problem

Please note:

  • coolify and supabase are on different servers
  • both servers has public ipv4 (if matters)
  • supabase server has 8GB RAM
  • cpus are arm64
  • nothing changed on settings before deploying (for example passwords)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization.
Projects
None yet
Development

No branches or pull requests

5 participants