supabase icon indicating copy to clipboard operation
supabase copied to clipboard

supabase-db is unhealthy

Open myozin-kyaw opened this issue 1 year ago • 10 comments

I want to connect external database to supabase using self hosting I already allowed remote access from postgres config and it is ok from test connecting from postgres remote access using tableplus.

And I think that I already passed DB PORT error from this suggestion https://github.com/supabase/supabase/issues/10837

Screenshot 2024-04-05 at 23 42 36

When i restart docker that was happened Error response from daemon: Cannot restart container ec950a32beed35dbd5d95dbba83aaa0e8c0386980ac24ed1c68e5e62cd6ba7ec: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "postgrest": executable file not found in $PATH: unknown

How to continue ?? please

myozin-kyaw avatar Apr 05 '24 17:04 myozin-kyaw

Hey there, thanks for opening!

From your description, I am not 100% sure what you are trying to do so I will ask a few clarifying questions if thats alright?!

  • Are you trying to connect the Supabase containers to an existing Postgres database and not supabase-db as part of the docker-compose?
  • If yes, is that database on the same machine?
  • If yes, have you updated the configuration for Supabase to remove the postgres container and point all other services to your existing db?

If possible, it is likely easier to:

  • Clear the cache and volumes in the docker directory
  • Pull the latest commit and also the latest images
  • Dump the contents of your existing DB and restore into the supabase-db

encima avatar Apr 08 '24 09:04 encima

I want to connect supabase using external postgres database

supabase .env is as below

#POSTGRES_PASSWORD=bFh9K2GchSexMzJuDU6R73JyshRvdQvw5j3 POSTGRES_PASSWORD=secret123 JWT_SECRET=bFh9K2GchSexMzJuDU6R73JyshRvdQvw5j3 ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.ewogICJyb2xlIjogImFub24iLAogICJpc3MiOiAic3VwYWJhc2UiLAogICJpYXQiOiAxNzEzMzc1MDAwLAogICJleHAiOiAxODcxMTQxNDAwCn0.d151c0IpsFtDUmPv2nftkmGEBnrPKIyg1hdOpYSp_WU SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.ewogICJyb2xlIjogInNlcnZpY2Vfcm9sZSIsCiAgImlzcyI6ICJzdXBhYmFzZSIsCiAgImlhdCI6IDE3MTMzNzUwMDAsCiAgImV4cCI6IDE4NzExNDE0MDAKfQ.BR85w0U9Ah2ojMU6aQ2ZxlNdizo0VSgNcgk8RRdgvAI DASHBOARD_USERNAME=supabase DASHBOARD_PASSWORD=password

############

Database - You can change these to any PostgreSQL database that has logical replication enabled.

############

POSTGRES_HOST=127.0.0.1 POSTGRES_DB=supabase POSTGRES_PORT=5432 POSTGRES_USER=postgres

Also you provided in docker-compose.yml and docker-compose.s3.yml if i'm using external postgres database comment out below, I've already did that.

and when i run sudo docker-compose pull and then and sudo docker-compose up

it cuases

WARN[0000] /home/ubuntu/supabase/docker/docker-compose.yml: version is obsolete [+] Running 7/0 ✔ Container supabase-rest Running 0.0s ✔ Container supabase-meta Running 0.0s ✔ Container supabase-storage Running 0.0s ✔ Container supabase-vector Running 0.0s ✔ Container supabase-imgproxy Running 0.0s ✔ Container realtime-dev.supabase-realtime Running 0.0s ✔ Container supabase-analytics Running 0.0s Attaching to realtime-dev.supabase-realtime, supabase-analytics, supabase-auth, supabase-edge-functions, supabase-imgproxy, supabase-kong, supabase-meta, supabase-rest, supabase-storage, supabase-studio, supabase-vector supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:07:52Z"} supabase-auth | {"args":[0.001804187],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:07:52Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:07:52Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:07:54Z"} supabase-auth | {"args":[0.008741942],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:07:54Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:07:54Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:07:55Z"} supabase-auth | {"args":[0.003398431],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:07:55Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:07:55Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:07:56Z"} supabase-auth | {"args":[0.00171649],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:07:56Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:07:56Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:07:58Z"} supabase-auth | {"args":[0.001219128],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:07:58Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:07:58Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:08:04Z"} supabase-auth | {"args":[0.003032842],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:08:04Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:08:04Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:08:16Z"} supabase-auth | {"args":[0.076254124],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:08:16Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:08:16Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:08:27Z"} supabase-auth | {"args":[0.005311669],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:08:27Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:08:27Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:08:48Z"} supabase-auth | {"args":[0.001940699],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:08:48Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:08:48Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:09:18Z"} supabase-auth | {"args":[0.000961671],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:09:18Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:09:18Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:10:14Z"} supabase-auth | {"args":[0.07377409],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:10:14Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:10:14Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:11:29Z"} supabase-auth | {"args":[0.004412912],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:11:29Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:11:29Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:12:39Z"} supabase-auth | {"args":[0.001625579],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:12:39Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:12:39Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:13:49Z"} supabase-auth | {"args":[0.003277072],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:13:49Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:13:49Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:14:58Z"} supabase-auth | {"args":[0.001349933],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:14:58Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:14:58Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:16:06Z"} supabase-auth | {"args":[0.000791144],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:16:06Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:16:06Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:17:10Z"} supabase-auth | {"args":[0.143560348],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:17:10Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:17:10Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:18:18Z"} supabase-auth | {"args":[0.001082704],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:18:18Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:18:18Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:19:24Z"} supabase-auth | {"args":[0.00183924],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:19:24Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:19:24Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:20:31Z"} supabase-auth | {"args":[0.001148786],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:20:31Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:20:31Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:21:37Z"} supabase-auth | {"args":[0.00186867],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:21:37Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:21:37Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:22:40Z"} supabase-auth | {"args":[0.001070979],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:22:40Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:22:40Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:23:45Z"} supabase-auth | {"args":[0.00547081],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:23:45Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:23:45Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:24:52Z"} supabase-auth | {"args":[0.002036858],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:24:52Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:24:52Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:25:59Z"} supabase-auth | {"args":[0.070230252],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:25:59Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:25:59Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:27:06Z"} supabase-auth | {"args":[0.142635812],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:27:07Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:27:07Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:28:16Z"} supabase-auth | {"args":[0.001658145],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:28:16Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:28:16Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:29:22Z"} supabase-auth | {"args":[0.001096545],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:29:22Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:29:22Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:30:29Z"} supabase-auth | {"args":[0.553412127],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:30:30Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:30:30Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:31:36Z"} supabase-auth | {"args":[0.001437791],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:31:36Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:31:36Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:32:41Z"} supabase-auth | {"args":[0.00191478],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:32:41Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:32:41Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:33:49Z"} supabase-auth | {"args":[0.000857206],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:33:49Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:33:49Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:34:54Z"} supabase-auth | {"args":[0.003104551],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:34:54Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:34:54Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:36:01Z"} supabase-auth | {"args":[0.001528339],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:36:01Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:36:01Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:37:07Z"} supabase-auth | {"args":[0.003694005],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:37:07Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:37:07Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:38:12Z"} supabase-auth | {"args":[0.001180107],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:38:12Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:38:12Z"} supabase-auth | {"level":"info","msg":"Go runtime metrics collection started","time":"2024-04-21T05:39:18Z"} supabase-auth | {"args":[0.00114214],"component":"pop","level":"info","msg":"%.4f seconds","time":"2024-04-21T05:39:18Z"} supabase-auth | {"level":"fatal","msg":"running db migrations: Migrator: problem creating schema migrations: couldn't start a new transaction: could not create new transaction: failed to connect to host=127.0.0.1 user=postgres database=supabase: dial error (dial tcp 127.0.0.1:5432: connect: connection refused)","time":"2024-04-21T05:39:18Z"} supabase-analytics | {"Kernel pid terminated",application_controller,"{application_start_failure,logflare,{{shutdown,{failed_to_start_child,'Elixir.Cainophile.Adapters.Postgres',econnrefused}},{'Elixir.Logflare.Application',start,[normal,[]]}}}"} supabase-analytics | Kernel pid terminated (application_controller) ({application_start_failure,logflare,{{shutdown,{failed_to_start_child,'Elixir.Cainophile.Adapters.Postgres',econnrefused}},{'Elixir.Logflare.Application',start,[normal,[]]}}}) supabase-analytics | dependency failed to start: container supabase-analytics is unhealthy

How to solve that please

myozin-kyaw avatar Apr 21 '24 05:04 myozin-kyaw

Hi @myozin-kyaw - Just checking in here, are you still experiencing the same issue?

Hallidayo avatar Jun 09 '24 21:06 Hallidayo

Having the same issue, trying to self host a local supabase instance on M3 Apple Silicon

Bildschirmfoto 2024-06-19 um 10 15 53

container supabase-db is unhealthy.

Even happens if I manually disable all healthchecks

db:
    container_name: supabase-db
    image: supabase/postgres:15.1.1.61
    healthcheck:
      test: ["CMD", "true"]

-> dependency failed to start: container supabase-db is unhealthy

je-sd avatar Jun 19 '24 08:06 je-sd

experiencing this even on a clean install of Supabase

harrychristianx avatar Jun 23 '24 06:06 harrychristianx

I am also experiencing this issue, any way we can roll back the docker image for supabase-db?

m4nik1 avatar Jun 23 '24 14:06 m4nik1

It's really weird... from what I can tell Docker Desktop isn't compatible with M3 Macs, eventhough it says so.

What fixed it for me:

  • Uninstall Docker Desktop, and Docker Desktop only. Keep the Docker installation if you installed it via brew
  • Install rosetta: softwareupdate --install-rosetta https://en.wikipedia.org/wiki/Rosetta_(software)
  • brew update --auto-update
  • Download https://desktop.docker.com/mac/main/arm64/124339/Docker.dmg & install
  • Update Docker manually via Docker Desktop.

SOMEHOW? it seems to fix it.. how? I have no clue.

Bildschirmfoto 2024-06-24 um 09 38 21

je-sd avatar Jun 24 '24 07:06 je-sd

I would also just use the supabase start command in the project directory, after deleting all the supabase images and containers from docker. That is what fixed it for me.

m4nik1 avatar Jun 24 '24 22:06 m4nik1

I would also just use the supabase start command in the project directory, after deleting all the supabase images and containers from docker. That is what fixed it for me.

This works!

Seems something to do an existing Docker Config/Version. I've tried to clean install on another Windows 11 Build 22631 installed with Docker v4.31.1 too, and Supabase just works out of the box via docker compose install

harrychristianx avatar Jun 25 '24 09:06 harrychristianx

I would also just use the supabase start command in the project directory, after deleting all the supabase images and containers from docker. That is what fixed it for me.

This works!

Strange.. tried the same thing and didn't work for me. Only thing that worked was my solution above. Maybe you got lucky.. or I got unlucky

je-sd avatar Jun 25 '24 09:06 je-sd

any help pls i am using windows image

Codebox124 avatar Oct 29 '24 15:10 Codebox124

I fixed it by updating the images in docker-compose.yml here's the versions i used:

image: supabase/studio:20241106-f29003e image: kong:3.8.0 image: supabase/gotrue:v2.163.2 image: postgrest/postgrest:v12.2.3 image: supabase/realtime:v2.33.29 image: supabase/storage-api:v1.12.3 image: darthsim/imgproxy:v3.26 image: supabase/postgres-meta:v0.84.3 image: supabase/edge-runtime:v1.61.2 image: supabase/logflare:1.9.5 image: supabase/postgres:15.6.1.139 image: timberio/vector:0.28.X-alpine image: supabase/supavisor:1.1.67

abubakriz avatar Nov 09 '24 20:11 abubakriz

nevermind, that wasn't what fixed it It was adding a volume for the postgres database data like this

volumes:
  db-config:
+ postgresdb:
db:
    ...
    volumes:
      ...
      - postgresdb:/var/lib/postgresql/data:Z
      ...
...

abubakriz avatar Nov 09 '24 20:11 abubakriz

nevermind, that wasn't what fixed it It was adding a volume for the postgres database data like this

Yup, this fixed it for me too, I had to append in the following places:

E:\AI\AutoGPT\autogpt_platform\supabase\docker\docker-compose.yml

and also back in:

E:\AI\AutoGPT\autogpt_platform\docker-compose.yml

Which just needed the addition of postgresdb:

volumes: db-config: postgresdb:

Then

docker compose up -d

Ran and everything was healthy, thanks abubakriz.

Kraymer71 avatar Nov 10 '24 03:11 Kraymer71

In my case, I receive supabase_db is unhealthy.

I tried many times, then I know there is problem with my docker. So I try a fresh install in WSL Ubuntu 22.04. Rather than using Docker Desktop in WSL. I try to install docker directly in this link: Install Docker in Ubuntu 22.04

That's work for me like a charm 🌱.

image

toantc1024 avatar Nov 29 '24 08:11 toantc1024

nevermind, that wasn't what fixed it It was adding a volume for the postgres database data like this

Yup, this fixed it for me too, I had to append in the following places:

E:\AI\AutoGPT\autogpt_platform\supabase\docker\docker-compose.yml

and also back in:

E:\AI\AutoGPT\autogpt_platform\docker-compose.yml

Which just needed the addition of postgresdb:

volumes: db-config: postgresdb:

Then

docker compose up -d

Ran and everything was healthy, thanks abubakriz.

Yes, this works for me as well. Gread job. Thanks

josim74 avatar Dec 16 '24 04:12 josim74

I got this same problem. When my Docker Desktop updated, it had enabled rosetta emulation for the VMM on my Mac Mini. Disabling that fixed my problem.

rnewquist avatar Jan 06 '25 02:01 rnewquist

i created a new volume and assign it to /var/lib/postgresql/data and it's worked fine.

volumes:
     ...
      - pg-data:/var/lib/postgresql/data:Z
     ...
volumes:
  db-config:
  pg-data:

iMohammadd avatar Jan 26 '25 17:01 iMohammadd

Hi everyone, due to inactivity on this issue I've moved the issue over to discussions as help for other users.

Hallidayo avatar Mar 22 '25 16:03 Hallidayo