Skip to content

[DigitalOcean][Supabase] Deployment fails to connect to Supabase db #2

@atanaskanchev

Description

@atanaskanchev

Following the guide the deployment the electric-sync-service to DigitalOcean fails with a connection error:

Steps to repro:

┌────────────────────┐
[electric] [2024-02-10 12:08:00] ▓ │  CONNECTION ERROR  │
[electric] [2024-02-10 12:08:00] ▓ ┕━━━━━━━━━━━━━━━━━━━━┙
[electric] [2024-02-10 12:08:00] ▓ 
[electric] [2024-02-10 12:08:00] ▓ Failed to initialize Postgres state:
[electric] [2024-02-10 12:08:00] ▓   {:error, :ehostunreach}
[electric] [2024-02-10 12:08:00] ▓ 
[electric] [2024-02-10 12:08:00] ▓ Double-check the value of DATABASE_URL and make sure your database
[electric] [2024-02-10 12:08:00] ▓ is running and can be reached using the connection URL in DATABASE_URL.
[electric] [2024-02-10 12:08:00] 12:08:00.063 pid=<0.2807.0> [error] GenServer #PID<0.2807.0> terminating
[electric] [2024-02-10 12:08:00] ** (stop) :ehostunreach
[electric] [2024-02-10 12:08:00] Last message (from #PID<0.2803.0>): {:command, :epgsql_cmd_connect, %{database: ~c"postgres", host: {9728, 7964, 249, 19723, 33092, 30856, 56748, 3882}, nulls: [nil, :null, :undefined], password: #Function<0.69625977/0 in :epgsql_cmd_connect.hide_password/1>, port: 5432, ssl: true, ssl_opts: [server_name_indication: ~c"db.REDACTED_PROJECT_ID.supabase.co"], tcp_opts: [:inet6], timeout: 5000, username: ~c"postgres"}}
[electric] [2024-02-10 12:08:00] 12:08:00.063 pid=<0.2803.0> origin=postgres_1 [error] Initialization of Postgres state failed with reason: {:error, :ehostunreach}.
[electric] [2024-02-10 12:08:00] 12:08:00.063 pid=<0.2803.0> origin=postgres_1 [info] schedule retry: 2000
[electric] [2024-02-10 12:08:02] 12:08:02.064 pid=<0.2803.0> origin=postgres_1 [info] Electric.Replication.Postgres.Client.with_conn(%{database: ~c"postgres", host: ~c"db.REDACTED_PROJECT_ID.supabase.co", ip_addr: ~c"2600:1f1c:f9:4d0b:8144:7888:ddac:f2a", ipv6: true, nulls: [nil, :null, :undefined], password: ~c"******", port: 5432, ssl: true, ssl_opts: [server_name_indication: ~c"db.REDACTED_PROJECT_ID.supabase.co"], tcp_opts: [:inet6], timeout: 5000, username: ~c"postgres"})
[electric] [2024-02-10 12:08:02] 12:08:02.065 pid=<0.2808.0> [error] GenServer #PID<0.2808.0> terminating

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions