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

Database is not healthy #1415

Closed
AyushSehrawat opened this issue Aug 23, 2023 · 36 comments · Fixed by #1457, #1463 or #1502
Closed

Database is not healthy #1415

AyushSehrawat opened this issue Aug 23, 2023 · 36 comments · Fixed by #1457, #1463 or #1502

Comments

@AyushSehrawat
Copy link

Describe the bug
When trying to start supabase, it ends up giving 'database is not healthy'. Similar issues are mentioned in #1384 and #1383

To Reproduce
Steps to reproduce the behavior:

  • Be on PopOS 22.04
  • Install latest version of supabase cli (1.88.0) / beta version of cli (1.91.0)
  • run supabase init and then supabase start

Expected behavior
The local development environment works without any kind of error

Screenshots
None

Desktop (please complete the following information):

  • OS: PopOS 22.04
  • Browser (if applicable) [e.g. chrome, safari]: Not applicable
  • Version of CLI [e.g. v1.60.0]: 1.88.0 and 1.91.0
  • Version of supabase-js (if applicable) [e.g. v2.22.0]: not applicable
  • Version of Node.js (if applicable) [e.g. v16.20.0]: not applicable but it's v18.16.0

Additional context
Before logs, some more detail

docker --version
Docker version 24.0.5, build ced0996
Kernel: 6.4.6-76060406-generic 
OS: Pop!_OS 22.04 LTS x86_64

Here are detailed logs

Try 1: Logs here -> https://pastebin.com/PhYHXCyY (due to github max body limit I am unable to send, but it's log are same as the below ones)

Try 2 with @silentworks -> https://pastebin.com/17uZw2Vb (github max body limit issue) . This log is the most detailed out of all 4 try

Try 3 with @silentworks , disabled all the services in beta cli version

rmmini@pop-os:~/projects/test/test-supabase$ rm -rf supabase
mini@pop-os:~/projects/test/test-supabase$ npx supabase@beta init
Need to install the following packages:
  supabase@1.91.0
Ok to proceed? (y) y
Generate VS Code workspace settings? [y/N] 
Finished supabase init.
mini@pop-os:~/projects/test/test-supabase$ cat supabase/config.toml
# A string used to distinguish different Supabase projects on the same host. Defaults to the
# working directory name when running `supabase init`.
project_id = "test-supabase"

[api]
enabled = false
# Port to use for the API URL.
port = 54321
# Schemas to expose in your API. Tables, views and stored procedures in this schema will get API
# endpoints. public and storage are always included.
schemas = ["public", "storage", "graphql_public"]
# Extra schemas to add to the search_path of every request. public is always included.
extra_search_path = ["public", "extensions"]
# The maximum number of rows returns from a view, table, or stored procedure. Limits payload size
# for accidental or malicious requests.
max_rows = 1000

[db]
# Port to use for the local database URL.
port = 54322
# Port used by db diff command to initialise the shadow database.
shadow_port = 54320
# The database major version to use. This has to be the same as your remote database's. Run `SHOW
# server_version;` on the remote database to check.
major_version = 15

[db.pooler]
enabled = false
port = 54329
pool_mode = "transaction"
default_pool_size = 20
max_client_conn = 100

[studio]
enabled = false
# Port to use for Supabase Studio.
port = 54323
# External URL of the API server that frontend connects to.
api_url = "http://localhost"

# Email testing server. Emails sent with the local dev setup are not actually sent - rather, they
# are monitored, and you can view the emails that would have been sent from the web interface.
[inbucket]
enabled = false
# Port to use for the email testing server web interface.
port = 54324
# Uncomment to expose additional ports for testing user applications that send emails.
# smtp_port = 54325
# pop3_port = 54326

[storage]
enabled = false
# The maximum file size allowed (e.g. "5MB", "500KB").
file_size_limit = "50MiB"

[auth]
enabled = false
# The base URL of your website. Used as an allow-list for redirects and for constructing URLs used
# in emails.
site_url = "http://localhost:3000"
# A list of *exact* URLs that auth providers are permitted to redirect to post authentication.
additional_redirect_urls = ["https://localhost:3000"]
# How long tokens are valid for, in seconds. Defaults to 3600 (1 hour), maximum 604,800 (1 week).
jwt_expiry = 3600
# If disabled, the refresh token will never expire.
enable_refresh_token_rotation = false
# Allows refresh tokens to be reused after expiry, up to the specified interval in seconds.
# Requires enable_refresh_token_rotation = true.
refresh_token_reuse_interval = 10
# Allow/disallow new user signups to your project.
enable_signup = false

[auth.email]
# Allow/disallow new user signups via email to your project.
enable_signup = false
# If enabled, a user will be required to confirm any email change on both the old, and new email
# addresses. If disabled, only the new email is required to confirm.
double_confirm_changes = false
# If enabled, users need to confirm their email address before signing in.
enable_confirmations = false

# Uncomment to customize email template
# [auth.email.template.invite]
# subject = "You have been invited"
# content_path = "./supabase/templates/invite.html"

[auth.sms]
# Allow/disallow new user signups via SMS to your project.
enable_signup = false
# If enabled, users need to confirm their phone number before signing in.
enable_confirmations = false

# Configure one of the supported SMS providers: `twilio`, `twilio_verify`, `messagebird`, `textlocal`, `vonage`.
[auth.sms.twilio]
enabled = false
account_sid = ""
message_service_sid = ""
# DO NOT commit your Twilio auth token to git. Use environment variable substitution instead:
auth_token = "env(SUPABASE_AUTH_SMS_TWILIO_AUTH_TOKEN)"

# Use an external OAuth provider. The full list of providers are: `apple`, `azure`, `bitbucket`,
# `discord`, `facebook`, `github`, `gitlab`, `google`, `keycloak`, `linkedin`, `notion`, `twitch`,
# `twitter`, `slack`, `spotify`, `workos`, `zoom`.
[auth.external.apple]
enabled = false
client_id = ""
# DO NOT commit your OAuth provider secret to git. Use environment variable substitution instead:
secret = "env(SUPABASE_AUTH_EXTERNAL_APPLE_SECRET)"
# Overrides the default auth redirectUrl.
redirect_uri = ""
# Overrides the default auth provider URL. Used to support self-hosted gitlab, single-tenant Azure,
# or any other third-party OIDC providers.
url = ""

[analytics]
enabled = false
port = 54327
vector_port = 54328
# Configure one of the supported backends: `postgres`, `bigquery`
backend = "postgres"
mini@pop-os:~/projects/test/test-supabase$ npx supabase@beta start
v1.11.1: Pulling from supabase/edge-runtime
52d2b7f179e3: Pull complete 
bf4f7b8e8bb8: Pull complete 
70255be12b95: Pull complete 
ee241ec84ce1: Pull complete 
Digest: sha256:d54581491ee217d9f8ed82e752c343003abedf0d6a1587fbde43746b3b18718c
Status: Downloaded newer image for public.ecr.aws/supabase/edge-runtime:v1.11.1
database is not healthy
Try rerunning the command with --debug to troubleshoot the error.
mini@pop-os:~/projects/test/test-supabase$ 

Try 4 with @silentworks , here I changed the port of database from 54322 to 54522

mini@pop-os:~/projects/test/test-supabase$ npx supabase@beta --version
1.91.0
mini@pop-os:~/projects/test/test-supabase$ docker ps
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
mini@pop-os:~/projects/test/test-supabase$ cat supabase/config.toml
# A string used to distinguish different Supabase projects on the same host. Defaults to the
# working directory name when running `supabase init`.
project_id = "test-supabase"

[api]
enabled = false
# Port to use for the API URL.
port = 54321
# Schemas to expose in your API. Tables, views and stored procedures in this schema will get API
# endpoints. public and storage are always included.
schemas = ["public", "storage", "graphql_public"]
# Extra schemas to add to the search_path of every request. public is always included.
extra_search_path = ["public", "extensions"]
# The maximum number of rows returns from a view, table, or stored procedure. Limits payload size
# for accidental or malicious requests.
max_rows = 1000

[db]
# Port to use for the local database URL.
port = 54522
# Port used by db diff command to initialise the shadow database.
shadow_port = 54320
# The database major version to use. This has to be the same as your remote database's. Run `SHOW
# server_version;` on the remote database to check.
major_version = 15

[db.pooler]
enabled = false
port = 54329
pool_mode = "transaction"
default_pool_size = 20
max_client_conn = 100

[studio]
enabled = false
# Port to use for Supabase Studio.
port = 54323
# External URL of the API server that frontend connects to.
api_url = "http://localhost"

# Email testing server. Emails sent with the local dev setup are not actually sent - rather, they
# are monitored, and you can view the emails that would have been sent from the web interface.
[inbucket]
enabled = false
# Port to use for the email testing server web interface.
port = 54324
# Uncomment to expose additional ports for testing user applications that send emails.
# smtp_port = 54325
# pop3_port = 54326

[storage]
enabled = false
# The maximum file size allowed (e.g. "5MB", "500KB").
file_size_limit = "50MiB"

[auth]
enabled = false
# The base URL of your website. Used as an allow-list for redirects and for constructing URLs used
# in emails.
site_url = "http://localhost:3000"
# A list of *exact* URLs that auth providers are permitted to redirect to post authentication.
additional_redirect_urls = ["https://localhost:3000"]
# How long tokens are valid for, in seconds. Defaults to 3600 (1 hour), maximum 604,800 (1 week).
jwt_expiry = 3600
# If disabled, the refresh token will never expire.
enable_refresh_token_rotation = false
# Allows refresh tokens to be reused after expiry, up to the specified interval in seconds.
# Requires enable_refresh_token_rotation = true.
refresh_token_reuse_interval = 10
# Allow/disallow new user signups to your project.
enable_signup = false

[auth.email]
# Allow/disallow new user signups via email to your project.
enable_signup = false
# If enabled, a user will be required to confirm any email change on both the old, and new email
# addresses. If disabled, only the new email is required to confirm.
double_confirm_changes = false
# If enabled, users need to confirm their email address before signing in.
enable_confirmations = false

# Uncomment to customize email template
# [auth.email.template.invite]
# subject = "You have been invited"
# content_path = "./supabase/templates/invite.html"

[auth.sms]
# Allow/disallow new user signups via SMS to your project.
enable_signup = false
# If enabled, users need to confirm their phone number before signing in.
enable_confirmations = false

# Configure one of the supported SMS providers: `twilio`, `twilio_verify`, `messagebird`, `textlocal`, `vonage`.
[auth.sms.twilio]
enabled = false
account_sid = ""
message_service_sid = ""
# DO NOT commit your Twilio auth token to git. Use environment variable substitution instead:
auth_token = "env(SUPABASE_AUTH_SMS_TWILIO_AUTH_TOKEN)"

# Use an external OAuth provider. The full list of providers are: `apple`, `azure`, `bitbucket`,
# `discord`, `facebook`, `github`, `gitlab`, `google`, `keycloak`, `linkedin`, `notion`, `twitch`,
# `twitter`, `slack`, `spotify`, `workos`, `zoom`.
[auth.external.apple]
enabled = false
client_id = ""
# DO NOT commit your OAuth provider secret to git. Use environment variable substitution instead:
secret = "env(SUPABASE_AUTH_EXTERNAL_APPLE_SECRET)"
# Overrides the default auth redirectUrl.
redirect_uri = ""
# Overrides the default auth provider URL. Used to support self-hosted gitlab, single-tenant Azure,
# or any other third-party OIDC providers.
url = ""

[analytics]
enabled = false
port = 54327
vector_port = 54328
# Configure one of the supported backends: `postgres`, `bigquery`
backend = "postgres"
mini@pop-os:~/projects/test/test-supabase$ npx supabase@beta start
database is not healthy
Try rerunning the command with --debug to troubleshoot the error.
mini@pop-os:~/projects/test/test-supabase$ npx supabase@beta start --debug
Supabase CLI 1.91.0
2023/08/23 22:37:42 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:42 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:42 Send Done
2023/08/23 22:37:42 Recv First Byte
2023/08/23 22:37:42 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:42 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:42 Send Done
2023/08/23 22:37:42 Recv First Byte
2023/08/23 22:37:42 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:42 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:42 Send Done
2023/08/23 22:37:42 Recv First Byte
2023/08/23 22:37:42 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:42 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:42 Send Done
2023/08/23 22:37:42 Recv First Byte
2023/08/23 22:37:42 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:42 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:42 Send Done
2023/08/23 22:37:42 Recv First Byte
2023/08/23 22:37:42 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:42 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:42 Send Done
2023/08/23 22:37:42 Recv First Byte
2023/08/23 22:37:42 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:42 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:42 Send Done
2023/08/23 22:37:42 Recv First Byte
2023/08/23 22:37:42 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:42 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:42 Send Done
2023/08/23 22:37:42 Recv First Byte
2023/08/23 22:37:42 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:42 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:42 Send Done
2023/08/23 22:37:42 Recv First Byte
2023/08/23 22:37:42 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:42 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:42 Send Done
2023/08/23 22:37:42 Recv First Byte
2023/08/23 22:37:42 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:42 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:42 Send Done
2023/08/23 22:37:42 Recv First Byte
2023/08/23 22:37:42 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:42 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:42 Send Done
2023/08/23 22:37:42 Recv First Byte
2023/08/23 22:37:42 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:42 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:42 Send Done
2023/08/23 22:37:42 Recv First Byte
2023/08/23 22:37:42 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:42 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:42 Send Done
2023/08/23 22:37:42 Recv First Byte
2023/08/23 22:37:42 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:42 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:42 Send Done
2023/08/23 22:37:42 Recv First Byte
2023/08/23 22:37:42 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:42 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:42 Send Done
2023/08/23 22:37:42 Recv First Byte
2023/08/23 22:37:42 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:42 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:42 Send Done
2023/08/23 22:37:42 Recv First Byte
2023/08/23 22:37:42 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:42 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:42 Send Done
2023/08/23 22:37:42 Recv First Byte
2023/08/23 22:37:42 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:42 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:42 Send Done
2023/08/23 22:37:42 Recv First Byte
2023/08/23 22:37:42 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:42 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:42 Send Done
2023/08/23 22:37:42 Recv First Byte
2023/08/23 22:37:42 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:42 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:42 Sent Header: Content-Length [321]
2023/08/23 22:37:42 Sent Header: Content-Type [application/json]
2023/08/23 22:37:42 Send Done
2023/08/23 22:37:42 Recv First Byte
2023/08/23 22:37:42 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:42 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:42 Sent Header: Content-Length [11482]
2023/08/23 22:37:42 Sent Header: Content-Type [application/json]
2023/08/23 22:37:42 Send Done
2023/08/23 22:37:44 Recv First Byte
2023/08/23 22:37:44 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:44 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:44 Sent Header: Content-Length [0]
2023/08/23 22:37:44 Sent Header: Content-Type [text/plain]
2023/08/23 22:37:44 Send Done
2023/08/23 22:37:46 Recv First Byte
2023/08/23 22:37:46 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:46 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:46 Send Done
2023/08/23 22:37:46 Recv First Byte
2023/08/23 22:37:47 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:47 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:47 Send Done
2023/08/23 22:37:47 Recv First Byte
2023/08/23 22:37:48 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:48 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:48 Send Done
2023/08/23 22:37:48 Recv First Byte
2023/08/23 22:37:49 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:49 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:49 Send Done
2023/08/23 22:37:49 Recv First Byte
2023/08/23 22:37:50 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:50 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:50 Send Done
2023/08/23 22:37:50 Recv First Byte
2023/08/23 22:37:51 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:51 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:51 Send Done
2023/08/23 22:37:51 Recv First Byte
2023/08/23 22:37:52 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:52 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:52 Send Done
2023/08/23 22:37:52 Recv First Byte
2023/08/23 22:37:53 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:53 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:53 Send Done
2023/08/23 22:37:53 Recv First Byte
2023/08/23 22:37:54 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:54 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:54 Send Done
2023/08/23 22:37:54 Recv First Byte
2023/08/23 22:37:55 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:55 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:55 Send Done
2023/08/23 22:37:55 Recv First Byte
2023/08/23 22:37:56 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:56 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:56 Send Done
2023/08/23 22:37:56 Recv First Byte
2023/08/23 22:37:57 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:57 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:57 Send Done
2023/08/23 22:37:57 Recv First Byte
2023/08/23 22:37:58 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:58 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:58 Send Done
2023/08/23 22:37:58 Recv First Byte
2023/08/23 22:37:59 Sent Header: Host [api.moby.localhost]
2023/08/23 22:37:59 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:37:59 Send Done
2023/08/23 22:37:59 Recv First Byte
2023/08/23 22:38:00 Sent Header: Host [api.moby.localhost]
2023/08/23 22:38:00 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:38:00 Send Done
2023/08/23 22:38:00 Recv First Byte
2023/08/23 22:38:01 Sent Header: Host [api.moby.localhost]
2023/08/23 22:38:01 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:38:01 Send Done
2023/08/23 22:38:01 Recv First Byte
2023/08/23 22:38:02 Sent Header: Host [api.moby.localhost]
2023/08/23 22:38:02 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:38:02 Send Done
2023/08/23 22:38:02 Recv First Byte
2023/08/23 22:38:03 Sent Header: Host [api.moby.localhost]
2023/08/23 22:38:03 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:38:03 Send Done
2023/08/23 22:38:03 Recv First Byte
2023/08/23 22:38:04 Sent Header: Host [api.moby.localhost]
2023/08/23 22:38:04 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:38:04 Send Done
2023/08/23 22:38:04 Recv First Byte
2023/08/23 22:38:05 Sent Header: Host [api.moby.localhost]
2023/08/23 22:38:05 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/08/23 22:38:05 Send Done
2023/08/23 22:38:05 Recv First Byte
database is not healthy
mini@pop-os:~/projects/test/test-supabase$ 

Some more info I would like to add is that, i switched to github codespaces which come with docker preinstalled. I ran npm install, then npx supabase init, login , start stuff,, and it worked perfectly fine.

@sweatybridge
Copy link
Contributor

Could you try starting the database only?

npx supabase stop --no-backup
npx supabase db start

If that still errors, please also share the postgres container logs here. You can read it from docker desktop or a second terminal:

docker logs -f supabase_db_<project>

@Sammy-T
Copy link

Sammy-T commented Sep 4, 2023

I have the same issue on Windows 10. The container is automatically deleted before I can read any logs in Docker Desktop.

@AyushSehrawat
Copy link
Author

Could you try starting the database only?

npx supabase stop --no-backup
npx supabase db start

If that still errors, please also share the postgres container logs here. You can read it from docker desktop or a second terminal:

docker logs -f supabase_db_<project>

I have updated the cli version to latest before doing it, v1.93.0 (used brew to install)

mini@pop-os:~/projects/project-exerio$ docker logs -f supabase_db_exerio
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with this locale configuration:
  provider:    libc
  LC_COLLATE:  C.UTF-8
  LC_CTYPE:    C.UTF-8
  LC_MESSAGES: en_US.UTF-8
  LC_MONETARY: en_US.UTF-8
  LC_NUMERIC:  en_US.UTF-8
  LC_TIME:     en_US.UTF-8
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok


Success. You can now start the database server using:

    pg_ctl -D /var/lib/postgresql/data -l logfile start

initdb: warning: enabling "trust" authentication for local connections
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.
waiting for server to start.... 2023-09-05 08:04:52.684 UTC [52] LOG:  pgaudit extension initialized
 2023-09-05 08:04:52.704 UTC [52] LOG:  pgsodium primary server secret key loaded
 2023-09-05 08:04:53.036 UTC [52] LOG:  starting PostgreSQL 15.1 (Ubuntu 15.1-1.pgdg20.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, 64-bit
 2023-09-05 08:04:53.319 UTC [52] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
. 2023-09-05 08:04:53.848 UTC [67] LOG:  database system was shut down at 2023-09-05 08:04:51 UTC
 2023-09-05 08:04:54.218 UTC [70] LOG:  TimescaleDB background worker launcher connected to shared catalogs
 2023-09-05 08:04:54.220 UTC [52] LOG:  database system is ready to accept connections
 done
server started
 2023-09-05 08:04:54.227 UTC [72] LOG:  pg_cron scheduler started

/usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/init-scripts

/usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/migrate.sh
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/init-scripts/00-schema.sql
CREATE ROLE
REVOKE
CREATE SCHEMA
CREATE FUNCTION
REVOKE
GRANT
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/init-scripts/00000000000000-initial-schema.sql
CREATE PUBLICATION
CREATE ROLE
ALTER ROLE
CREATE ROLE
CREATE ROLE
GRANT ROLE
CREATE SCHEMA
CREATE EXTENSION
CREATE EXTENSION
CREATE EXTENSION
CREATE ROLE
CREATE ROLE
CREATE ROLE
CREATE ROLE
GRANT ROLE
GRANT ROLE
GRANT ROLE
GRANT ROLE
GRANT
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
GRANT
ALTER ROLE
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER ROLE
ALTER ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/init-scripts/00000000000001-auth-schema.sql
CREATE SCHEMA
CREATE TABLE
CREATE INDEX
CREATE INDEX
COMMENT
CREATE TABLE
CREATE INDEX
CREATE INDEX
CREATE INDEX
COMMENT
CREATE TABLE
COMMENT
CREATE TABLE
CREATE INDEX
COMMENT
CREATE TABLE
COMMENT
INSERT 0 7
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
GRANT
CREATE ROLE
GRANT
GRANT
GRANT
ALTER ROLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/init-scripts/00000000000002-storage-schema.sql
CREATE SCHEMA
GRANT
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
CREATE TABLE
CREATE INDEX
CREATE TABLE
CREATE INDEX
CREATE INDEX
ALTER TABLE
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE TABLE
CREATE ROLE
GRANT
GRANT
GRANT
ALTER ROLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER FUNCTION
ALTER FUNCTION
ALTER FUNCTION
ALTER FUNCTION
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/init-scripts/00000000000003-post-setup.sql
ALTER ROLE
ALTER ROLE
CREATE FUNCTION
CREATE EVENT TRIGGER
COMMENT
CREATE FUNCTION
COMMENT
DO
CREATE ROLE
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
ALTER ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/00-extension.sql
psql:/docker-entrypoint-initdb.d/migrations/00-extension.sql:1: NOTICE:  schema "extensions" already exists, skipping
CREATE SCHEMA
CREATE EXTENSION
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/10000000000000_demote-postgres.sql
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
ALTER ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20211115181400_update-auth-permissions.sql
GRANT
GRANT
GRANT
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
GRANT
GRANT
GRANT
GRANT
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20211118015519_create-realtime-schema.sql
CREATE SCHEMA
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20211122051245_update-realtime-permissions.sql
GRANT
GRANT
GRANT
GRANT
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20211124212715_update-auth-owner.sql
ALTER FUNCTION
ALTER FUNCTION
ALTER FUNCTION
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20211130151719_update-realtime-permissions.sql
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20220118070449_enable-safeupdate-postgrest.sql
ALTER ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20220126121436_finer-postgrest-triggers.sql
psql:/docker-entrypoint-initdb.d/migrations/20220126121436_finer-postgrest-triggers.sql:3: NOTICE:  event trigger "api_restart" does not exist, skipping
DROP EVENT TRIGGER
psql:/docker-entrypoint-initdb.d/migrations/20220126121436_finer-postgrest-triggers.sql:4: NOTICE:  function extensions.notify_api_restart() does not exist, skipping
DROP FUNCTION
CREATE FUNCTION
CREATE FUNCTION
psql:/docker-entrypoint-initdb.d/migrations/20220126121436_finer-postgrest-triggers.sql:59: NOTICE:  event trigger "pgrst_ddl_watch" does not exist, skipping
DROP EVENT TRIGGER
CREATE EVENT TRIGGER
psql:/docker-entrypoint-initdb.d/migrations/20220126121436_finer-postgrest-triggers.sql:64: NOTICE:  event trigger "pgrst_drop_watch" does not exist, skipping
DROP EVENT TRIGGER
CREATE EVENT TRIGGER
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20220224211803_fix-postgrest-supautils.sql
DO
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20220317095840_pg_graphql.sql
CREATE SCHEMA
CREATE FUNCTION
GRANT
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
CREATE FUNCTION
psql:/docker-entrypoint-initdb.d/migrations/20220317095840_pg_graphql.sql:88: NOTICE:  event trigger "issue_pg_graphql_access" does not exist, skipping
DROP EVENT TRIGGER
CREATE EVENT TRIGGER
COMMENT
CREATE FUNCTION
psql:/docker-entrypoint-initdb.d/migrations/20220317095840_pg_graphql.sql:141: NOTICE:  event trigger "issue_graphql_placeholder" does not exist, skipping
DROP EVENT TRIGGER
CREATE EVENT TRIGGER
COMMENT
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20220321174452_fix-postgrest-alter-type-event-trigger.sql
psql:/docker-entrypoint-initdb.d/migrations/20220321174452_fix-postgrest-alter-type-event-trigger.sql:3: NOTICE:  event trigger "api_restart" does not exist, skipping
DROP EVENT TRIGGER
psql:/docker-entrypoint-initdb.d/migrations/20220321174452_fix-postgrest-alter-type-event-trigger.sql:4: NOTICE:  function extensions.notify_api_restart() does not exist, skipping
DROP FUNCTION
CREATE FUNCTION
CREATE FUNCTION
DROP EVENT TRIGGER
CREATE EVENT TRIGGER
DROP EVENT TRIGGER
CREATE EVENT TRIGGER
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20220322085208_gotrue-session-limit.sql
ALTER ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20220404205710_pg_graphql-on-by-default.sql
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
psql:/docker-entrypoint-initdb.d/migrations/20220404205710_pg_graphql-on-by-default.sql:142: NOTICE:  extension "pg_graphql" does not exist, skipping
DROP EXTENSION
DO
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20220609081115_grant-supabase-auth-admin-and-supabase-storage-admin-to-postgres.sql
GRANT ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20220613123923_pg_graphql-pg-dump-perms.sql
CREATE FUNCTION
DROP EXTENSION
DO
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20220713082019_pg_cron-pg_net-temp-perms-fix.sql
DO
DO
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20221028101028_set_authenticator_timeout.sql
ALTER ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20221103090837_revoke_admin.sql
REVOKE ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20221207154255_create_pgsodium_and_vault.sql

I have some migrations already in folder, ig they were applied. But still got the error

mini@pop-os:~/projects/project-exerio$ supabase start
database is not healthy
Try rerunning the command with --debug to troubleshoot the error.
mini@pop-os:~/projects/project-exerio$ supabase stop --no-backup
Stopped supabase local development setup.
mini@pop-os:~/projects/project-exerio$ supabase db start
Starting database...
database is not healthy
Try rerunning the command with --debug to troubleshoot the error.
mini@pop-os:~/projects/project-exerio$ docker ps
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
mini@pop-os:~/projects/project-exerio$ supabase db start
Starting database...
database is not healthy
Try rerunning the command with --debug to troubleshoot the error.

I also get error on db pull.

@AyushSehrawat
Copy link
Author

I have the same issue on Windows 10. The container is automatically deleted before I can read any logs in Docker Desktop.

Just run and quickly switch to another terminal, then run the logs command 👍🏻

@sweatybridge
Copy link
Contributor

sweatybridge commented Sep 5, 2023

@AyushSehrawat the db logs look normal. May be it just needs more time to boot up as there are 5 more migrations to run https://github.com/supabase/postgres/tree/15.1.0.103/migrations/db/migrations.

I will increase the timeout to 30 seconds for you to give a try.

npx supabase@beta db start

@AyushSehrawat
Copy link
Author

Thanks @sweatybridge , it seems like the timeout was the issue, it's fixed now!
supabase start and supabase db start both work fine now. I will soon check the supabase db pull command giving some issue later.
When will this patch come in @latest branch ?

Thanks

@sweatybridge
Copy link
Contributor

sweatybridge commented Sep 5, 2023

Great to know! Our stable release happens every 2 weeks. The next one will be on 19 Sept.

@Sammy-T
Copy link

Sammy-T commented Sep 5, 2023

Thanks @AyushSehrawat. Yeah, I had to have a second terminal ready to go.

@sweatybridge
Using supabase db start will sometimes make it up to the 20220404205710_pg_graphql-on-by-default.sql migration. While using supabase@beta db start does allow it to continue further but still doesn't run successfully.

The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with this locale configuration:
  provider:    libc
  LC_COLLATE:  C.UTF-8
  LC_CTYPE:    C.UTF-8
  LC_MESSAGES: en_US.UTF-8
  LC_MONETARY: en_US.UTF-8
  LC_NUMERIC:  en_US.UTF-8
  LC_TIME:     en_US.UTF-8
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
initdb: warning: enabling "trust" authentication for local connections
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.
syncing data to disk ... ok


Success. You can now start the database server using:

    pg_ctl -D /var/lib/postgresql/data -l logfile start

waiting for server to start.... 2023-09-05 16:36:21.574 UTC [58] LOG:  pgaudit extension initialized
 2023-09-05 16:36:21.615 UTC [58] LOG:  pgsodium primary server secret key loaded
 2023-09-05 16:36:21.803 UTC [58] LOG:  starting PostgreSQL 15.1 (Ubuntu 15.1-1.pgdg20.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, 64-bit
 2023-09-05 16:36:21.931 UTC [58] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
 2023-09-05 16:36:22.344 UTC [67] LOG:  database system was shut down at 2023-09-05 16:36:18 UTC
. 2023-09-05 16:36:22.615 UTC [58] LOG:  database system is ready to accept connections
 2023-09-05 16:36:22.616 UTC [70] LOG:  TimescaleDB background worker launcher connected to shared catalogs
 2023-09-05 16:36:22.622 UTC [72] LOG:  pg_cron scheduler started
 done
server started

/usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/init-scripts

/usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/migrate.sh
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/init-scripts/00-schema.sql
CREATE ROLE
REVOKE
CREATE SCHEMA
CREATE FUNCTION
REVOKE
GRANT
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/init-scripts/00000000000000-initial-schema.sql
CREATE PUBLICATION
CREATE ROLE
ALTER ROLE
CREATE ROLE
CREATE ROLE
GRANT ROLE
CREATE SCHEMA
CREATE EXTENSION
CREATE EXTENSION
CREATE EXTENSION
CREATE ROLE
CREATE ROLE
CREATE ROLE
CREATE ROLE
GRANT ROLE
GRANT ROLE
GRANT ROLE
GRANT ROLE
GRANT
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
GRANT
ALTER ROLE
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER ROLE
ALTER ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/init-scripts/00000000000001-auth-schema.sql
CREATE SCHEMA
CREATE TABLE
CREATE INDEX
CREATE INDEX
COMMENT
CREATE TABLE
CREATE INDEX
CREATE INDEX
CREATE INDEX
COMMENT
CREATE TABLE
COMMENT
CREATE TABLE
CREATE INDEX
COMMENT
CREATE TABLE
COMMENT
INSERT 0 7
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
GRANT
CREATE ROLE
GRANT
GRANT
GRANT
ALTER ROLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/init-scripts/00000000000002-storage-schema.sql
CREATE SCHEMA
GRANT
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
CREATE TABLE
CREATE INDEX
CREATE TABLE
CREATE INDEX
CREATE INDEX
ALTER TABLE
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE TABLE
CREATE ROLE
GRANT
GRANT
GRANT
ALTER ROLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER FUNCTION
ALTER FUNCTION
ALTER FUNCTION
ALTER FUNCTION
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/init-scripts/00000000000003-post-setup.sql
ALTER ROLE
ALTER ROLE
CREATE FUNCTION
CREATE EVENT TRIGGER
COMMENT
CREATE FUNCTION
COMMENT
DO
CREATE ROLE
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
ALTER ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/00-extension.sql
psql:/docker-entrypoint-initdb.d/migrations/00-extension.sql:1: NOTICE:  schema "extensions" already exists, skipping
CREATE SCHEMA
CREATE EXTENSION
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/10000000000000_demote-postgres.sql
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
ALTER ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20211115181400_update-auth-permissions.sql
GRANT
GRANT
GRANT
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
GRANT
GRANT
GRANT
GRANT
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20211118015519_create-realtime-schema.sql
CREATE SCHEMA
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20211122051245_update-realtime-permissions.sql
GRANT
GRANT
GRANT
GRANT
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20211124212715_update-auth-owner.sql
ALTER FUNCTION
ALTER FUNCTION
ALTER FUNCTION
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20211130151719_update-realtime-permissions.sql
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20220118070449_enable-safeupdate-postgrest.sql
ALTER ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20220126121436_finer-postgrest-triggers.sql
psql:/docker-entrypoint-initdb.d/migrations/20220126121436_finer-postgrest-triggers.sql:3: NOTICE:  event trigger "api_restart" does not exist, skipping
DROP EVENT TRIGGER
DROP FUNCTION
psql:/docker-entrypoint-initdb.d/migrations/20220126121436_finer-postgrest-triggers.sql:4: NOTICE:  function extensions.notify_api_restart() does not exist, skipping
CREATE FUNCTION
CREATE FUNCTION
DROP EVENT TRIGGER
psql:/docker-entrypoint-initdb.d/migrations/20220126121436_finer-postgrest-triggers.sql:59: NOTICE:  event trigger "pgrst_ddl_watch" does not exist, skipping
CREATE EVENT TRIGGER
psql:/docker-entrypoint-initdb.d/migrations/20220126121436_finer-postgrest-triggers.sql:64: NOTICE:  event trigger "pgrst_drop_watch" does not exist, skipping
DROP EVENT TRIGGER
CREATE EVENT TRIGGER
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20220224211803_fix-postgrest-supautils.sql
DO
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20220317095840_pg_graphql.sql
CREATE SCHEMA
CREATE FUNCTION
GRANT
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
CREATE FUNCTION
psql:/docker-entrypoint-initdb.d/migrations/20220317095840_pg_graphql.sql:88: NOTICE:  event trigger "issue_pg_graphql_access" does not exist, skipping
DROP EVENT TRIGGER
CREATE EVENT TRIGGER
COMMENT
CREATE FUNCTION
DROP EVENT TRIGGER
psql:/docker-entrypoint-initdb.d/migrations/20220317095840_pg_graphql.sql:141: NOTICE:  event trigger "issue_graphql_placeholder" does not exist, skipping
CREATE EVENT TRIGGER
COMMENT
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20220321174452_fix-postgrest-alter-type-event-trigger.sql
DROP EVENT TRIGGER
psql:/docker-entrypoint-initdb.d/migrations/20220321174452_fix-postgrest-alter-type-event-trigger.sql:3: NOTICE:  event trigger "api_restart" does not exist, skipping
psql:/docker-entrypoint-initdb.d/migrations/20220321174452_fix-postgrest-alter-type-event-trigger.sql:4: NOTICE:  function extensions.notify_api_restart() does not exist, skipping
DROP FUNCTION
CREATE FUNCTION
CREATE FUNCTION
DROP EVENT TRIGGER
CREATE EVENT TRIGGER
DROP EVENT TRIGGER
CREATE EVENT TRIGGER
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20220322085208_gotrue-session-limit.sql
ALTER ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20220404205710_pg_graphql-on-by-default.sql
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
DROP EXTENSION
psql:/docker-entrypoint-initdb.d/migrations/20220404205710_pg_graphql-on-by-default.sql:142: NOTICE:  extension "pg_graphql" does not exist, skipping
DO
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20220609081115_grant-supabase-auth-admin-and-supabase-storage-admin-to-postgres.sql
GRANT ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20220613123923_pg_graphql-pg-dump-perms.sql
CREATE FUNCTION
DROP EXTENSION
DO
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20220713082019_pg_cron-pg_net-temp-perms-fix.sql
DO
DO
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20221028101028_set_authenticator_timeout.sql
ALTER ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20221103090837_revoke_admin.sql
REVOKE ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20221207154255_create_pgsodium_and_vault.sql
DO
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20230201083204_grant_auth_roles_to_postgres.sql
GRANT ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20230224042246_grant_extensions_perms_for_postgres.sql
GRANT
GRANT
GRANT
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20230306081037_grant_pg_monitor_to_postgres.sql
GRANT ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20230327032006_grant_auth_roles_to_supabase_storage_admin.sql
GRANT ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20230529180330_alter_api_roles_for_inherit.sql
ALTER ROLE
ALTER ROLE
ALTER ROLE
GRANT ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /etc/postgresql.schema.sql
ALTER DATABASE
ALTER DATABASE
ALTER ROLE
ALTER ROLE
ALTER ROLE
ALTER ROLE
ALTER ROLE
ALTER ROLE
CREATE SCHEMA
ALTER SCHEMA
CREATE SCHEMA
ALTER SCHEMA
BEGIN
CREATE EXTENSION
CREATE SCHEMA
GRANT
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
CREATE TABLE
INSERT 0 1
CREATE TABLE
CREATE INDEX
CREATE INDEX
COMMENT
CREATE FUNCTION
DO
GRANT
GRANT
GRANT
ALTER ROLE
psql:/etc/postgresql.schema.sql:150: NOTICE:  drop cascades to trigger secrets_encrypt_secret_trigger_secret on table vault.secrets
psql:/etc/postgresql.schema.sql:150: NOTICE:  trigger "secrets_encrypt_secret_trigger_secret" for relation "vault.secrets" does not exist, skipping
psql:/etc/postgresql.schema.sql:150: NOTICE:  about to masking role vault.secrets vault.decrypted_secrets
ALTER TABLE
psql:/etc/postgresql.schema.sql:151: NOTICE:  drop cascades to trigger secrets_encrypt_secret_trigger_secret on table vault.secrets
psql:/etc/postgresql.schema.sql:151: NOTICE:  trigger "secrets_encrypt_secret_trigger_secret" for relation "vault.secrets" does not exist, skipping
psql:/etc/postgresql.schema.sql:151: NOTICE:  about to masking role vault.secrets vault.decrypted_secrets
ALTER TABLE
ALTER FUNCTION
GRANT ROLE
DO
DO
CREATE FUNCTION
COMMENT
DO
INSERT 0 1
ALTER FUNCTION
ALTER FUNCTION
REVOKE
GRANT
COMMIT
 pg_stat_statements_reset
--------------------------

(1 row)

 pg_stat_reset
---------------

(1 row)


/usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/migrations

 2023-09-05 16:36:47.100 UTC [58] LOG:  received fast shutdown request
waiting for server to shut down.... 2023-09-05 16:36:47.221 UTC [58] LOG:  aborting any active transactions
 2023-09-05 16:36:47.221 UTC [72] LOG:  pg_cron scheduler shutting down
 2023-09-05 16:36:47.223 UTC [70] FATAL:  terminating background worker "TimescaleDB Background Worker Launcher" due to administrator command
 2023-09-05 16:36:47.224 UTC [58] LOG:  background worker "logical replication launcher" (PID 73) exited with exit code 1
 2023-09-05 16:36:47.225 UTC [58] LOG:  background worker "TimescaleDB Background Worker Launcher" (PID 70) exited with exit code 1
 2023-09-05 16:36:47.230 UTC [65] LOG:  shutting down
 2023-09-05 16:36:47.343 UTC [65] LOG:  checkpoint starting: shutdown immediate

@AyushSehrawat
Copy link
Author

AyushSehrawat commented Sep 5, 2023

Hm @Sammy-T yeah issues on my side too. It worked fine in the test folder I made. But the error occured after i logged in and linked the project, then tried to run. First time start,, got database is not healthy. Stopped with no backup, ran db start and smh it worked. Then i tried few times with stop start, db start,,, but it didn't work. But once even the supabase start worked and everything was fine.

I am not sure what's the reason. Some logs on my side -

GRANT
COMMIT
 pg_stat_statements_reset 
--------------------------
 
(1 row)

 pg_stat_reset 
---------------
 
(1 row)


/usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/migrations

 2023-09-05 17:16:43.771 UTC [58] LOG:  received fast shutdown request
waiting for server to shut down.... 2023-09-05 17:16:43.913 UTC [58] LOG:  aborting any active transactions
 2023-09-05 17:16:43.913 UTC [79] LOG:  pg_cron scheduler shutting down
 2023-09-05 17:16:43.913 UTC [77] FATAL:  terminating background worker "TimescaleDB Background Worker Launcher" due to administrator command
 2023-09-05 17:16:43.916 UTC [58] LOG:  background worker "logical replication launcher" (PID 80) exited with exit code 1
 2023-09-05 17:16:43.918 UTC [58] LOG:  background worker "TimescaleDB Background Worker Launcher" (PID 77) exited with exit code 1
 2023-09-05 17:16:43.928 UTC [65] LOG:  shutting down
 2023-09-05 17:16:44.140 UTC [65] LOG:  checkpoint starting: shutdown immediate
. 2023-09-05 17:16:45.599 UTC [65] LOG:  checkpoint complete: wrote 362 buffers (2.2%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.171 s, sync=0.641 s, total=1.672 s; sync files=123, longest=0.129 s, average=0.006 s; distance=2978 kB, estimate=2978 kB
. 2023-09-05 17:16:45.812 UTC [58] LOG:  database system is shut down
 done
server stopped

PostgreSQL init process complete; ready for start up.

 2023-09-05 17:16:46.062 UTC [9] LOG:  pgaudit extension initialized
 2023-09-05 17:16:46.081 UTC [9] LOG:  pgsodium primary server secret key loaded
 2023-09-05 17:16:46.301 UTC [9] LOG:  starting PostgreSQL 15.1 (Ubuntu 15.1-1.pgdg20.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, 64-bit
 2023-09-05 17:16:46.301 UTC [9] LOG:  listening on IPv4 address "0.0.0.0", port 5432
 2023-09-05 17:16:46.301 UTC [9] LOG:  listening on IPv6 address "::", port 5432
 2023-09-05 17:16:46.561 UTC [9] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
 2023-09-05 17:16:46.908 UTC [219] LOG:  database system was shut down at 2023-09-05 17:16:45 UTC
127.0.0.1 2023-09-05 17:16:46.910 UTC [220] postgres@postgres FATAL:  the database system is starting up
 2023-09-05 17:16:47.108 UTC [223] LOG:  TimescaleDB background worker launcher connected to shared catalogs
 2023-09-05 17:16:47.110 UTC [9] LOG:  database system is ready to accept connections
 2023-09-05 17:16:47.119 UTC [225] LOG:  pg_cron scheduler started

It worked

mini@pop-os:~/projects/project-exerio$ npx supabase@beta db start
Starting database...
Setting up initial schema...
Applying migration 20230824194232_remote_schema.sql...
Applying migration 20230824194539_remote_schema.sql...
Applying migration 20230824195557_remote_schema.sql...
Applying migration 20230829183339_remote_schema.sql...
Applying migration 20230830063210_remote_schema.sql...
Applying migration 20230831185955_remote_schema.sql...
Seeding data supabase/seed.sql...

And db start command worked most of the times, issue was sometimes

i also got this error on supabase start, everything seemed to work fine but in the end error,

2023/09/05 22:50:26 PG Recv: {"Type":"ReadyForQuery","TxStatus":"I"}
Applying migration 20230831185955_remote_schema.sql...
2023/09/05 22:50:26 PG Send: {"Type":"Parse","Name":"","Query":"create policy \"temp\"\non \"public\".\"exercises\"\nas permissive\nfor insert\nto public\nwith check (true)","ParameterOIDs":null}
2023/09/05 22:50:26 PG Send: {"Type":"Bind","DestinationPortal":"","PreparedStatement":"","ParameterFormatCodes":null,"Parameters":[],"ResultFormatCodes":[]}
2023/09/05 22:50:26 PG Send: {"Type":"Describe","ObjectType":"P","Name":""}
2023/09/05 22:50:26 PG Send: {"Type":"Execute","Portal":"","MaxRows":0}
2023/09/05 22:50:26 PG Send: {"Type":"Parse","Name":"","Query":"INSERT INTO supabase_migrations.schema_migrations(version, name, statements) VALUES($1, $2, $3)","ParameterOIDs":[25,25,1009]}
2023/09/05 22:50:26 PG Send: {"Type":"Bind","DestinationPortal":"","PreparedStatement":"","ParameterFormatCodes":[0,0,0],"Parameters":[{"text":"20230831185955"},{"text":"remote_schema"},{"text":"{\"create policy \\\"temp\\\"\non \\\"public\\\".\\\"exercises\\\"\nas permissive\nfor insert\nto public\nwith check (true)\"}"}],"ResultFormatCodes":[]}
2023/09/05 22:50:26 PG Send: {"Type":"Describe","ObjectType":"P","Name":""}
2023/09/05 22:50:26 PG Send: {"Type":"Execute","Portal":"","MaxRows":0}
2023/09/05 22:50:26 PG Send: {"Type":"Sync"}
2023/09/05 22:50:26 PG Recv: {"Type":"ParseComplete"}
2023/09/05 22:50:26 PG Recv: {"Type":"BindComplete"}
2023/09/05 22:50:26 PG Recv: {"Type":"NoData"}
2023/09/05 22:50:26 PG Recv: {"Type":"CommandComplete","CommandTag":"CREATE POLICY"}
2023/09/05 22:50:26 PG Recv: {"Type":"ParseComplete"}
2023/09/05 22:50:26 PG Recv: {"Type":"BindComplete"}
2023/09/05 22:50:26 PG Recv: {"Type":"NoData"}
2023/09/05 22:50:26 PG Recv: {"Type":"CommandComplete","CommandTag":"INSERT 0 1"}
2023/09/05 22:50:26 PG Recv: {"Type":"ReadyForQuery","TxStatus":"I"}
Seeding data supabase/seed.sql...
2023/09/05 22:50:26 PG Send: {"Type":"Sync"}
2023/09/05 22:50:26 PG Recv: {"Type":"ReadyForQuery","TxStatus":"I"}
2023/09/05 22:50:26 PG Send: {"Type":"Terminate"}

edited: just noticed that after the start --debug suddenly terminated with this error, the postgres db docker was not stopped. It was running

@sweatybridge Sorry to ping you again, but please look into it.

@sweatybridge
Copy link
Contributor

I've further increased timeout to 40s in cli beta release. Let me know if it works.

Also sorry for having go back and forth on this one because the timeout value is machine dependent. I also considered checking the available cpu to determine a timeout value dynamically, but I don't want to make things too complicated for now.

@AyushSehrawat
Copy link
Author

AyushSehrawat commented Sep 6, 2023

I have 4 cores (virtual 8), so i guess there is no available cpu issue on my end. If possible, you can introduce a optional --timeout flag.

Anyways, regarding the issue @sweatybridge ,

the first time i ran the command npx supabase start, i got the below error but second time worked fine!

2023/09/06 13:39:19 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/06 13:39:19 Send Done
2023/09/06 13:39:19 Recv First Byte
supabase_pg_meta_exerio container logs:

> @supabase/postgres-meta@0.0.0-automated start
> node dist/server/server.js

(node:41) ExperimentalWarning: Importing JSON modules is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
{"level":"info","time":"2023-09-06T08:09:12.178Z","pid":41,"hostname":"9ac7cd334aae","msg":"Server listening at http://0.0.0.0:8080"}
{"level":"info","time":"2023-09-06T08:09:12.201Z","pid":41,"hostname":"9ac7cd334aae","msg":"Server listening at http://0.0.0.0:8081"}
service not healthy: [supabase_pg_meta_exerio]

I don't know if it's a temporary bug or what, but i will let you know here if anything comes up 👍🏻

Thanks

@AyushSehrawat
Copy link
Author

@sweatybridge There seems to be "database not healthy" on supabase db diff command too,

npx supabase db diff --local --file=create_view_test --debug

Gives,

2023/09/06 14:55:58 Sent Header: Host [api.moby.localhost]
2023/09/06 14:55:58 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/06 14:55:58 Send Done
2023/09/06 14:55:58 Recv First Byte
2023/09/06 14:55:59 Sent Header: Host [api.moby.localhost]
2023/09/06 14:55:59 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/06 14:55:59 Send Done
2023/09/06 14:55:59 Recv First Byte
2023/09/06 14:56:00 Sent Header: Host [api.moby.localhost]
2023/09/06 14:56:00 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/06 14:56:00 Send Done
2023/09/06 14:56:00 Recv First Byte
2023/09/06 14:56:01 Sent Header: Host [api.moby.localhost]
2023/09/06 14:56:01 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/06 14:56:01 Send Done
2023/09/06 14:56:01 Recv First Byte
2023/09/06 14:56:02 Sent Header: Host [api.moby.localhost]
2023/09/06 14:56:02 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/06 14:56:02 Send Done
2023/09/06 14:56:02 Recv First Byte
2023/09/06 14:56:03 Sent Header: Host [api.moby.localhost]
2023/09/06 14:56:03 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/06 14:56:03 Send Done
2023/09/06 14:56:03 Recv First Byte
2023/09/06 14:56:04 Sent Header: Host [api.moby.localhost]
2023/09/06 14:56:04 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/06 14:56:04 Send Done
2023/09/06 14:56:04 Recv First Byte
2023/09/06 14:56:05 Sent Header: Host [api.moby.localhost]
2023/09/06 14:56:05 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/06 14:56:05 Send Done
2023/09/06 14:56:05 Recv First Byte
database is not healthy
ALTER ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/init-scripts/00000000000001-auth-schema.sql
CREATE SCHEMA
CREATE TABLE
CREATE INDEX
CREATE INDEX
COMMENT
CREATE TABLE
CREATE INDEX
CREATE INDEX
CREATE INDEX
COMMENT
CREATE TABLE
COMMENT
CREATE TABLE
CREATE INDEX
COMMENT
CREATE TABLE
COMMENT
INSERT 0 7
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
GRANT
CREATE ROLE
GRANT
GRANT
GRANT
ALTER ROLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/init-scripts/00000000000002-storage-schema.sql
CREATE SCHEMA
GRANT
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
CREATE TABLE
CREATE INDEX
CREATE TABLE
CREATE INDEX
CREATE INDEX
ALTER TABLE
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION

and the logs of docker ended here abruptly. Seems to be the timeout issue too ig, can you increase and send a patch to beta 🙏🏻

@AyushSehrawat
Copy link
Author

@sweatybridge please look into it. Issue seems to be similar to timeout one, need to increase for shadow db too i guess.

@sweatybridge
Copy link
Contributor

It should have been increased already https://github.com/supabase/cli/blob/main/internal/db/diff/migra.go#L176. Are you on supabase@beta? If so can you also share the db logs?

@AyushSehrawat
Copy link
Author

It should have been increased already https://github.com/supabase/cli/blob/main/internal/db/diff/migra.go#L176. Are you on supabase@beta? If so can you also share the db logs?

Yes i am on beta channel only, i have shared the logs and Postgres logs above.
I will try again today in a bit

@AyushSehrawat
Copy link
Author

AyushSehrawat commented Sep 11, 2023

@sweatybridge same issue still there. I pruned all docker and it's network. Here are the logs

mini@pop-os:~/projects/project-exerio$ npx supabase --version
1.96.5
mini@pop-os:~/projects/project-exerio$ npx supabase start
15.1.0.103: Pulling from supabase/postgres
01085d60b3a6: Pull complete 
097a70b5f298: Pull complete 
08a5295336b6: Pull complete 
8c5e5831dc61: Pull complete 
b2e1ecd3d752: Pull complete 
af158ba5cb38: Pull complete 
87c407b8b319: Pull complete 
3ac6f9ab7578: Pull complete 
2a6051e5ddc0: Pull complete 
2f769da8470e: Pull complete 
16adeaf061a3: Pull complete 
f4522def5346: Pull complete 
fc4831d5008d: Pull complete 
7c7bccee5eb4: Pull complete 
d1f08b4bfc3c: Pull complete 
fac0e7ab1a7e: Pull complete 
00f6c46ca39e: Pull complete 
2c2e3a137b74: Pull complete 
255d332e1d28: Pull complete 
13169b0473ab: Pull complete 
73624787c2f6: Pull complete 
91fe6789b0c1: Pull complete 
977b01217d91: Pull complete 
Digest: sha256:fe920f18b63d5719a9e0edeebe503131f3025f3e554c1c7487384525b5fc3ebc
Status: Downloaded newer image for public.ecr.aws/supabase/postgres:15.1.0.103
2.8.1: Pulling from supabase/kong
213ec9aee27d: Pull complete 
a70653f7a2d5: Pull complete 
531e3bd93090: Pull complete 
814dd06d26c7: Pull complete 
Digest: sha256:1b53405d8680a09d6f44494b7990bf7da2ea43f84a258c59717d4539abf09f6d
Status: Downloaded newer image for public.ecr.aws/supabase/kong:2.8.1
v2.92.1: Pulling from supabase/gotrue
9398808236ff: Pull complete 
272924ea180b: Pull complete 
27a3bb39e2ff: Pull complete 
4a80e50d4074: Pull complete 
a2a8fa001677: Pull complete 
Digest: sha256:c27d9c8f7aeebce818ec4943216cb05c6811cf03fd83186df9400fc89d69cc6b
Status: Downloaded newer image for public.ecr.aws/supabase/gotrue:v2.92.1
3.0.3: Pulling from supabase/inbucket
530afca65e2e: Pull complete 
866f56904284: Pull complete 
e356c9130232: Pull complete 
8d4341af276d: Pull complete 
82a73217a072: Pull complete 
64b833ffe729: Pull complete 
a77af8706e66: Pull complete 
9c842edb6049: Pull complete 
Digest: sha256:dc912ab76de647ca2a363fe285515e512e964cf699166773f3c2c73f5e7f71c0
Status: Downloaded newer image for public.ecr.aws/supabase/inbucket:3.0.3
v2.10.1: Pulling from supabase/realtime
3f9582a2cbe7: Pull complete 
99f383335fd5: Pull complete 
5c7630b3eea2: Pull complete 
387961c45922: Pull complete 
1c628aa8f3d3: Pull complete 
773700217cb3: Pull complete 
eeb47806e6fa: Pull complete 
e6f7afe35e1b: Pull complete 
2d21e977d193: Pull complete 
24218f77a865: Pull complete 
d7233802cc80: Pull complete 
931fb51461dd: Pull complete 
Digest: sha256:e217412dabddae0ea838127350e52b71e82e96b24ab171713afcae8dd0bc21ec
Status: Downloaded newer image for public.ecr.aws/supabase/realtime:v2.10.1
v11.1.0: Pulling from supabase/postgrest
e20ce8189632: Pull complete 
Digest: sha256:86fc4a9b56702daefeb238130bfee603fc7b47438333286ec7a23448801707fd
Status: Downloaded newer image for public.ecr.aws/supabase/postgrest:v11.1.0
v0.40.4: Pulling from supabase/storage-api
31e352740f53: Pull complete 
c017600940c6: Pull complete 
c9f8586f07bd: Pull complete 
ee16df044bfc: Pull complete 
1fbf70d2de34: Pull complete 
e8ba86f63bbf: Pull complete 
9bda86230051: Pull complete 
560fa8c48f98: Pull complete 
e4743a95028c: Pull complete 
Digest: sha256:6646a6cce0eddaad996ed97fdb3f6903aaae6af87dbf19474677e78b1a08e287
Status: Downloaded newer image for public.ecr.aws/supabase/storage-api:v0.40.4
v3.8.0: Pulling from supabase/imgproxy
bd159e379b3b: Pull complete 
6309c66995c3: Pull complete 
afc82c51c69d: Pull complete 
053e09c75ec1: Pull complete 
fc6c361fe360: Pull complete 
901d40e1841c: Pull complete 
Digest: sha256:0facd355d50f3be665ebe674486f2b2e9cdaebd3f74404acd9b7fece2f661435
Status: Downloaded newer image for public.ecr.aws/supabase/imgproxy:v3.8.0
v1.15.1: Pulling from supabase/edge-runtime
360eba32fa65: Pull complete 
f7abc2f71d06: Pull complete 
e454165d29c5: Pull complete 
6ea26f54f615: Pull complete 
Digest: sha256:07272fe5c291cc94f3bf779cddb28e391ab738f52c33c6ebfb9df7e118e3c603
Status: Downloaded newer image for public.ecr.aws/supabase/edge-runtime:v1.15.1
v0.68.0: Pulling from supabase/postgres-meta
1d5252f66ea9: Pull complete 
659f9a2fcbfc: Pull complete 
c9356b58de51: Pull complete 
6663135a74d2: Pull complete 
8b36c4cc6f82: Pull complete 
69fbdb6b3095: Pull complete 
2291d251f078: Pull complete 
c9aadcffe9ab: Pull complete 
570fe750b6e9: Pull complete 
Digest: sha256:31a107dcfe9257792b49f560a5527d5fbd7128b986acad5431b269bac4d17f12
Status: Downloaded newer image for public.ecr.aws/supabase/postgres-meta:v0.68.0
20230905-f8c8a8e: Pulling from supabase/studio
52d2b7f179e3: Pull complete 
582ebf659c1e: Pull complete 
49480d29f81e: Pull complete 
c2e563dd775c: Pull complete 
ad61a4076d58: Pull complete 
1a17b0dd03f6: Pull complete 
a642cd41acf5: Pull complete 
71a1838c1c27: Pull complete 
c8b5f0d331af: Pull complete 
6f13357a5936: Pull complete 
Digest: sha256:0678e22ad10924817991753928a1f97e4d8dcbd88a961cdd782c6618ff423eed
Status: Downloaded newer image for public.ecr.aws/supabase/studio:20230905-f8c8a8e
Started supabase local development setup.

         API URL: http://localhost:54321
     GraphQL URL: http://localhost:54321/graphql/v1
          DB URL: postgresql://postgres:postgres@localhost:54322/postgres
      Studio URL: http://localhost:54323
    Inbucket URL: http://localhost:54324
      JWT secret: super-secret-jwt-token-with-at-least-32-characters-long
        anon key: ............
service_role key: ............
mini@pop-os:~/projects/project-exerio$ npx supabase db diff --local --file=test --debug
Supabase CLI 1.96.5
Connecting to local database...
2023/09/11 14:47:57 Connect Start: tcp 127.0.0.1:54322
2023/09/11 14:47:57 Connect Done: tcp 127.0.0.1:54322
2023/09/11 14:47:57 PG Send: {"Type":"StartupMessage","ProtocolVersion":196608,"Parameters":{"database":"postgres","user":"postgres"}}
2023/09/11 14:47:57 PG Recv: {"Type":"AuthenticationSASL","AuthMechanisms":["SCRAM-SHA-256"]}
2023/09/11 14:47:57 PG Send: {"Type":"SASLInitialResponse","AuthMechanism":"SCRAM-SHA-256","Data":"n,,n=,r=....."}
2023/09/11 14:47:57 PG Recv: {"Type":"AuthenticationSASLContinue","Data":"......."}
2023/09/11 14:47:57 PG Send: {"Type":"SASLResponse","Data":"c=biws,r=.....="}
2023/09/11 14:47:57 PG Recv: {"Type":"AuthenticationSASLFinal","Data":"......."}
2023/09/11 14:47:57 PG Recv: {"Type":"AuthenticationOK"}
2023/09/11 14:47:57 PG Recv: {"Type":"ParameterStatus","Name":"application_name","Value":""}
2023/09/11 14:47:57 PG Recv: {"Type":"ParameterStatus","Name":"client_encoding","Value":"UTF8"}
2023/09/11 14:47:57 PG Recv: {"Type":"ParameterStatus","Name":"DateStyle","Value":"ISO, MDY"}
2023/09/11 14:47:57 PG Recv: {"Type":"ParameterStatus","Name":"default_transaction_read_only","Value":"off"}
2023/09/11 14:47:57 PG Recv: {"Type":"ParameterStatus","Name":"in_hot_standby","Value":"off"}
2023/09/11 14:47:57 PG Recv: {"Type":"ParameterStatus","Name":"integer_datetimes","Value":"on"}
2023/09/11 14:47:57 PG Recv: {"Type":"ParameterStatus","Name":"IntervalStyle","Value":"postgres"}
2023/09/11 14:47:57 PG Recv: {"Type":"ParameterStatus","Name":"is_superuser","Value":"off"}
2023/09/11 14:47:57 PG Recv: {"Type":"ParameterStatus","Name":"server_encoding","Value":"UTF8"}
2023/09/11 14:47:57 PG Recv: {"Type":"ParameterStatus","Name":"server_version","Value":"15.1 (Ubuntu 15.1-1.pgdg20.04+1)"}
2023/09/11 14:47:57 PG Recv: {"Type":"ParameterStatus","Name":"session_authorization","Value":"postgres"}
2023/09/11 14:47:57 PG Recv: {"Type":"ParameterStatus","Name":"standard_conforming_strings","Value":"on"}
2023/09/11 14:47:57 PG Recv: {"Type":"ParameterStatus","Name":"TimeZone","Value":"UTC"}
2023/09/11 14:47:57 PG Recv: {"Type":"BackendKeyData","ProcessID":443,"SecretKey":.....}
2023/09/11 14:47:57 PG Recv: {"Type":"ReadyForQuery","TxStatus":"I"}
2023/09/11 14:47:57 PG Send: {"Type":"Parse","Name":"lrupsc_1_0","Query":"SELECT schema_name FROM information_schema.schemata WHERE NOT schema_name LIKE ANY($1) ORDER BY schema_name","ParameterOIDs":null}
2023/09/11 14:47:57 PG Send: {"Type":"Describe","ObjectType":"S","Name":"lrupsc_1_0"}
2023/09/11 14:47:57 PG Send: {"Type":"Sync"}
2023/09/11 14:47:57 PG Recv: {"Type":"ParseComplete"}
2023/09/11 14:47:57 PG Recv: {"Type":"ParameterDescription","ParameterOIDs":[1009]}
2023/09/11 14:47:57 PG Recv: {"Type":"RowDescription","Fields":[{"Name":"schema_name","TableOID":13330,"TableAttributeNumber":2,"DataTypeOID":19,"DataTypeSize":64,"TypeModifier":-1,"Format":0}]}
2023/09/11 14:47:57 PG Recv: {"Type":"ReadyForQuery","TxStatus":"I"}
2023/09/11 14:47:57 PG Send: {"Type":"Bind","DestinationPortal":"","PreparedStatement":"lrupsc_1_0","ParameterFormatCodes":[1],"Parameters":[{"binary":".........................."}],"ResultFormatCodes":[1]}
2023/09/11 14:47:57 PG Send: {"Type":"Describe","ObjectType":"P","Name":""}
2023/09/11 14:47:57 PG Send: {"Type":"Execute","Portal":"","MaxRows":0}
2023/09/11 14:47:57 PG Send: {"Type":"Sync"}
2023/09/11 14:47:57 PG Recv: {"Type":"BindComplete"}
2023/09/11 14:47:57 PG Recv: {"Type":"RowDescription","Fields":[{"Name":"schema_name","TableOID":13330,"TableAttributeNumber":2,"DataTypeOID":19,"DataTypeSize":64,"TypeModifier":-1,"Format":1}]}
2023/09/11 14:47:57 PG Recv: {"Type":"DataRow","Values":[{"text":"extensions"}]}
2023/09/11 14:47:57 PG Recv: {"Type":"DataRow","Values":[{"text":"public"}]}
2023/09/11 14:47:57 PG Recv: {"Type":"CommandComplete","CommandTag":"SELECT 2"}
2023/09/11 14:47:57 PG Recv: {"Type":"ReadyForQuery","TxStatus":"I"}
Creating shadow database...
2023/09/11 14:47:57 Sent Header: Host [api.moby.localhost]
2023/09/11 14:47:57 PG Send: {"Type":"Terminate"}
2023/09/11 14:47:57 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:47:57 Send Done
2023/09/11 14:47:57 Recv First Byte
2023/09/11 14:47:57 Sent Header: Host [api.moby.localhost]
2023/09/11 14:47:57 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:47:57 Sent Header: Content-Length [300]
2023/09/11 14:47:57 Sent Header: Content-Type [application/json]
2023/09/11 14:47:57 Send Done
2023/09/11 14:47:57 Recv First Byte
2023/09/11 14:47:57 Sent Header: Host [api.moby.localhost]
2023/09/11 14:47:57 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:47:57 Sent Header: Content-Length [11683]
2023/09/11 14:47:57 Sent Header: Content-Type [application/json]
2023/09/11 14:47:57 Send Done
2023/09/11 14:47:59 Recv First Byte
2023/09/11 14:47:59 Sent Header: Host [api.moby.localhost]
2023/09/11 14:47:59 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:47:59 Sent Header: Content-Length [0]
2023/09/11 14:47:59 Sent Header: Content-Type [text/plain]
2023/09/11 14:47:59 Send Done
2023/09/11 14:48:01 Recv First Byte
2023/09/11 14:48:01 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:01 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:01 Send Done
2023/09/11 14:48:01 Recv First Byte
2023/09/11 14:48:02 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:02 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:02 Send Done
2023/09/11 14:48:02 Recv First Byte
2023/09/11 14:48:03 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:03 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:03 Send Done
2023/09/11 14:48:03 Recv First Byte
2023/09/11 14:48:04 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:04 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:04 Send Done
2023/09/11 14:48:04 Recv First Byte
2023/09/11 14:48:05 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:05 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:05 Send Done
2023/09/11 14:48:05 Recv First Byte
2023/09/11 14:48:06 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:06 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:06 Send Done
2023/09/11 14:48:06 Recv First Byte
2023/09/11 14:48:07 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:07 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:07 Send Done
2023/09/11 14:48:07 Recv First Byte
2023/09/11 14:48:08 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:08 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:08 Send Done
2023/09/11 14:48:08 Recv First Byte
2023/09/11 14:48:09 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:09 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:09 Send Done
2023/09/11 14:48:09 Recv First Byte
2023/09/11 14:48:10 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:10 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:10 Send Done
2023/09/11 14:48:10 Recv First Byte
2023/09/11 14:48:11 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:11 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:11 Send Done
2023/09/11 14:48:11 Recv First Byte
2023/09/11 14:48:12 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:12 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:12 Send Done
2023/09/11 14:48:12 Recv First Byte
2023/09/11 14:48:13 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:13 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:13 Send Done
2023/09/11 14:48:13 Recv First Byte
2023/09/11 14:48:14 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:14 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:14 Send Done
2023/09/11 14:48:14 Recv First Byte
2023/09/11 14:48:15 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:15 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:15 Send Done
2023/09/11 14:48:15 Recv First Byte
2023/09/11 14:48:16 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:16 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:16 Send Done
2023/09/11 14:48:16 Recv First Byte
2023/09/11 14:48:17 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:17 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:17 Send Done
2023/09/11 14:48:17 Recv First Byte
2023/09/11 14:48:18 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:18 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:18 Send Done
2023/09/11 14:48:18 Recv First Byte
2023/09/11 14:48:19 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:19 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:19 Send Done
2023/09/11 14:48:19 Recv First Byte
2023/09/11 14:48:20 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:20 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:20 Send Done
2023/09/11 14:48:20 Recv First Byte
2023/09/11 14:48:21 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:21 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:21 Send Done
2023/09/11 14:48:21 Recv First Byte
2023/09/11 14:48:22 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:22 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:22 Send Done
2023/09/11 14:48:22 Recv First Byte
2023/09/11 14:48:23 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:23 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:23 Send Done
2023/09/11 14:48:23 Recv First Byte
2023/09/11 14:48:24 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:24 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:24 Send Done
2023/09/11 14:48:24 Recv First Byte
2023/09/11 14:48:25 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:25 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:25 Send Done
2023/09/11 14:48:25 Recv First Byte
2023/09/11 14:48:26 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:26 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:26 Send Done
2023/09/11 14:48:26 Recv First Byte
2023/09/11 14:48:27 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:27 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:27 Send Done
2023/09/11 14:48:27 Recv First Byte
2023/09/11 14:48:28 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:28 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:28 Send Done
2023/09/11 14:48:28 Recv First Byte
2023/09/11 14:48:29 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:29 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:29 Send Done
2023/09/11 14:48:29 Recv First Byte
2023/09/11 14:48:30 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:30 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:30 Send Done
2023/09/11 14:48:30 Recv First Byte
2023/09/11 14:48:31 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:31 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:31 Send Done
2023/09/11 14:48:31 Recv First Byte
2023/09/11 14:48:32 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:32 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:32 Send Done
2023/09/11 14:48:32 Recv First Byte
2023/09/11 14:48:33 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:33 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:33 Send Done
2023/09/11 14:48:33 Recv First Byte
2023/09/11 14:48:34 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:34 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:34 Send Done
2023/09/11 14:48:34 Recv First Byte
2023/09/11 14:48:35 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:35 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:35 Send Done
2023/09/11 14:48:35 Recv First Byte
2023/09/11 14:48:36 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:36 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:36 Send Done
2023/09/11 14:48:36 Recv First Byte
2023/09/11 14:48:37 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:37 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:37 Send Done
2023/09/11 14:48:37 Recv First Byte
2023/09/11 14:48:38 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:38 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:38 Send Done
2023/09/11 14:48:38 Recv First Byte
2023/09/11 14:48:39 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:39 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:39 Send Done
2023/09/11 14:48:39 Recv First Byte
2023/09/11 14:48:40 Sent Header: Host [api.moby.localhost]
2023/09/11 14:48:40 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/11 14:48:40 Send Done
2023/09/11 14:48:40 Recv First Byte
database is not healthy
mini@pop-os:~/projects/project-exerio$ 

This the the shadow postgres logs

mini@pop-os:~/projects/project-exerio$ docker logs sad_black -f
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with this locale configuration:
  provider:    libc
  LC_COLLATE:  C.UTF-8
  LC_CTYPE:    C.UTF-8
  LC_MESSAGES: en_US.UTF-8
  LC_MONETARY: en_US.UTF-8
  LC_NUMERIC:  en_US.UTF-8
  LC_TIME:     en_US.UTF-8
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok


Success. You can now start the database server using:

    pg_ctl -D /var/lib/postgresql/data -l logfile start

initdb: warning: enabling "trust" authentication for local connections
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.
waiting for server to start.... 2023-09-11 09:18:33.408 UTC [71] LOG:  pgaudit extension initialized
 2023-09-11 09:18:33.447 UTC [71] LOG:  pgsodium primary server secret key loaded
 2023-09-11 09:18:33.656 UTC [71] LOG:  starting PostgreSQL 15.1 (Ubuntu 15.1-1.pgdg20.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, 64-bit
 2023-09-11 09:18:33.821 UTC [71] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
. 2023-09-11 09:18:34.250 UTC [80] LOG:  database system was shut down at 2023-09-11 09:18:09 UTC
 2023-09-11 09:18:34.575 UTC [83] LOG:  TimescaleDB background worker launcher connected to shared catalogs
 2023-09-11 09:18:34.576 UTC [71] LOG:  database system is ready to accept connections
 done
server started
 2023-09-11 09:18:34.817 UTC [85] LOG:  pg_cron scheduler started

/usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/init-scripts

/usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/migrate.sh
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/init-scripts/00-schema.sql
CREATE ROLE
REVOKE
CREATE SCHEMA
CREATE FUNCTION
REVOKE
GRANT
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/init-scripts/00000000000000-initial-schema.sql
CREATE PUBLICATION
CREATE ROLE
ALTER ROLE
CREATE ROLE
CREATE ROLE
GRANT ROLE
CREATE SCHEMA
CREATE EXTENSION
CREATE EXTENSION
CREATE EXTENSION
CREATE ROLE
CREATE ROLE
CREATE ROLE
CREATE ROLE
GRANT ROLE
GRANT ROLE
GRANT ROLE
GRANT ROLE
GRANT
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
GRANT
ALTER ROLE
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER ROLE
ALTER ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/init-scripts/00000000000001-auth-schema.sql
CREATE SCHEMA
CREATE TABLE
CREATE INDEX
CREATE INDEX
COMMENT
CREATE TABLE
CREATE INDEX
CREATE INDEX
CREATE INDEX
COMMENT
CREATE TABLE
COMMENT
CREATE TABLE
CREATE INDEX
COMMENT
CREATE TABLE
COMMENT
INSERT 0 7

It seems to me that it suddently ended on INSERT 0 7 which led to database not healthy. The only changes i made in local studio ui was creating new table called temp with default columns

@AyushSehrawat
Copy link
Author

@sweatybridge Can you look into the issue? Not sure what's the issue if not the timeout

@SebasScript
Copy link

having the same problem running

supabase db diff

on windows 11. Sometimes the diffing works but most of the time i am getting database ins not healthy

@Sammy-T
Copy link

Sammy-T commented Sep 15, 2023

@sweatybridge I think it would probably be a good idea to re-open this issue's status while this continues to be unresolved.

@sweatybridge
Copy link
Contributor

It still looks like a timeout issue to me. How much resources did you allocate to docker desktop?

Screenshot 2023-09-15 at 5 04 43 PM

@AyushSehrawat
Copy link
Author

@sweatybridge I don't use Docker Desktop, only cli commands. And yes, this looks like timeout issue but i am not sure if it took 40s for this to give database is not healthy.

mini@pop-os:~$ docker info
Client: Docker Engine - Community
 Version:    24.0.6
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.11.2
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.21.0
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 1
  Running: 0
  Paused: 0
  Stopped: 1
 Images: 1
 Server Version: 24.0.6
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 8165feabfdfe38c65b599c4993d227328c231fca
 runc version: v1.1.8-0-g82f18fe
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
 Kernel Version: 6.4.6-76060406-generic
 Operating System: Pop!_OS 22.04 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 8
 Total Memory: 13.52GiB
 Name: pop-os
 ID: edf76afa-643e-4609-b6f9-77bbcf96b033
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

@Sammy-T
Copy link

Sammy-T commented Sep 15, 2023

I have Docker configured to use WSL 2 backend which should have the following resources available:

CPUs: 4
Total Memory: 24.95GiB
Swap: 7GiB

@SebasScript
Copy link

memory=8GB
processors=4
swap=4GB

db diff is sometime working but fails most of the time with datase is not healthy

@AyushSehrawat
Copy link
Author

memory=8GB
processors=4
swap=4GB

db diff is sometime working but fails most of the time with datase is not healthy

It's probably due to timeout issue too i guess. You can see the logs, run db diff with --debug and in another terminal run docker logs -f <name>, name from docker ps

@sweatybridge
Copy link
Contributor

but i am not sure if it took 40s for this to give database is not healthy

Could you try running time supabase db diff to check if the command took 40s? I will also increase the diff timeout further to see if it helps. #1500

@AyushSehrawat
Copy link
Author

but i am not sure if it took 40s for this to give database is not healthy

Could you try running time supabase db diff to check if the command took 40s? I will also increase the diff timeout further to see if it helps. #1500

I will try in a few minutes 👍

@AyushSehrawat
Copy link
Author

@sweatybridge Error response from daemon: manifest for public.ecr.aws/supabase/postgrest:v11.2.0 not found: manifest unknown: Requested image not found

Issue on supabase@beta (1.99.2). I guess due to new file called rest-version. Which version should i downgrade it to ?

@AyushSehrawat
Copy link
Author

AyushSehrawat commented Sep 18, 2023

Using v11.1.0 for now

@AyushSehrawat
Copy link
Author

1st run

2023/09/18 09:44:44 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/18 09:44:44 Send Done
2023/09/18 09:44:46 Recv First Byte
Finished supabase db diff on branch main.

WARNING: The diff tool is not foolproof, so you may need to manually rearrange and modify the generated migration.
Run supabase db reset to verify that the new migration does not generate errors.


real    2m24.602s
user    0m1.327s
sys     0m0.210s

2nd run

2023/09/18 09:47:25 Sent Header: Host [api.moby.localhost]
2023/09/18 09:47:25 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/18 09:47:25 Send Done
2023/09/18 09:47:28 Recv First Byte
Finished supabase db diff on branch main.

WARNING: The diff tool is not foolproof, so you may need to manually rearrange and modify the generated migration.
Run supabase db reset to verify that the new migration does not generate errors.


real    2m10.561s
user    0m1.320s
sys     0m0.253s

But there is issue with db reset now

mini@pop-os:~/projects/project-exerio$ time npx supabase@beta db reset
Resetting local database...
Recreating database...
database is not healthy
Try rerunning the command with --debug to troubleshoot the error.

real    0m49.982s
user    0m1.283s
sys     0m0.157s
2023/09/18 09:56:25 Recv First Byte
2023/09/18 09:56:26 Sent Header: Host [api.moby.localhost]
2023/09/18 09:56:26 Sent Header: User-Agent [Docker-Client/unknown-version (linux)]
2023/09/18 09:56:26 Send Done
2023/09/18 09:56:26 Recv First Byte
database is not healthy

real    0m47.487s
user    0m1.265s
sys     0m0.187s

The docker logs of supabase_db_<name> ends with

PostgreSQL init process complete; ready for start up.

2023-09-18 04:26:19.758 UTC [9] LOG:  pgaudit extension initialized
2023-09-18 04:26:19.775 UTC [9] LOG:  pgsodium primary server secret key loaded
2023-09-18 04:26:19.957 UTC [9] LOG:  starting PostgreSQL 15.1 (Ubuntu 15.1-1.pgdg20.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, 64-bit
2023-09-18 04:26:19.957 UTC [9] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2023-09-18 04:26:19.957 UTC [9] LOG:  listening on IPv6 address "::", port 5432
2023-09-18 04:26:20.189 UTC [9] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2023-09-18 04:26:20.436 UTC [166] LOG:  database system was shut down at 2023-09-18 04:26:19 UTC
172.20.0.6 2023-09-18 04:26:20.450 UTC [167] supabase_admin@postgres FATAL:  the database system is starting up
2023-09-18 04:26:20.589 UTC [170] LOG:  TimescaleDB background worker launcher connected to shared catalogs
2023-09-18 04:26:20.591 UTC [9] LOG:  database system is ready to accept connections
2023-09-18 04:26:20.594 UTC [172] LOG:  pg_cron scheduler started
``` which seems to be normal ig, issue is with timeout again

@sweatybridge
Copy link
Contributor

sweatybridge commented Sep 18, 2023

Seems like 2m is a sweet spot for your machine. There's probably some performance problem with docker on your machine for start up to take this long. But since faster hosts are unaffected by this timeout, I will just increase it to 2m.

@AyushSehrawat
Copy link
Author

@sweatybridge Idk from which time to which timeout is calculated on, but those command ran perfectly fine, supabase db diff worked without errors.

See the another issue with db reset now, issue occurred in it just after 40+ seconds.

Ig you need to increase db reset time too 🤔.

I installed Docker using official guide so not sure what's the issue for it to be slow

@AyushSehrawat
Copy link
Author

@sweatybridge Did you find the issue ?

@monsoir
Copy link

monsoir commented Sep 25, 2023

Still having the issue here

database is not healthy

Below is the info.
But I wonder, if it's a timeout problem, may I have a custom timeout flag or something like that?
Thank you!

Supabase CLI version: 1.99.5

Host resources:
Processor: 3 GHz 6-Core Intel Core i5
Memory: 32 GB

Docker version: Docker version 24.0.6, build ed223bc

Docker Desktop version: 4.23.0 (120376)

Docker config:
image

More info:
I have redirected the Docker data to an external drive, and it has 60+GB spared space. It works fine with other containers, probably not the cause? Just saying.

Logs:

Supabase CLI 1.99.5
2023/09/25 21:02:59 Sent Header: Host [api.moby.localhost]
2023/09/25 21:02:59 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:02:59 Send Done
2023/09/25 21:02:59 Recv First Byte
2023/09/25 21:02:59 Sent Header: Host [api.moby.localhost]
2023/09/25 21:02:59 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:02:59 Send Done
2023/09/25 21:03:04 Recv First Byte
2023/09/25 21:03:04 Sent Header: Host [api.moby.localhost]
2023/09/25 21:03:04 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:03:04 Send Done
2023/09/25 21:03:04 Recv First Byte
2023/09/25 21:03:04 Sent Header: Host [api.moby.localhost]
2023/09/25 21:03:04 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:03:04 Send Done
2023/09/25 21:03:04 Recv First Byte
2023/09/25 21:03:04 Sent Header: Host [api.moby.localhost]
2023/09/25 21:03:04 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:03:04 Sent Header: Content-Length [306]
2023/09/25 21:03:04 Sent Header: Content-Type [application/json]
2023/09/25 21:03:04 Send Done
2023/09/25 21:03:04 Recv First Byte
2023/09/25 21:03:04 Sent Header: Host [api.moby.localhost]
2023/09/25 21:03:04 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:03:04 Sent Header: Content-Length [11824]
2023/09/25 21:03:04 Sent Header: Content-Type [application/json]
2023/09/25 21:03:04 Send Done
2023/09/25 21:08:01 Recv First Byte
2023/09/25 21:08:01 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:01 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:01 Sent Header: Content-Length [0]
2023/09/25 21:08:01 Sent Header: Content-Type [text/plain]
2023/09/25 21:08:01 Send Done
2023/09/25 21:08:02 Recv First Byte
2023/09/25 21:08:02 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:02 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:02 Send Done
2023/09/25 21:08:02 Recv First Byte
2023/09/25 21:08:03 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:03 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:03 Send Done
2023/09/25 21:08:03 Recv First Byte
2023/09/25 21:08:04 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:04 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:04 Send Done
2023/09/25 21:08:04 Recv First Byte
2023/09/25 21:08:05 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:05 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:05 Send Done
2023/09/25 21:08:05 Recv First Byte
2023/09/25 21:08:06 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:06 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:06 Send Done
2023/09/25 21:08:06 Recv First Byte
2023/09/25 21:08:07 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:07 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:07 Send Done
2023/09/25 21:08:07 Recv First Byte
2023/09/25 21:08:08 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:08 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:08 Send Done
2023/09/25 21:08:08 Recv First Byte
2023/09/25 21:08:09 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:09 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:09 Send Done
2023/09/25 21:08:09 Recv First Byte
2023/09/25 21:08:10 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:10 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:10 Send Done
2023/09/25 21:08:10 Recv First Byte
2023/09/25 21:08:11 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:11 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:11 Send Done
2023/09/25 21:08:11 Recv First Byte
2023/09/25 21:08:12 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:12 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:12 Send Done
2023/09/25 21:08:12 Recv First Byte
2023/09/25 21:08:13 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:13 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:13 Send Done
2023/09/25 21:08:13 Recv First Byte
2023/09/25 21:08:14 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:14 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:14 Send Done
2023/09/25 21:08:14 Recv First Byte
2023/09/25 21:08:15 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:15 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:15 Send Done
2023/09/25 21:08:15 Recv First Byte
2023/09/25 21:08:16 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:16 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:16 Send Done
2023/09/25 21:08:16 Recv First Byte
2023/09/25 21:08:17 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:17 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:17 Send Done
2023/09/25 21:08:17 Recv First Byte
2023/09/25 21:08:18 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:18 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:18 Send Done
2023/09/25 21:08:18 Recv First Byte
2023/09/25 21:08:19 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:19 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:19 Send Done
2023/09/25 21:08:19 Recv First Byte
2023/09/25 21:08:20 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:20 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:20 Send Done
2023/09/25 21:08:20 Recv First Byte
2023/09/25 21:08:21 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:21 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:21 Send Done
2023/09/25 21:08:21 Recv First Byte
2023/09/25 21:08:22 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:22 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:22 Send Done
2023/09/25 21:08:22 Recv First Byte
2023/09/25 21:08:23 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:23 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:23 Send Done
2023/09/25 21:08:23 Recv First Byte
2023/09/25 21:08:24 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:24 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:24 Send Done
2023/09/25 21:08:24 Recv First Byte
2023/09/25 21:08:25 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:25 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:25 Send Done
2023/09/25 21:08:25 Recv First Byte
2023/09/25 21:08:26 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:26 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:26 Send Done
2023/09/25 21:08:26 Recv First Byte
2023/09/25 21:08:27 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:27 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:27 Send Done
2023/09/25 21:08:27 Recv First Byte
2023/09/25 21:08:28 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:28 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:28 Send Done
2023/09/25 21:08:28 Recv First Byte
2023/09/25 21:08:29 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:29 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:29 Send Done
2023/09/25 21:08:29 Recv First Byte
2023/09/25 21:08:30 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:30 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:30 Send Done
2023/09/25 21:08:30 Recv First Byte
2023/09/25 21:08:31 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:31 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:31 Send Done
2023/09/25 21:08:31 Recv First Byte
2023/09/25 21:08:32 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:32 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:32 Send Done
2023/09/25 21:08:32 Recv First Byte
2023/09/25 21:08:33 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:33 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:33 Send Done
2023/09/25 21:08:33 Recv First Byte
2023/09/25 21:08:34 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:34 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:34 Send Done
2023/09/25 21:08:34 Recv First Byte
2023/09/25 21:08:35 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:35 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:35 Send Done
2023/09/25 21:08:35 Recv First Byte
2023/09/25 21:08:36 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:36 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:36 Send Done
2023/09/25 21:08:36 Recv First Byte
2023/09/25 21:08:37 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:37 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:37 Send Done
2023/09/25 21:08:37 Recv First Byte
2023/09/25 21:08:38 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:38 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:38 Send Done
2023/09/25 21:08:38 Recv First Byte
2023/09/25 21:08:39 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:39 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:39 Send Done
2023/09/25 21:08:39 Recv First Byte
2023/09/25 21:08:40 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:40 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:40 Send Done
2023/09/25 21:08:40 Recv First Byte
2023/09/25 21:08:41 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:41 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:41 Send Done
2023/09/25 21:08:41 Recv First Byte
2023/09/25 21:08:42 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:42 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:42 Send Done
2023/09/25 21:08:42 Recv First Byte
2023/09/25 21:08:43 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:43 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:43 Send Done
2023/09/25 21:08:43 Recv First Byte
2023/09/25 21:08:44 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:44 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:44 Send Done
2023/09/25 21:08:44 Recv First Byte
2023/09/25 21:08:45 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:45 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:45 Send Done
2023/09/25 21:08:45 Recv First Byte
2023/09/25 21:08:46 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:46 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:46 Send Done
2023/09/25 21:08:46 Recv First Byte
2023/09/25 21:08:47 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:47 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:47 Send Done
2023/09/25 21:08:47 Recv First Byte
2023/09/25 21:08:48 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:48 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:48 Send Done
2023/09/25 21:08:48 Recv First Byte
2023/09/25 21:08:49 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:49 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:49 Send Done
2023/09/25 21:08:49 Recv First Byte
2023/09/25 21:08:50 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:50 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:50 Send Done
2023/09/25 21:08:50 Recv First Byte
2023/09/25 21:08:51 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:51 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:51 Send Done
2023/09/25 21:08:51 Recv First Byte
2023/09/25 21:08:52 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:52 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:52 Send Done
2023/09/25 21:08:52 Recv First Byte
2023/09/25 21:08:53 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:53 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:53 Send Done
2023/09/25 21:08:53 Recv First Byte
2023/09/25 21:08:54 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:54 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:54 Send Done
2023/09/25 21:08:54 Recv First Byte
2023/09/25 21:08:55 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:55 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:55 Send Done
2023/09/25 21:08:55 Recv First Byte
2023/09/25 21:08:56 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:56 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:56 Send Done
2023/09/25 21:08:56 Recv First Byte
2023/09/25 21:08:57 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:57 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:57 Send Done
2023/09/25 21:08:57 Recv First Byte
2023/09/25 21:08:58 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:58 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:58 Send Done
2023/09/25 21:08:58 Recv First Byte
2023/09/25 21:08:59 Sent Header: Host [api.moby.localhost]
2023/09/25 21:08:59 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:08:59 Send Done
2023/09/25 21:08:59 Recv First Byte
2023/09/25 21:09:00 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:00 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:00 Send Done
2023/09/25 21:09:00 Recv First Byte
2023/09/25 21:09:01 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:01 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:01 Send Done
2023/09/25 21:09:01 Recv First Byte
2023/09/25 21:09:02 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:02 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:02 Send Done
2023/09/25 21:09:02 Recv First Byte
2023/09/25 21:09:03 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:03 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:03 Send Done
2023/09/25 21:09:03 Recv First Byte
2023/09/25 21:09:04 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:04 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:04 Send Done
2023/09/25 21:09:04 Recv First Byte
2023/09/25 21:09:05 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:05 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:05 Send Done
2023/09/25 21:09:05 Recv First Byte
2023/09/25 21:09:06 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:06 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:06 Send Done
2023/09/25 21:09:06 Recv First Byte
2023/09/25 21:09:07 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:07 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:07 Send Done
2023/09/25 21:09:07 Recv First Byte
2023/09/25 21:09:08 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:08 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:08 Send Done
2023/09/25 21:09:08 Recv First Byte
2023/09/25 21:09:09 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:09 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:09 Send Done
2023/09/25 21:09:09 Recv First Byte
2023/09/25 21:09:10 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:10 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:10 Send Done
2023/09/25 21:09:10 Recv First Byte
2023/09/25 21:09:11 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:11 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:11 Send Done
2023/09/25 21:09:11 Recv First Byte
2023/09/25 21:09:12 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:12 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:12 Send Done
2023/09/25 21:09:12 Recv First Byte
2023/09/25 21:09:13 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:13 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:13 Send Done
2023/09/25 21:09:13 Recv First Byte
2023/09/25 21:09:14 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:14 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:14 Send Done
2023/09/25 21:09:14 Recv First Byte
2023/09/25 21:09:15 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:15 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:15 Send Done
2023/09/25 21:09:15 Recv First Byte
2023/09/25 21:09:16 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:16 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:16 Send Done
2023/09/25 21:09:16 Recv First Byte
2023/09/25 21:09:17 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:17 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:17 Send Done
2023/09/25 21:09:17 Recv First Byte
2023/09/25 21:09:18 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:18 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:18 Send Done
2023/09/25 21:09:18 Recv First Byte
2023/09/25 21:09:19 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:19 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:19 Send Done
2023/09/25 21:09:19 Recv First Byte
2023/09/25 21:09:20 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:20 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:20 Send Done
2023/09/25 21:09:20 Recv First Byte
2023/09/25 21:09:21 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:21 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:21 Send Done
2023/09/25 21:09:21 Recv First Byte
2023/09/25 21:09:22 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:22 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:22 Send Done
2023/09/25 21:09:22 Recv First Byte
2023/09/25 21:09:23 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:23 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:23 Send Done
2023/09/25 21:09:23 Recv First Byte
2023/09/25 21:09:24 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:24 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:24 Send Done
2023/09/25 21:09:24 Recv First Byte
2023/09/25 21:09:25 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:25 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:25 Send Done
2023/09/25 21:09:25 Recv First Byte
2023/09/25 21:09:26 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:26 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:26 Send Done
2023/09/25 21:09:26 Recv First Byte
2023/09/25 21:09:27 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:27 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:27 Send Done
2023/09/25 21:09:27 Recv First Byte
2023/09/25 21:09:28 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:28 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:28 Send Done
2023/09/25 21:09:28 Recv First Byte
2023/09/25 21:09:29 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:29 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:29 Send Done
2023/09/25 21:09:29 Recv First Byte
2023/09/25 21:09:30 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:30 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:30 Send Done
2023/09/25 21:09:30 Recv First Byte
2023/09/25 21:09:31 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:31 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:31 Send Done
2023/09/25 21:09:31 Recv First Byte
2023/09/25 21:09:32 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:32 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:32 Send Done
2023/09/25 21:09:32 Recv First Byte
2023/09/25 21:09:33 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:33 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:33 Send Done
2023/09/25 21:09:33 Recv First Byte
2023/09/25 21:09:34 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:34 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:34 Send Done
2023/09/25 21:09:34 Recv First Byte
2023/09/25 21:09:35 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:35 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:35 Send Done
2023/09/25 21:09:35 Recv First Byte
2023/09/25 21:09:36 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:36 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:36 Send Done
2023/09/25 21:09:36 Recv First Byte
2023/09/25 21:09:37 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:37 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:37 Send Done
2023/09/25 21:09:37 Recv First Byte
2023/09/25 21:09:38 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:38 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:38 Send Done
2023/09/25 21:09:38 Recv First Byte
2023/09/25 21:09:39 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:39 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:39 Send Done
2023/09/25 21:09:39 Recv First Byte
2023/09/25 21:09:40 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:40 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:40 Send Done
2023/09/25 21:09:40 Recv First Byte
2023/09/25 21:09:41 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:41 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:41 Send Done
2023/09/25 21:09:41 Recv First Byte
2023/09/25 21:09:42 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:42 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:42 Send Done
2023/09/25 21:09:42 Recv First Byte
2023/09/25 21:09:43 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:43 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:43 Send Done
2023/09/25 21:09:43 Recv First Byte
2023/09/25 21:09:44 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:44 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:44 Send Done
2023/09/25 21:09:44 Recv First Byte
2023/09/25 21:09:45 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:45 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:45 Send Done
2023/09/25 21:09:45 Recv First Byte
2023/09/25 21:09:46 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:46 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:46 Send Done
2023/09/25 21:09:46 Recv First Byte
2023/09/25 21:09:47 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:47 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:47 Send Done
2023/09/25 21:09:47 Recv First Byte
2023/09/25 21:09:48 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:48 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:48 Send Done
2023/09/25 21:09:48 Recv First Byte
2023/09/25 21:09:49 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:49 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:49 Send Done
2023/09/25 21:09:49 Recv First Byte
2023/09/25 21:09:50 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:50 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:50 Send Done
2023/09/25 21:09:50 Recv First Byte
2023/09/25 21:09:51 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:51 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:51 Send Done
2023/09/25 21:09:51 Recv First Byte
2023/09/25 21:09:52 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:52 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:52 Send Done
2023/09/25 21:09:52 Recv First Byte
2023/09/25 21:09:53 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:53 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:53 Send Done
2023/09/25 21:09:53 Recv First Byte
2023/09/25 21:09:54 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:54 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:54 Send Done
2023/09/25 21:09:54 Recv First Byte
2023/09/25 21:09:55 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:55 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:55 Send Done
2023/09/25 21:09:55 Recv First Byte
2023/09/25 21:09:56 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:56 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:56 Send Done
2023/09/25 21:09:56 Recv First Byte
2023/09/25 21:09:57 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:57 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:57 Send Done
2023/09/25 21:09:57 Recv First Byte
2023/09/25 21:09:58 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:58 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:58 Send Done
2023/09/25 21:09:58 Recv First Byte
2023/09/25 21:09:59 Sent Header: Host [api.moby.localhost]
2023/09/25 21:09:59 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:09:59 Send Done
2023/09/25 21:09:59 Recv First Byte
2023/09/25 21:10:00 Sent Header: Host [api.moby.localhost]
2023/09/25 21:10:00 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:10:00 Send Done
2023/09/25 21:10:00 Recv First Byte
2023/09/25 21:10:01 Sent Header: Host [api.moby.localhost]
2023/09/25 21:10:01 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/09/25 21:10:01 Send Done
2023/09/25 21:10:01 Recv First Byte
database is not healthy

@sweatybridge
Copy link
Contributor

@monsoir do you have the db container logs too? That would be helpful to know when the container stopped.

@monsoir
Copy link

monsoir commented Sep 25, 2023

Sorry for your inconvenience @sweatybridge .

It turns out there's a little tricky here. I have executed the command several times, but always prompts me no such container. When I nearly give up, something shows up. 🥲

It seems a lot of duplicated logs.
I have executed the command multiple times, in order not to miss any logs before the supabase start stops

command docker logs -f supabase_db_<project> outputs:

The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with this locale configuration:
  provider:    libc
  LC_COLLATE:  C.UTF-8
  LC_CTYPE:    C.UTF-8
  LC_MESSAGES: en_US.UTF-8
  LC_MONETARY: en_US.UTF-8
  LC_NUMERIC:  en_US.UTF-8
  LC_TIME:     en_US.UTF-8
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

initdb: warning: enabling "trust" authentication for local connections
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.

Success. You can now start the database server using:

    pg_ctl -D /var/lib/postgresql/data -l logfile start

waiting for server to start.... 2023-09-25 14:48:33.797 UTC [59] LOG:  pgaudit extension initialized
 2023-09-25 14:48:33.982 UTC [59] LOG:  pgsodium primary server secret key loaded
 2023-09-25 14:48:34.253 UTC [59] LOG:  starting PostgreSQL 15.1 (Ubuntu 15.1-1.pgdg20.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, 64-bit
 2023-09-25 14:48:34.266 UTC [59] LOG:  could not bind Unix address "/var/run/postgresql/.s.PGSQL.5432": Invalid argument
 2023-09-25 14:48:34.266 UTC [59] WARNING:  could not create Unix-domain socket in directory "/var/run/postgresql"
 2023-09-25 14:48:34.269 UTC [59] FATAL:  could not create any Unix-domain sockets
 2023-09-25 14:48:34.286 UTC [59] LOG:  database system is shut down
pg_ctl: could not start server
Examine the log output.
 stopped waiting

PostgreSQL Database directory appears to contain a database; Skipping initialization

 2023-09-25 14:48:37.057 UTC [9] LOG:  pgaudit extension initialized
 2023-09-25 14:48:37.146 UTC [9] LOG:  pgsodium primary server secret key loaded
 2023-09-25 14:48:37.213 UTC [9] LOG:  starting PostgreSQL 15.1 (Ubuntu 15.1-1.pgdg20.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, 64-bit
 2023-09-25 14:48:37.214 UTC [9] LOG:  listening on IPv4 address "0.0.0.0", port 5432
 2023-09-25 14:48:37.215 UTC [9] LOG:  listening on IPv6 address "::", port 5432
 2023-09-25 14:48:37.236 UTC [9] LOG:  could not bind Unix address "/var/run/postgresql/.s.PGSQL.5432": Invalid argument
 2023-09-25 14:48:37.236 UTC [9] WARNING:  could not create Unix-domain socket in directory "/var/run/postgresql"
 2023-09-25 14:48:37.237 UTC [9] FATAL:  could not create any Unix-domain sockets
 2023-09-25 14:48:37.256 UTC [9] LOG:  database system is shut down

PostgreSQL Database directory appears to contain a database; Skipping initialization

 2023-09-25 14:48:38.517 UTC [9] LOG:  pgaudit extension initialized
 2023-09-25 14:48:38.618 UTC [9] LOG:  pgsodium primary server secret key loaded
 2023-09-25 14:48:38.672 UTC [9] LOG:  starting PostgreSQL 15.1 (Ubuntu 15.1-1.pgdg20.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, 64-bit
 2023-09-25 14:48:38.673 UTC [9] LOG:  listening on IPv4 address "0.0.0.0", port 5432
 2023-09-25 14:48:38.673 UTC [9] LOG:  listening on IPv6 address "::", port 5432
 2023-09-25 14:48:38.691 UTC [9] LOG:  could not bind Unix address "/var/run/postgresql/.s.PGSQL.5432": Invalid argument
 2023-09-25 14:48:38.691 UTC [9] WARNING:  could not create Unix-domain socket in directory "/var/run/postgresql"
 2023-09-25 14:48:38.691 UTC [9] FATAL:  could not create any Unix-domain sockets
 2023-09-25 14:48:38.705 UTC [9] LOG:  database system is shut down

PostgreSQL Database directory appears to contain a database; Skipping initialization

 2023-09-25 14:48:40.217 UTC [9] LOG:  pgaudit extension initialized
 2023-09-25 14:48:40.305 UTC [9] LOG:  pgsodium primary server secret key loaded
 2023-09-25 14:48:40.360 UTC [9] LOG:  starting PostgreSQL 15.1 (Ubuntu 15.1-1.pgdg20.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, 64-bit
 2023-09-25 14:48:40.361 UTC [9] LOG:  listening on IPv4 address "0.0.0.0", port 5432
 2023-09-25 14:48:40.361 UTC [9] LOG:  listening on IPv6 address "::", port 5432
 2023-09-25 14:48:40.378 UTC [9] LOG:  could not bind Unix address "/var/run/postgresql/.s.PGSQL.5432": Invalid argument
 2023-09-25 14:48:40.378 UTC [9] WARNING:  could not create Unix-domain socket in directory "/var/run/postgresql"
 2023-09-25 14:48:40.378 UTC [9] FATAL:  could not create any Unix-domain sockets
 2023-09-25 14:48:40.393 UTC [9] LOG:  database system is shut down

PostgreSQL Database directory appears to contain a database; Skipping initialization

 2023-09-25 14:48:42.079 UTC [9] LOG:  pgaudit extension initialized
 2023-09-25 14:48:42.164 UTC [9] LOG:  pgsodium primary server secret key loaded
 2023-09-25 14:48:42.211 UTC [9] LOG:  starting PostgreSQL 15.1 (Ubuntu 15.1-1.pgdg20.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, 64-bit
 2023-09-25 14:48:42.212 UTC [9] LOG:  listening on IPv4 address "0.0.0.0", port 5432
 2023-09-25 14:48:42.212 UTC [9] LOG:  listening on IPv6 address "::", port 5432
 2023-09-25 14:48:42.225 UTC [9] LOG:  could not bind Unix address "/var/run/postgresql/.s.PGSQL.5432": Invalid argument
 2023-09-25 14:48:42.226 UTC [9] WARNING:  could not create Unix-domain socket in directory "/var/run/postgresql"
 2023-09-25 14:48:42.226 UTC [9] FATAL:  could not create any Unix-domain sockets
 2023-09-25 14:48:42.238 UTC [9] LOG:  database system is shut down

PostgreSQL Database directory appears to contain a database; Skipping initialization

 2023-09-25 14:48:44.696 UTC [8] LOG:  pgaudit extension initialized
 2023-09-25 14:48:44.770 UTC [8] LOG:  pgsodium primary server secret key loaded
 2023-09-25 14:48:44.819 UTC [8] LOG:  starting PostgreSQL 15.1 (Ubuntu 15.1-1.pgdg20.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, 64-bit
 2023-09-25 14:48:44.821 UTC [8] LOG:  listening on IPv4 address "0.0.0.0", port 5432
 2023-09-25 14:48:44.821 UTC [8] LOG:  listening on IPv6 address "::", port 5432
 2023-09-25 14:48:44.846 UTC [8] LOG:  could not bind Unix address "/var/run/postgresql/.s.PGSQL.5432": Invalid argument
 2023-09-25 14:48:44.846 UTC [8] WARNING:  could not create Unix-domain socket in directory "/var/run/postgresql"
 2023-09-25 14:48:44.846 UTC [8] FATAL:  could not create any Unix-domain sockets
 2023-09-25 14:48:44.860 UTC [8] LOG:  database system is shut down

PostgreSQL Database directory appears to contain a database; Skipping initialization

 2023-09-25 14:48:48.944 UTC [9] LOG:  pgaudit extension initialized
 2023-09-25 14:48:49.016 UTC [9] LOG:  pgsodium primary server secret key loaded
 2023-09-25 14:48:49.063 UTC [9] LOG:  starting PostgreSQL 15.1 (Ubuntu 15.1-1.pgdg20.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, 64-bit
 2023-09-25 14:48:49.064 UTC [9] LOG:  listening on IPv4 address "0.0.0.0", port 5432
 2023-09-25 14:48:49.064 UTC [9] LOG:  listening on IPv6 address "::", port 5432
 2023-09-25 14:48:49.077 UTC [9] LOG:  could not bind Unix address "/var/run/postgresql/.s.PGSQL.5432": Invalid argument
 2023-09-25 14:48:49.077 UTC [9] WARNING:  could not create Unix-domain socket in directory "/var/run/postgresql"
 2023-09-25 14:48:49.077 UTC [9] FATAL:  could not create any Unix-domain sockets
 2023-09-25 14:48:49.089 UTC [9] LOG:  database system is shut down

PostgreSQL Database directory appears to contain a database; Skipping initialization

 2023-09-25 14:48:56.365 UTC [9] LOG:  pgaudit extension initialized
 2023-09-25 14:48:56.444 UTC [9] LOG:  pgsodium primary server secret key loaded
 2023-09-25 14:48:56.493 UTC [9] LOG:  starting PostgreSQL 15.1 (Ubuntu 15.1-1.pgdg20.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, 64-bit
 2023-09-25 14:48:56.494 UTC [9] LOG:  listening on IPv4 address "0.0.0.0", port 5432
 2023-09-25 14:48:56.494 UTC [9] LOG:  listening on IPv6 address "::", port 5432
 2023-09-25 14:48:56.511 UTC [9] LOG:  could not bind Unix address "/var/run/postgresql/.s.PGSQL.5432": Invalid argument
 2023-09-25 14:48:56.511 UTC [9] WARNING:  could not create Unix-domain socket in directory "/var/run/postgresql"
 2023-09-25 14:48:56.512 UTC [9] FATAL:  could not create any Unix-domain sockets
 2023-09-25 14:48:56.526 UTC [9] LOG:  database system is shut down

PostgreSQL Database directory appears to contain a database; Skipping initialization

 2023-09-25 14:49:10.224 UTC [9] LOG:  pgaudit extension initialized
 2023-09-25 14:49:10.316 UTC [9] LOG:  pgsodium primary server secret key loaded
 2023-09-25 14:49:10.368 UTC [9] LOG:  starting PostgreSQL 15.1 (Ubuntu 15.1-1.pgdg20.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, 64-bit
 2023-09-25 14:49:10.370 UTC [9] LOG:  listening on IPv4 address "0.0.0.0", port 5432
 2023-09-25 14:49:10.370 UTC [9] LOG:  listening on IPv6 address "::", port 5432
 2023-09-25 14:49:10.390 UTC [9] LOG:  could not bind Unix address "/var/run/postgresql/.s.PGSQL.5432": Invalid argument
 2023-09-25 14:49:10.390 UTC [9] WARNING:  could not create Unix-domain socket in directory "/var/run/postgresql"
 2023-09-25 14:49:10.390 UTC [9] FATAL:  could not create any Unix-domain sockets
 2023-09-25 14:49:10.405 UTC [9] LOG:  database system is shut down

PostgreSQL Database directory appears to contain a database; Skipping initialization

 2023-09-25 14:49:36.814 UTC [9] LOG:  pgaudit extension initialized
 2023-09-25 14:49:36.895 UTC [9] LOG:  pgsodium primary server secret key loaded
 2023-09-25 14:49:36.943 UTC [9] LOG:  starting PostgreSQL 15.1 (Ubuntu 15.1-1.pgdg20.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, 64-bit
 2023-09-25 14:49:36.945 UTC [9] LOG:  listening on IPv4 address "0.0.0.0", port 5432
 2023-09-25 14:49:36.945 UTC [9] LOG:  listening on IPv6 address "::", port 5432
 2023-09-25 14:49:36.958 UTC [9] LOG:  could not bind Unix address "/var/run/postgresql/.s.PGSQL.5432": Invalid argument
 2023-09-25 14:49:36.958 UTC [9] WARNING:  could not create Unix-domain socket in directory "/var/run/postgresql"
 2023-09-25 14:49:36.958 UTC [9] FATAL:  could not create any Unix-domain sockets
 2023-09-25 14:49:36.971 UTC [9] LOG:  database system is shut down

@sweatybridge
Copy link
Contributor

sweatybridge commented Sep 26, 2023

That looks like a new error indeed. I've created a separate issue to track it #1526

Appreciate your help in getting the logs as it was useful. Let's continue our discussion in the new thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants