Cannot Deploy Prebuilt Postgres with custom fly.toml

I’m trying to deploy my postgress app with a custom fly.toml (from External Port Configuration) to connect my other fly app to the postgres port.

I thought internal the ports are open to my other apps, but it didn’t work, so i think i have to open the port in order to use it internally (other app, same user)

It loggs:

name@Names-MBP cell-map-analyser-db % fly deploy . --app cell-map-analyser-db --image flyio/postgres:14 --local-only
==> Verifying app config
--> Verified app config
==> Building image
Searching for image 'flyio/postgres:14' locally...
Searching for image 'flyio/postgres:14' remotely...
image found: img_e1zd4mre8nqv02yw
? This feature is highly experimental and may produce unexpected results. Proceed? Yes
Deploying with rolling strategy ✓

But nothing deployes…

When I run it a second time it fails:

name@Names-MBP cell-map-analyser-db % fly deploy . --app cell-map-analyser-db --image flyio/postgres:14          
==> Verifying app config
--> Verified app config
==> Building image
Searching for image 'flyio/postgres:14' remotely...
image found: img_e1zd4mre8nqv02yw
? This feature is highly experimental and may produce unexpected results. Proceed? Yes
Deploying with rolling strategy ✓
Error failed to update VM 9e784436f43583: Post "http://[fdaa:0:cea6::3]:4280/v1/apps/cell-map-analyser-db/machines/9e784436f43583": EOF

ALSO building on remote in general doesn’t work:
In my other project (cell-map-analyser-backend) it gets stuck on:

name@Names-MBP cell-map-analyser-backend % fly deploy --remote-only
==> Verifying app config
--> Verified app config
==> Building image
Remote builder fly-builder-autumn-voice-538 ready
==> Creating build context
--> Creating build context done
==> Building image with Docker
--> docker host: 20.10.12 linux x86_64
Sending build context to Docker daemon  18.94kB
[+] Building 19.4s (0/1)                                                                                           
 => [internal] load remote build context    

So are your remote builders broken, or am I missing something?

Greets!

1 Like

My cell-map-analyser-db App is now actually broken. I can’t connect anymore etc…

name@Names-MBP cell-map-analyser-db % fly pg connect -a cell-map-analyser-db                     
Oops, something went wrong! Could you try that again?
name@Names-MBP cell-map-analyser-db % fly pg restart --app cell-map-analyser-db                  
Attempting to acquire lease(s)
  Machine 9e784436f43583: success
Error no active leader found

Please fix this asap, I hope it didn’t fucked my Database etc…

Greets!

bump

I’ve managed to get my DB App back to working state with this Tipp. But I still can’t deploy how the Guide is advising me. I think all of your Cloud builders are broken or something like that. I really need to open these Ports. Please Help!

I would try deleting your builder fly-builder-autumn-voice-538 and try again.

Hi shaun, thanks for your answer!

I’ve deleted the builder. But it wasn’t created by cell-map-analyser-db. I’ve deleted the builders hundreds of times before… Because they obviously don’t work in ANY case. I’ve switched for all my apps completely to local builds. But this isn’t possible for fly deploy . --app <app-name> --image flyio/postgres:<major-version> . What should I do?

@shaun is there maybe something with my account wrong? Because I haven’t had a single remote-builder working.

I am experiencing the same issue. Unable to deploy to an existing postgres database to open ports. Hangs forever on ‘Deploying with rolling strategy’.

Edit: I was able to deploy successfully after disabling my VPN on the machine I am running the command from. Seems to be a common problem that flyctl doesn’t play nice with VPN connections.