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

[Supabase][DigitalOcean] Deployment of electric-sync-service fails with a connection error #940

Open
4 tasks done
atanaskanchev opened this issue Feb 10, 2024 · 4 comments

Comments

@atanaskanchev
Copy link

atanaskanchev commented Feb 10, 2024

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

Steps to repro:

image

┌────────────────────┐
[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
@ImSingee
Copy link

Friendly Reminder: Have you ever paid for ipv4 add-on for supabase? See https://supabase.com/docs/guides/platform/ipv4-address for more information

@alco
Copy link
Member

alco commented Feb 13, 2024

@atanaskanchev I've reached out to DigitalOcean's support and got a response from them:

IPv6 isn't supported in app platform. [...] As an alternative you could use our managed database service which would work with that still, or possibly running that on a droplet instead which does support IPv6.

@savikko
Copy link

savikko commented Mar 5, 2024

What version of PostgreSQL you have at Supabase, @atanaskanchev ?

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

No branches or pull requests

4 participants