electric-sql / electric

Sync little subsets of your Postgres data into local apps and services.
https://electric-sql.com
Apache License 2.0
6.22k stars 147 forks source link

Can't connect to proxy running on FLY.io connected to supabase db #1430

Closed acoreyj closed 2 months ago

acoreyj commented 2 months ago

https://electric-empty-sun-4082.fly.dev/api/status returns Connection to Postgres is up!

Shouldn't I be able to connect to

postgresql://postgres:PASSWORD_HERE@electric-empty-sun-4082.fly.dev:65432/postgres

Here is my fly.toml

Note AUTH_JWT_KEY, DATABASE_URL are in secrets.

I have tried different PG_PROXY_PASSWORD in the toml and secrets.

# fly.toml app configuration file generated for electric-empty-sun-4082 on 2024-07-22T13:11:19-05:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = 'electric-empty-sun-4082'
primary_region = 'ord'

[build]
  image = "electricsql/electric:canary"

[env]
  ELECTRIC_WRITE_TO_PG_MODE="direct_writes"
  AUTH_JWT_ALG="HS256"
  DATABASE_USE_IPV6="true"
  PG_PROXY_PASSWORD="PASSWORD_HERE"

# The main Internet-facing service of Electric
# to which clients will be connecting.
[http_service]
  internal_port = 5133
  force_https = true

  [[http_service.checks]]
    interval = "10s"
    timeout = "1s"
    grace_period = "20s"
    method = "GET"
    path = "/api/status"

[[vm]]
  size = 'shared-cpu-1x'
  memory = "1gb"
  cpus = 1

# Service definition for the migrations proxy that runs
# on a separate TCP port.
[[services]]
  protocol = "tcp"
  internal_port = 65432

  [[services.ports]]
    port = 65432
    handlers = ["pg_tls"]

Running psql "host=electric-empty-sun-4082.fly.dev port=65432 dbname=postgres user=postgres password=PASSWORD_HERE sslmode=disable"

psql: error: connection to server at "electric-empty-sun-4082.fly.dev" (66.241.124.229), port 65432 failed: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request.

linear[bot] commented 2 months ago

VAX-2009 Can't connect to proxy running on FLY.io connected to supabase db

KyleAMathews commented 2 months ago

👋 we've been working the last month on a rebuild of the Electric server over at a temporary repo https://github.com/electric-sql/electric-next/

You can read more about why we made the decision at https://next.electric-sql.com/about

We're really excited about all the new possibilities the new server brings and we hope you'll check it out soon and give us your feedback.

We're now moving the temporary repo back here. As part of that migration we're closing all the old issues and PRs. We really appreciate you taking the time to investigate and report the bug!