Fly is a terrific product, My team members love it, but there are still some services stuck on other cloud platforms that haven’t been migrated yet, we want to connect to fly’s postgre from apps on external cloud platforms, but we are having trouble here, do I need to make changes to something like firewall, whitelist or any related configuration? Appreciate it if someone could point out the issue.
My steps
I followed connecting-external-services instructions and completed the following steps:
- Create PG and assign
ipv4
to it. - Add the
toml
file and specify in the file that the mapped public port is10000
. - Redeploy the PG and successfully release a new version.
Now when I type flyctl info
I can get the following message:
Services
PROTOCOL PORTS
TCP 443 => 5432 [TLS]
10000 => 5432 []
IP Adresses
TYPE ADDRESS REGION CREATED AT
v4 *.*.*.* 20m35s ago
Current connection error
Everything seems to be working fine (apps on the Fly platform can connect), but I still can’t use psql
or a client to connect directly to pg from an external network:
connection to server at "<my_app_name>.fly.dev", port 10000 failed: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.