electric-sql / electric-sql/deploy-to-do
[DigitalOcean][Supabase] Deployment fails to connect to Supabase db
- Dominant language
- No language data
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Following the [guide](https://electric-sql.com/docs/deployment/digital-ocean) the deployment the electric-sync-service to DigitalOcean fails with a connection error:
Steps to repro:
- [x] Crete a new Supabase project
- [x] Initiate DigitalOcean deployment going to https://cloud.digitalocean.com/apps/new?repo=https://github.com/electric-sql/deploy-to-do/tree/service-only
- [x] DATABASE_URL set to Direct database access via IPv4 -> `postgresql://postgres:[YOUR-PASSWORD]@db.[PROJECT_ID].supabase.co:5432/postgres`
- [x] the rest

```sh
┌────────────────────┐
[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
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.