Giter VIP home page Giter VIP logo

Comments (40)

filipecabaco avatar filipecabaco commented on June 2, 2024 1

@TerminalFi and @ventsyv thank you for the feedback! Will check but indeed it's either something on the network or how we're starting up the containers 🤔

from realtime.

mrkpatchaa avatar mrkpatchaa commented on June 2, 2024 1

Hmm I don't know what I did but it's working now.... I'll try again to recreate everything from scratch and let you know what fixed the issue.
Thanks.

from realtime.

mrkpatchaa avatar mrkpatchaa commented on June 2, 2024 1

My case is self hosted to supabase_admin is used in the container env config.

   environment:
      PORT: 4000
      DB_HOST: ${POSTGRES_HOST}
      DB_PORT: ${POSTGRES_PORT}
      DB_USER: supabase_admin
      DB_PASSWORD: ${POSTGRES_PASSWORD}

I closed #713 because it's fixed now.

from realtime.

mrkpatchaa avatar mrkpatchaa commented on June 2, 2024 1

When creating the tenant, I needed to change db_user to supabase_admin to make it work.

curl -X POST \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer ****' \
  -d $'{
    "tenant" : {
      "name": "realtime-dev",
      "external_id": "realtime-dev",
      "jwt_secret": "****",
      "extensions": [
        {
          "type": "postgres_cdc_rls",
          "settings": {
            "db_name": "postgres",
            "db_host": "db",
            "db_user": "supabase_admin", <-- From my analysis this fixed my new issue.
            "db_password": "****",
            "db_port": "****",
            "region": "us-west-1",
            "poll_interval_ms": 100,
            "poll_max_record_bytes": 1048576,
            "ip_version": 4,
            "ssl_enforced": false <-- And of course this from Filipe
          }
        }
      ]
    }
  }' \
  http://localhost:4001/api/tenants

Now I am going to try on another env, where I cannot start from scratch 👀

@filipecabaco I just tested and without recreating everything from scratch if worked also. 🎆

from realtime.

ventsyv avatar ventsyv commented on June 2, 2024

Changing the DB image to supabase/postgres:15.1.0.103 and still getting the same error.
The DB image seems to be starting OK. I can connect to it via psql -h 0.0.0.0 -p 5432 -U postgres

from realtime.

ventsyv avatar ventsyv commented on June 2, 2024

Changing the host from host.docker.internal to localhost results in a different error:

realtime-server  | 19:59:56.071 [error] Postgrex.Protocol (#PID<0.136.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (localhost:5432): connection refused - :econnrefused

from realtime.

ventsyv avatar ventsyv commented on June 2, 2024

Adding

 extra_hosts:      
  - "host.docker.internal:host-gateway"

to the docker compose seems to have fixed the issue.

from realtime.

filipecabaco avatar filipecabaco commented on June 2, 2024

Hi @ventsyv

Thank you for reporting this. Going to check this issue as a priority.

Can you give me more details on what's your system information, mainly around your operating system and docker setup.

from realtime.

TerminalFi avatar TerminalFi commented on June 2, 2024

Happening to me as well. Preventing me from using supabase cli to run realtime
@filipecabaco

MacOS 14.1 (23B73)
Chip: Apple M1 Max

Client:
 Version:           24.0.6
 API version:       1.43
 Go version:        go1.20.7
 Git commit:        ed223bc
 Built:             Mon Sep  4 12:28:49 2023
 OS/Arch:           darwin/arm64
 Context:           orbstack

Server: Docker Engine - Community
 Engine:
  Version:          24.0.6
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.7
  Git commit:       1a79695
  Built:            Mon Sep  4 12:31:30 2023
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          v1.7.6
  GitCommit:        091922f03c2762540fd057fba91260237ff86acb
 runc:
  Version:          1.1.9
  GitCommit:        82f18fe0e44a59034f3e1f45e475fa5636e539aa
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

from realtime.

TerminalFi avatar TerminalFi commented on June 2, 2024

Or rather maybe a different issue

realtime-server  | Setting RLIMIT_NOFILE to 100000
realtime-db      | ************* 2023-10-22 22:27:29.389 UTC [40] postgres@postgres ERROR:  no schema has been selected to create in at character 28
realtime-db      | ************* 2023-10-22 22:27:29.389 UTC [40] postgres@postgres STATEMENT:  CREATE TABLE IF NOT EXISTS "schema_migrations" ("version" bigint, "inserted_at" timestamp(0), PRIMARY KEY ("version"))
realtime-server  | 22:27:29.396 [error] Could not create schema migrations table. This error usually happens due to the following:
realtime-server  |
realtime-server  |   * The database does not exist
realtime-server  |   * The "schema_migrations" table, which Ecto uses for managing
realtime-server  |     migrations, was defined by another library
realtime-server  |   * There is a deadlock while migrating (such as using concurrent
realtime-server  |     indexes with a migration_lock)
realtime-server  |
realtime-server  | To fix the first issue, run "mix ecto.create".
realtime-server  |
realtime-server  | To address the second, you can run "mix ecto.drop" followed by
realtime-server  | "mix ecto.create". Alternatively you may configure Ecto to use
realtime-server  | another table and/or repository for managing migrations:
realtime-server  |
realtime-server  |     config :realtime, Realtime.Repo,
realtime-server  |       migration_source: "some_other_table_for_schema_migrations",
realtime-server  |       migration_repo: AnotherRepoForSchemaMigrations
realtime-server  |
realtime-server  | The full error report is shown below.
realtime-server  |
realtime-server  | ** (Postgrex.Error) ERROR 3F000 (invalid_schema_name) no schema has been selected to create in
realtime-server  |     (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:932: Ecto.Adapters.SQL.raise_sql_call_error/1

from realtime.

ventsyv avatar ventsyv commented on June 2, 2024

I was using Ubuntu 22.04 on a Dell inspiron 5570. I believe it was running Docker 20.10
Unfortunately I'm no longer working that project so I don't have the exact setup.

I believe in my case the problem was that I needed to define the network so that the db service can be resolved correctly.

@TerminalFi
I have a ticket for a similar issue you are seeing but with logflare: Logflare/logflare#1714
I don't remember if that's what I ended up doing, but I think I just put everything up in the public schema

from realtime.

mrkpatchaa avatar mrkpatchaa commented on June 2, 2024

@filipecabaco I also have issue with self hosted but slightly different. I am getting ssl not available error.
I described the issue here #713
Thanks.
I am trying different setups since yesterday without success.

from realtime.

filipecabaco avatar filipecabaco commented on June 2, 2024

@mrkpatchaa I think that might have a different origin but will also check

@mrkpatchaa @TerminalFi @ventsyv do you remember how many cores you have allocated to your docker machine?

from realtime.

mrkpatchaa avatar mrkpatchaa commented on June 2, 2024

Hmmm I am running on a remote server. I really doubt I allocated something specific.
Here is the output of docker info

/var/data > docker info                                                                                     debian@ns344762 18:43:15
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
  scan: Docker Scan (Docker Inc.)
    Version:  v0.23.0
    Path:     /usr/libexec/docker/cli-plugins/docker-scan

Server:
 Containers: 21
  Running: 21
  Paused: 0
  Stopped: 0
 Images: 23
 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: systemd
 Cgroup Version: 2
 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
  cgroupns
 Kernel Version: 5.10.0-14-amd64
 Operating System: Debian GNU/Linux 11 (bullseye)
 OSType: linux
 Architecture: x86_64
 CPUs: 8
 Total Memory: 31.26GiB
 Name: ns344762
 ID: F5LN:3MK4:4SWD:UI5B:ECIP:R3Q5:5SKF:FU2K:GSEW:KZSE:HKTD:KD3D
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

And docker version

/var/data > docker version                                                                                  debian@ns344762 18:43:17
Client: Docker Engine - Community
 Version:           24.0.6
 API version:       1.43
 Go version:        go1.20.7
 Git commit:        ed223bc
 Built:             Mon Sep  4 12:32:16 2023
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          24.0.6
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.7
  Git commit:       1a79695
  Built:            Mon Sep  4 12:32:16 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.22
  GitCommit:        8165feabfdfe38c65b599c4993d227328c231fca
 runc:
  Version:          1.1.8
  GitCommit:        v1.1.8-0-g82f18fe
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

from realtime.

TerminalFi avatar TerminalFi commented on June 2, 2024

10 CPUS / Cores

from realtime.

ventsyv avatar ventsyv commented on June 2, 2024

from realtime.

mrkpatchaa avatar mrkpatchaa commented on June 2, 2024

@filipecabaco any news? Thanks.

from realtime.

filipecabaco avatar filipecabaco commented on June 2, 2024

Not yet sorry will pick this back up during the week

from realtime.

Shusanta avatar Shusanta commented on June 2, 2024

+1

from realtime.

androoo avatar androoo commented on June 2, 2024

I am also experiencing the same issue

from realtime.

filipecabaco avatar filipecabaco commented on June 2, 2024

I wasn't able to replicate but I do have a couple of actions to see if we can fix this issue or at least make it move forward.

First of all I've opened two PRs to bump the version of Realtime to the latest version in production:
supabase/cli#1653
supabase/supabase#18874

Second, that SSL error could be related with the fact that we've added a SSL verification that is true by default and there might be old data / tenants that can be hitting this wall

To fix this:

  1. Connect to the database with psql:
psql postgresql://supabase_admin:[email protected]:5432/postgres

Do check your psql port using docker ps and check the password your .env file for the password. I'm using the default values from .env.example from supabase/docker. In CLI the password would be postgres

  1. Run the following command to update all tenants with the ssl_enforced key to false
set search_path=_realtime;
UPDATE extensions SET settings = settings::jsonb || '{"ssl_enforced": false}'::jsonb;

Will keep trying replicating the issues found but do warn if this fixes part of the issues.

from realtime.

mrkpatchaa avatar mrkpatchaa commented on June 2, 2024

I tried the ssl_enforced false and I don't see ssl error anymore. Now I get this error : permission denied for schema realtime

Full log :

  | 11:56:59.498 project=my-realtime-dev external_id=my-realtime-dev [info] Applying migrations to db
  | 11:56:59.556 project=my-realtime-dev external_id=my-realtime-dev [error] Could not create schema migrations table. This error usually happens due to the following:
  | 
  |   * The database does not exist
  |   * The "schema_migrations" table, which Ecto uses for managing
  |     migrations, was defined by another library
  |   * There is a deadlock while migrating (such as using concurrent
  |     indexes with a migration_lock)
  | 
  | To fix the first issue, run "mix ecto.create".
  | 
  | To address the second, you can run "mix ecto.drop" followed by
  | "mix ecto.create". Alternatively you may configure Ecto to use
  | another table and/or repository for managing migrations:
  | 
  |     config :realtime, Realtime.Repo,
  |       migration_source: "some_other_table_for_schema_migrations",
  |       migration_repo: AnotherRepoForSchemaMigrations
  | 
  | The full error report is shown below.
  | 
  | 11:56:59.557 project=my-realtime-dev external_id=my-realtime-dev [error] Error starting Postgres Extention: {:error,
  |  {:shutdown,
  |   {:failed_to_start_child, Realtime.Tenants.Migrations,
  |    {%Postgrex.Error{
  |       message: nil,
  |       postgres: %{
  |         code: :insufficient_privilege,
  |         file: "aclchk.c",
  |         line: "3650",
  |         message: "permission denied for schema realtime",
  |         pg_code: "42501",
  |         position: "28",
  |         routine: "aclcheck_error",
  |         severity: "ERROR",
  |         unknown: "ERROR"
  |       },
  |       connection_id: 805602,
  |       query: nil
  |     },
  |     [
  |       {Ecto.Adapters.SQL, :raise_sql_call_error, 1,
  |        [
  |          file: 'lib/ecto/adapters/sql.ex',
  |          line: 932,
  |          error_info: %{module: Exception}
  |        ]},
  |       {Enum, :"-map/2-lists^map/1-0-", 2, [file: 'lib/enum.ex', line: 1658]},
  |       {Ecto.Adapters.SQL, :execute_ddl, 4,
  |        [file: 'lib/ecto/adapters/sql.ex', line: 1024]},
  |       {Ecto.Migrator, :verbose_schema_migration, 3,
  |        [file: 'lib/ecto/migrator.ex', line: 696]},
  |       {Ecto.Migrator, :lock_for_migrations, 4,
  |        [file: 'lib/ecto/migrator.ex', line: 510]},
  |       {Ecto.Migrator, :run, 4, [file: 'lib/ecto/migrator.ex', line: 422]},
  |       {Realtime.Repo, :with_dynamic_repo, 2,
  |        [file: 'lib/realtime/repo.ex', line: 12]},
  |       {Realtime.Tenants.Migrations, :init, 1,
  |        [file: 'lib/realtime/tenants/migrations.ex', line: 90]}
  |     ]}}}}
  | 11:56:59.603 [debug] Starting postgres stream extension with args: %{
  |   "db_host" => "QhixI0o7PYIABziLUL4f0A==",
  |   "db_name" => "sWBpZNdjggEPTQVlI52Zfw==",
  |   "db_password" => "***",
  |   "db_port" => "q2aah2pqWLpnzDBF7AhfLQ==",
  |   "db_socket_opts" => [:inet],
  |   "db_user" => "sWBpZNdjggEPTQVlI52Zfw==",
  |   "id" => "my-realtime-dev",
  |   "ip_version" => 4,
  |   "poll_interval_ms" => 100,
  |   "poll_max_changes" => 100,
  |   "poll_max_record_bytes" => 1048576,
  |   "publication" => "supabase_realtime",
  |   "region" => "us-west-1",
  |   "slot_name" => "supabase_realtime_replication_slot",
  |   "ssl_enforced" => false,
  |   "subs_pool_size" => 5
  | }
  | 11:56:59.605 project=my-realtime-dev external_id=my-realtime-dev [info] Applying migrations to db
^Ccanceled

from realtime.

mrkpatchaa avatar mrkpatchaa commented on June 2, 2024

I am using self hosted and I tried a fresh database install by removing my volumes/db/data folder and restarting everything.

from realtime.

filipecabaco avatar filipecabaco commented on June 2, 2024

That error seems to be related with the credentials used to access the tenant database so probably there was something not properly setup.

Cleaning all the state makes it work because it refreshed the state fully hence being tricky to replicate

I also hope that the newer version makes things more stable so I hope to get those merged soon

from realtime.

filipecabaco avatar filipecabaco commented on June 2, 2024

Ok just saw that at least CLI was merged 😁

from realtime.

mrkpatchaa avatar mrkpatchaa commented on June 2, 2024

When creating the tenant, I needed to change db_user to supabase_admin to make it work.

curl -X POST \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer ****' \
  -d $'{
    "tenant" : {
      "name": "realtime-dev",
      "external_id": "realtime-dev",
      "jwt_secret": "****",
      "extensions": [
        {
          "type": "postgres_cdc_rls",
          "settings": {
            "db_name": "postgres",
            "db_host": "db",
            "db_user": "supabase_admin", <-- From my analysis this fixed my new issue.
            "db_password": "****",
            "db_port": "****",
            "region": "us-west-1",
            "poll_interval_ms": 100,
            "poll_max_record_bytes": 1048576,
            "ip_version": 4,
            "ssl_enforced": false <-- And of course this from Filipe
          }
        }
      ]
    }
  }' \
  http://localhost:4001/api/tenants

Now I am going to try on another env, where I cannot start from scratch 👀

from realtime.

ventsyv avatar ventsyv commented on June 2, 2024

from realtime.

filipecabaco avatar filipecabaco commented on June 2, 2024

@ventsyv I think we have some hard coded elements with that user but I need to double check. If that is the case I'll do a PR to tackle it so it's fully configurable.

I'll get back at you with this today

from realtime.

filipecabaco avatar filipecabaco commented on June 2, 2024

I checked the code just to be sure and indeed it's not hard coded, the way @mrkpatchaa creates the tenant fixes the issue and would probably work for you @ventsyv

You could also update the entries with a similar command of the SSL false issue:

set search_path=_realtime;
UPDATE extensions SET settings = settings::jsonb || '{"db_user":"posters"}'::jsonb;

from realtime.

filipecabaco avatar filipecabaco commented on June 2, 2024

@TerminalFi could you please connect via psql to your instance and check what is the output of

select schema_name from information_schema.schemata;

from realtime.

filipecabaco avatar filipecabaco commented on June 2, 2024

FYI Supabase Docker compose for self hosted merged with the latest realtime version

from realtime.

filipecabaco avatar filipecabaco commented on June 2, 2024

Going to close this for now. Also be aware that we launched another bunch of fixes to our seed file that also seemed to create some of the issues described.

from realtime.

TerminalFi avatar TerminalFi commented on June 2, 2024
select schema_name from information_schema.schemata;
public
pgsodium_masks
pgsodium
graphql
graphql_public
realtime
auth
storage
supabase_migrations
extensions
information_schema
pg_catalog
pg_toast

from realtime.

filipecabaco avatar filipecabaco commented on June 2, 2024

from that list indeed it seems that you are missing the _realtime schema which leads me to believe the migration failed.

you are using this for local development? if so, since we did fixes to the seed file and overall setup, could you please try to pull the latest version of the docker compose file, delete all volumes with docker compose down --volumes and try again?

from realtime.

TerminalFi avatar TerminalFi commented on June 2, 2024

from that list indeed it seems that you are missing the _realtime schema which leads me to believe the migration failed.

you are using this for local development? if so, since we did fixes to the seed file and overall setup, could you please try to pull the latest version of the docker compose file, delete all volumes with docker compose down --volumes and try again?

I just deleted all the volumes and images and ran this

npx supabase start

and receive the following

Applying migration 20230528034317_rollup.sql...
Applying migration 20230703184404_deed_files.sql...
Applying migration 20230709031303_fix_uuid_defaults.sql...
Applying migration 20231018234252_sync.sql...
Seeding data supabase/seed.sql...
realtime-dev.supabase_realtime_app-ui container logs:
22:26:28.165 [error] Could not create schema migrations table. This error usually happens due to the following:

  * The database does not exist
  * The "schema_migrations" table, which Ecto uses for managing
    migrations, was defined by another library
  * There is a deadlock while migrating (such as using concurrent
    indexes with a migration_lock)

To fix the first issue, run "mix ecto.create".

To address the second, you can run "mix ecto.drop" followed by
"mix ecto.create". Alternatively you may configure Ecto to use
another table and/or repository for managing migrations:

    config :realtime, Realtime.Repo,
      migration_source: "some_other_table_for_schema_migrations",
      migration_repo: AnotherRepoForSchemaMigrations

The full error report is shown below.

** (Postgrex.Error) ERROR 3F000 (invalid_schema_name) no schema has been selected to create in
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:932: Ecto.Adapters.SQL.raise_sql_call_error/1
    (elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:1024: Ecto.Adapters.SQL.execute_ddl/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:696: Ecto.Migrator.verbose_schema_migration/3
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:510: Ecto.Migrator.lock_for_migrations/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:422: Ecto.Migrator.run/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:146: Ecto.Migrator.with_repo/3
    nofile:1: (file)
22:26:28.892 [error] Could not create schema migrations table. This error usually happens due to the following:

  * The database does not exist
  * The "schema_migrations" table, which Ecto uses for managing
    migrations, was defined by another library
  * There is a deadlock while migrating (such as using concurrent
    indexes with a migration_lock)

To fix the first issue, run "mix ecto.create".

To address the second, you can run "mix ecto.drop" followed by
"mix ecto.create". Alternatively you may configure Ecto to use
another table and/or repository for managing migrations:

    config :realtime, Realtime.Repo,
      migration_source: "some_other_table_for_schema_migrations",
      migration_repo: AnotherRepoForSchemaMigrations

The full error report is shown below.

** (Postgrex.Error) ERROR 3F000 (invalid_schema_name) no schema has been selected to create in
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:932: Ecto.Adapters.SQL.raise_sql_call_error/1
    (elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:1024: Ecto.Adapters.SQL.execute_ddl/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:696: Ecto.Migrator.verbose_schema_migration/3
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:510: Ecto.Migrator.lock_for_migrations/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:422: Ecto.Migrator.run/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:146: Ecto.Migrator.with_repo/3
    nofile:1: (file)
22:26:29.536 [error] Could not create schema migrations table. This error usually happens due to the following:

  * The database does not exist
  * The "schema_migrations" table, which Ecto uses for managing
    migrations, was defined by another library
  * There is a deadlock while migrating (such as using concurrent
    indexes with a migration_lock)

To fix the first issue, run "mix ecto.create".

To address the second, you can run "mix ecto.drop" followed by
"mix ecto.create". Alternatively you may configure Ecto to use
another table and/or repository for managing migrations:

    config :realtime, Realtime.Repo,
      migration_source: "some_other_table_for_schema_migrations",
      migration_repo: AnotherRepoForSchemaMigrations

The full error report is shown below.

** (Postgrex.Error) ERROR 3F000 (invalid_schema_name) no schema has been selected to create in
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:932: Ecto.Adapters.SQL.raise_sql_call_error/1
    (elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:1024: Ecto.Adapters.SQL.execute_ddl/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:696: Ecto.Migrator.verbose_schema_migration/3
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:510: Ecto.Migrator.lock_for_migrations/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:422: Ecto.Migrator.run/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:146: Ecto.Migrator.with_repo/3
    nofile:1: (file)
22:26:30.420 [error] Could not create schema migrations table. This error usually happens due to the following:

  * The database does not exist
  * The "schema_migrations" table, which Ecto uses for managing
    migrations, was defined by another library
  * There is a deadlock while migrating (such as using concurrent
    indexes with a migration_lock)

To fix the first issue, run "mix ecto.create".

To address the second, you can run "mix ecto.drop" followed by
"mix ecto.create". Alternatively you may configure Ecto to use
another table and/or repository for managing migrations:

    config :realtime, Realtime.Repo,
      migration_source: "some_other_table_for_schema_migrations",
      migration_repo: AnotherRepoForSchemaMigrations

The full error report is shown below.

** (Postgrex.Error) ERROR 3F000 (invalid_schema_name) no schema has been selected to create in
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:932: Ecto.Adapters.SQL.raise_sql_call_error/1
    (elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:1024: Ecto.Adapters.SQL.execute_ddl/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:696: Ecto.Migrator.verbose_schema_migration/3
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:510: Ecto.Migrator.lock_for_migrations/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:422: Ecto.Migrator.run/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:146: Ecto.Migrator.with_repo/3
    nofile:1: (file)
22:26:31.732 [error] Could not create schema migrations table. This error usually happens due to the following:

  * The database does not exist
  * The "schema_migrations" table, which Ecto uses for managing
    migrations, was defined by another library
  * There is a deadlock while migrating (such as using concurrent
    indexes with a migration_lock)

To fix the first issue, run "mix ecto.create".

To address the second, you can run "mix ecto.drop" followed by
"mix ecto.create". Alternatively you may configure Ecto to use
another table and/or repository for managing migrations:

    config :realtime, Realtime.Repo,
      migration_source: "some_other_table_for_schema_migrations",
      migration_repo: AnotherRepoForSchemaMigrations

The full error report is shown below.

** (Postgrex.Error) ERROR 3F000 (invalid_schema_name) no schema has been selected to create in
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:932: Ecto.Adapters.SQL.raise_sql_call_error/1
    (elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:1024: Ecto.Adapters.SQL.execute_ddl/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:696: Ecto.Migrator.verbose_schema_migration/3
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:510: Ecto.Migrator.lock_for_migrations/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:422: Ecto.Migrator.run/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:146: Ecto.Migrator.with_repo/3
    nofile:1: (file)
22:26:33.818 [error] Could not create schema migrations table. This error usually happens due to the following:

  * The database does not exist
  * The "schema_migrations" table, which Ecto uses for managing
    migrations, was defined by another library
  * There is a deadlock while migrating (such as using concurrent
    indexes with a migration_lock)

To fix the first issue, run "mix ecto.create".

To address the second, you can run "mix ecto.drop" followed by
"mix ecto.create". Alternatively you may configure Ecto to use
another table and/or repository for managing migrations:

    config :realtime, Realtime.Repo,
      migration_source: "some_other_table_for_schema_migrations",
      migration_repo: AnotherRepoForSchemaMigrations

The full error report is shown below.

** (Postgrex.Error) ERROR 3F000 (invalid_schema_name) no schema has been selected to create in
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:932: Ecto.Adapters.SQL.raise_sql_call_error/1
    (elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:1024: Ecto.Adapters.SQL.execute_ddl/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:696: Ecto.Migrator.verbose_schema_migration/3
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:510: Ecto.Migrator.lock_for_migrations/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:422: Ecto.Migrator.run/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:146: Ecto.Migrator.with_repo/3
    nofile:1: (file)
22:26:37.531 [error] Could not create schema migrations table. This error usually happens due to the following:

  * The database does not exist
  * The "schema_migrations" table, which Ecto uses for managing
    migrations, was defined by another library
  * There is a deadlock while migrating (such as using concurrent
    indexes with a migration_lock)

To fix the first issue, run "mix ecto.create".

To address the second, you can run "mix ecto.drop" followed by
"mix ecto.create". Alternatively you may configure Ecto to use
another table and/or repository for managing migrations:

    config :realtime, Realtime.Repo,
      migration_source: "some_other_table_for_schema_migrations",
      migration_repo: AnotherRepoForSchemaMigrations

The full error report is shown below.

** (Postgrex.Error) ERROR 3F000 (invalid_schema_name) no schema has been selected to create in
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:932: Ecto.Adapters.SQL.raise_sql_call_error/1
    (elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:1024: Ecto.Adapters.SQL.execute_ddl/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:696: Ecto.Migrator.verbose_schema_migration/3
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:510: Ecto.Migrator.lock_for_migrations/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:422: Ecto.Migrator.run/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:146: Ecto.Migrator.with_repo/3
    nofile:1: (file)
22:26:44.440 [error] Could not create schema migrations table. This error usually happens due to the following:

  * The database does not exist
  * The "schema_migrations" table, which Ecto uses for managing
    migrations, was defined by another library
  * There is a deadlock while migrating (such as using concurrent
    indexes with a migration_lock)

To fix the first issue, run "mix ecto.create".

To address the second, you can run "mix ecto.drop" followed by
"mix ecto.create". Alternatively you may configure Ecto to use
another table and/or repository for managing migrations:

    config :realtime, Realtime.Repo,
      migration_source: "some_other_table_for_schema_migrations",
      migration_repo: AnotherRepoForSchemaMigrations

The full error report is shown below.

** (Postgrex.Error) ERROR 3F000 (invalid_schema_name) no schema has been selected to create in
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:932: Ecto.Adapters.SQL.raise_sql_call_error/1
    (elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:1024: Ecto.Adapters.SQL.execute_ddl/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:696: Ecto.Migrator.verbose_schema_migration/3
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:510: Ecto.Migrator.lock_for_migrations/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:422: Ecto.Migrator.run/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:146: Ecto.Migrator.with_repo/3
    nofile:1: (file)
22:26:57.734 [error] Could not create schema migrations table. This error usually happens due to the following:

  * The database does not exist
  * The "schema_migrations" table, which Ecto uses for managing
    migrations, was defined by another library
  * There is a deadlock while migrating (such as using concurrent
    indexes with a migration_lock)

To fix the first issue, run "mix ecto.create".

To address the second, you can run "mix ecto.drop" followed by
"mix ecto.create". Alternatively you may configure Ecto to use
another table and/or repository for managing migrations:

    config :realtime, Realtime.Repo,
      migration_source: "some_other_table_for_schema_migrations",
      migration_repo: AnotherRepoForSchemaMigrations

The full error report is shown below.

** (Postgrex.Error) ERROR 3F000 (invalid_schema_name) no schema has been selected to create in
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:932: Ecto.Adapters.SQL.raise_sql_call_error/1
    (elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:1024: Ecto.Adapters.SQL.execute_ddl/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:696: Ecto.Migrator.verbose_schema_migration/3
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:510: Ecto.Migrator.lock_for_migrations/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:422: Ecto.Migrator.run/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:146: Ecto.Migrator.with_repo/3
    nofile:1: (file)
service not healthy: [realtime-dev.supabase_realtime_app-ui]
Try rerunning the command with --debug to troubleshoot the error.

from realtime.

filipecabaco avatar filipecabaco commented on June 2, 2024

@TerminalFi for some reason it seems that there's still some state in your machine 🤔

If it's ok and be careful because this will delete all docker images, networks and containers, could you run docker system prune --all --volumes ?

from realtime.

TerminalFi avatar TerminalFi commented on June 2, 2024

Still the same issue

14:42:26.298 [error] Could not create schema migrations table. This error usually happens due to the following:

  * The database does not exist
  * The "schema_migrations" table, which Ecto uses for managing
    migrations, was defined by another library
  * There is a deadlock while migrating (such as using concurrent
    indexes with a migration_lock)

To fix the first issue, run "mix ecto.create".

To address the second, you can run "mix ecto.drop" followed by
"mix ecto.create". Alternatively you may configure Ecto to use
another table and/or repository for managing migrations:

    config :realtime, Realtime.Repo,
      migration_source: "some_other_table_for_schema_migrations",
      migration_repo: AnotherRepoForSchemaMigrations

The full error report is shown below.

** (Postgrex.Error) ERROR 3F000 (invalid_schema_name) no schema has been selected to create in
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:932: Ecto.Adapters.SQL.raise_sql_call_error/1
    (elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:1024: Ecto.Adapters.SQL.execute_ddl/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:696: Ecto.Migrator.verbose_schema_migration/3
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:510: Ecto.Migrator.lock_for_migrations/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:422: Ecto.Migrator.run/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:146: Ecto.Migrator.with_repo/3
    nofile:1: (file)
14:42:26.834 [error] Could not create schema migrations table. This error usually happens due to the following:

  * The database does not exist
  * The "schema_migrations" table, which Ecto uses for managing
    migrations, was defined by another library
  * There is a deadlock while migrating (such as using concurrent
    indexes with a migration_lock)

To fix the first issue, run "mix ecto.create".

To address the second, you can run "mix ecto.drop" followed by
"mix ecto.create". Alternatively you may configure Ecto to use
another table and/or repository for managing migrations:

    config :realtime, Realtime.Repo,
      migration_source: "some_other_table_for_schema_migrations",
      migration_repo: AnotherRepoForSchemaMigrations

The full error report is shown below.

** (Postgrex.Error) ERROR 3F000 (invalid_schema_name) no schema has been selected to create in
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:932: Ecto.Adapters.SQL.raise_sql_call_error/1
    (elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:1024: Ecto.Adapters.SQL.execute_ddl/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:696: Ecto.Migrator.verbose_schema_migration/3
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:510: Ecto.Migrator.lock_for_migrations/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:422: Ecto.Migrator.run/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:146: Ecto.Migrator.with_repo/3
    nofile:1: (file)
14:42:27.486 [error] Could not create schema migrations table. This error usually happens due to the following:

  * The database does not exist
  * The "schema_migrations" table, which Ecto uses for managing
    migrations, was defined by another library
  * There is a deadlock while migrating (such as using concurrent
    indexes with a migration_lock)

To fix the first issue, run "mix ecto.create".

To address the second, you can run "mix ecto.drop" followed by
"mix ecto.create". Alternatively you may configure Ecto to use
another table and/or repository for managing migrations:

    config :realtime, Realtime.Repo,
      migration_source: "some_other_table_for_schema_migrations",
      migration_repo: AnotherRepoForSchemaMigrations

The full error report is shown below.

** (Postgrex.Error) ERROR 3F000 (invalid_schema_name) no schema has been selected to create in
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:932: Ecto.Adapters.SQL.raise_sql_call_error/1
    (elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:1024: Ecto.Adapters.SQL.execute_ddl/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:696: Ecto.Migrator.verbose_schema_migration/3
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:510: Ecto.Migrator.lock_for_migrations/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:422: Ecto.Migrator.run/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:146: Ecto.Migrator.with_repo/3
    nofile:1: (file)
14:42:28.382 [error] Could not create schema migrations table. This error usually happens due to the following:

  * The database does not exist
  * The "schema_migrations" table, which Ecto uses for managing
    migrations, was defined by another library
  * There is a deadlock while migrating (such as using concurrent
    indexes with a migration_lock)

To fix the first issue, run "mix ecto.create".

To address the second, you can run "mix ecto.drop" followed by
"mix ecto.create". Alternatively you may configure Ecto to use
another table and/or repository for managing migrations:

    config :realtime, Realtime.Repo,
      migration_source: "some_other_table_for_schema_migrations",
      migration_repo: AnotherRepoForSchemaMigrations

The full error report is shown below.

** (Postgrex.Error) ERROR 3F000 (invalid_schema_name) no schema has been selected to create in
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:932: Ecto.Adapters.SQL.raise_sql_call_error/1
    (elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:1024: Ecto.Adapters.SQL.execute_ddl/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:696: Ecto.Migrator.verbose_schema_migration/3
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:510: Ecto.Migrator.lock_for_migrations/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:422: Ecto.Migrator.run/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:146: Ecto.Migrator.with_repo/3
    nofile:1: (file)
14:42:29.679 [error] Could not create schema migrations table. This error usually happens due to the following:

  * The database does not exist
  * The "schema_migrations" table, which Ecto uses for managing
    migrations, was defined by another library
  * There is a deadlock while migrating (such as using concurrent
    indexes with a migration_lock)

To fix the first issue, run "mix ecto.create".

To address the second, you can run "mix ecto.drop" followed by
"mix ecto.create". Alternatively you may configure Ecto to use
another table and/or repository for managing migrations:

    config :realtime, Realtime.Repo,
      migration_source: "some_other_table_for_schema_migrations",
      migration_repo: AnotherRepoForSchemaMigrations

The full error report is shown below.

** (Postgrex.Error) ERROR 3F000 (invalid_schema_name) no schema has been selected to create in
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:932: Ecto.Adapters.SQL.raise_sql_call_error/1
    (elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:1024: Ecto.Adapters.SQL.execute_ddl/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:696: Ecto.Migrator.verbose_schema_migration/3
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:510: Ecto.Migrator.lock_for_migrations/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:422: Ecto.Migrator.run/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:146: Ecto.Migrator.with_repo/3
    nofile:1: (file)
14:42:31.760 [error] Could not create schema migrations table. This error usually happens due to the following:

  * The database does not exist
  * The "schema_migrations" table, which Ecto uses for managing
    migrations, was defined by another library
  * There is a deadlock while migrating (such as using concurrent
    indexes with a migration_lock)

To fix the first issue, run "mix ecto.create".

To address the second, you can run "mix ecto.drop" followed by
"mix ecto.create". Alternatively you may configure Ecto to use
another table and/or repository for managing migrations:

    config :realtime, Realtime.Repo,
      migration_source: "some_other_table_for_schema_migrations",
      migration_repo: AnotherRepoForSchemaMigrations

The full error report is shown below.

** (Postgrex.Error) ERROR 3F000 (invalid_schema_name) no schema has been selected to create in
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:932: Ecto.Adapters.SQL.raise_sql_call_error/1
    (elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:1024: Ecto.Adapters.SQL.execute_ddl/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:696: Ecto.Migrator.verbose_schema_migration/3
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:510: Ecto.Migrator.lock_for_migrations/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:422: Ecto.Migrator.run/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:146: Ecto.Migrator.with_repo/3
    nofile:1: (file)
14:42:35.451 [error] Could not create schema migrations table. This error usually happens due to the following:

  * The database does not exist
  * The "schema_migrations" table, which Ecto uses for managing
    migrations, was defined by another library
  * There is a deadlock while migrating (such as using concurrent
    indexes with a migration_lock)

To fix the first issue, run "mix ecto.create".

To address the second, you can run "mix ecto.drop" followed by
"mix ecto.create". Alternatively you may configure Ecto to use
another table and/or repository for managing migrations:

    config :realtime, Realtime.Repo,
      migration_source: "some_other_table_for_schema_migrations",
      migration_repo: AnotherRepoForSchemaMigrations

The full error report is shown below.

** (Postgrex.Error) ERROR 3F000 (invalid_schema_name) no schema has been selected to create in
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:932: Ecto.Adapters.SQL.raise_sql_call_error/1
    (elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:1024: Ecto.Adapters.SQL.execute_ddl/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:696: Ecto.Migrator.verbose_schema_migration/3
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:510: Ecto.Migrator.lock_for_migrations/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:422: Ecto.Migrator.run/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:146: Ecto.Migrator.with_repo/3
    nofile:1: (file)
14:42:42.339 [error] Could not create schema migrations table. This error usually happens due to the following:

  * The database does not exist
  * The "schema_migrations" table, which Ecto uses for managing
    migrations, was defined by another library
  * There is a deadlock while migrating (such as using concurrent
    indexes with a migration_lock)

To fix the first issue, run "mix ecto.create".

To address the second, you can run "mix ecto.drop" followed by
"mix ecto.create". Alternatively you may configure Ecto to use
another table and/or repository for managing migrations:

    config :realtime, Realtime.Repo,
      migration_source: "some_other_table_for_schema_migrations",
      migration_repo: AnotherRepoForSchemaMigrations

The full error report is shown below.

** (Postgrex.Error) ERROR 3F000 (invalid_schema_name) no schema has been selected to create in
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:932: Ecto.Adapters.SQL.raise_sql_call_error/1
    (elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:1024: Ecto.Adapters.SQL.execute_ddl/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:696: Ecto.Migrator.verbose_schema_migration/3
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:510: Ecto.Migrator.lock_for_migrations/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:422: Ecto.Migrator.run/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:146: Ecto.Migrator.with_repo/3
    nofile:1: (file)
14:42:55.644 [error] Could not create schema migrations table. This error usually happens due to the following:

  * The database does not exist
  * The "schema_migrations" table, which Ecto uses for managing
    migrations, was defined by another library
  * There is a deadlock while migrating (such as using concurrent
    indexes with a migration_lock)

To fix the first issue, run "mix ecto.create".

To address the second, you can run "mix ecto.drop" followed by
"mix ecto.create". Alternatively you may configure Ecto to use
another table and/or repository for managing migrations:

    config :realtime, Realtime.Repo,
      migration_source: "some_other_table_for_schema_migrations",
      migration_repo: AnotherRepoForSchemaMigrations

The full error report is shown below.

** (Postgrex.Error) ERROR 3F000 (invalid_schema_name) no schema has been selected to create in
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:932: Ecto.Adapters.SQL.raise_sql_call_error/1
    (elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:1024: Ecto.Adapters.SQL.execute_ddl/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:696: Ecto.Migrator.verbose_schema_migration/3
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:510: Ecto.Migrator.lock_for_migrations/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:422: Ecto.Migrator.run/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:146: Ecto.Migrator.with_repo/3
    nofile:1: (file)
14:43:21.722 [error] Could not create schema migrations table. This error usually happens due to the following:

  * The database does not exist
  * The "schema_migrations" table, which Ecto uses for managing
    migrations, was defined by another library
  * There is a deadlock while migrating (such as using concurrent
    indexes with a migration_lock)

To fix the first issue, run "mix ecto.create".

To address the second, you can run "mix ecto.drop" followed by
"mix ecto.create". Alternatively you may configure Ecto to use
another table and/or repository for managing migrations:

    config :realtime, Realtime.Repo,
      migration_source: "some_other_table_for_schema_migrations",
      migration_repo: AnotherRepoForSchemaMigrations

The full error report is shown below.

** (Postgrex.Error) ERROR 3F000 (invalid_schema_name) no schema has been selected to create in
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:932: Ecto.Adapters.SQL.raise_sql_call_error/1
    (elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
    (ecto_sql 3.8.3) lib/ecto/adapters/sql.ex:1024: Ecto.Adapters.SQL.execute_ddl/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:696: Ecto.Migrator.verbose_schema_migration/3
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:510: Ecto.Migrator.lock_for_migrations/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:422: Ecto.Migrator.run/4
    (ecto_sql 3.8.3) lib/ecto/migrator.ex:146: Ecto.Migrator.with_repo/3
    nofile:1: (file)
service not healthy: [realtime-dev.supabase_realtime_app-ui]

from realtime.

filipecabaco avatar filipecabaco commented on June 2, 2024

feels like the same issue of persisted state interestingly...

how are you running it? docker compose or supabase cli?

from realtime.

TerminalFi avatar TerminalFi commented on June 2, 2024

feels like the same issue of persisted state interestingly...

how are you running it? docker compose or supabase cli?

Supabase cli.

Interestingly enough I have it working somehow. So won't be destroying it in the near future

from realtime.

filipecabaco avatar filipecabaco commented on June 2, 2024

got it! so supabase cli has a really annoying quirk where state is stored in a non-linked volume which means that you might have a data/db folder with the old state

from realtime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.