Unable to attach database to app w/ "Unknown Error"

I’m getting the same result, but when trying to create a cluster in LHR.

Same problem here, first time using fly. Not the best FTUE. Tried last night before bed and again this morning, same result. Status page doesn’t indicate any issues.

Any updates on this?

Still no luck

This appears to be a problem with health check configuration for first time Postgres setups. This is the first time you all have created a postgres cluster for your organization, right?

It is for me, yes.

We believe this issue is fixed now. Please let us know if you hit a similar error.

That works, thanks!

1 Like

@Morzaram I believe the error you were seeing was related, but not exactly the same. Will you see if attach works now, and if you get a similar error, paste the output of fly status -a <postgres-name>?

The attach commands rely on a database cache of running VMs and it was lagging a bit, so it couldn’t find a VM to run the command against.

Hey that does the trick! Thanks guys!

Just saw the same issue @kurt .

Here’s the output of fly status for the db

App
  Name     = niss-db          
  Owner    = personal         
  Version  = 0                
  Status   = running          
  Hostname = niss-db.fly.dev  

Deployment Status
  ID          = fe48b765-368a-3e27-7361-552ebf20bcac         
  Version     = v0                                           
  Status      = successful                                   
  Description = Deployment completed successfully            
  Instances   = 1 desired, 1 placed, 1 healthy, 0 unhealthy  

Instances
ID       PROCESS VERSION REGION DESIRED STATUS  HEALTH CHECKS      RESTARTS CREATED    
150a06c5 app     0       dfw    run     running 2 total, 2 passing 0        38m13s ago
> fly pg db list niss-db                                                                                                                             1 ↵
WARN app flag 'niss-db' does not match app name in config file 'niss-ui'
? Continue using 'niss-db' Yes
Error An unknown error occured.

We are encountering the same problem when trying to attach a postgres database to elixir (An unknown error occured).

Same for me as well…

App
  Name     = ledgery-pg
  Owner    = personal
  Version  = 0
  Status   = running
  Hostname = ledgery-pg.fly.dev

Deployment Status
  ID          = de447e80-c504-6c0b-2579-0ac18f001477
  Version     = v0
  Status      = successful
  Description = Deployment completed successfully
  Instances   = 1 desired, 1 placed, 1 healthy, 0 unhealthy

Instances
ID       PROCESS VERSION REGION DESIRED STATUS  HEALTH CHECKS      RESTARTS CREATED
3f110f21 app     0       dfw    run     running 2 total, 2 passing 0        1h59m ago
fly v0.0.260 darwin/arm64 Commit: 250dc89 BuildDate: 2021-12-02T20:30:36Z

And me. Was working fine for me yesterday.

App
  Name     = keevue-staging-db
  Owner    = keevue-401
  Version  = 0
  Status   = running
  Hostname = keevue-staging-db.fly.dev

Deployment Status
  ID          = 47a3fb6a-40b6-d66f-28ba-a43f22d461fc
  Version     = v0
  Status      = successful
  Description = Deployment completed successfully
  Instances   = 1 desired, 1 placed, 1 healthy, 0 unhealthy

Instances
ID       PROCESS VERSION REGION DESIRED STATUS  HEALTH CHECKS      RESTARTS CREATED
5988c7a5 app     0       sjc    run     running 2 total, 2 passing 0        7m14s ago

Really sorry for the trouble. There are some known issues with the attach/detach process that we are working to address. In the meantime, here are some instructions on how to manually handle the attachment process.

Edit: Never mind, this seems to have been fixed this morning

@shaun fly ssh console also fails. I’m getting unexpected EOF in GraphQL response errors. fly ssh console fails with "Error ssh: can't build tunnel"

fly postgres attach is still not working for me. But I can fly ssh console ok. I guess there is more than one thing going on resulting in the Error An unknown error occured. message

I am still facing the problem. flyctl postgres attach --postgres-app <postgres-app-name> not working. It just shows An unknown error occurred

I got same error message with version 0.0.261 when attaching postgres app

+1 also getting this same error

There has been a rewrite of PG attach/detach that has been made available within flyctl as of version v0.0.263. If anyone is still having trouble and/or is interesting in trying it out and providing some feedback, would love to hear how things go.

If you’re running our postgres-standalone image, please make sure you’re running the latest image version. You can verify this by running fly image show --app <postgres-app>.

1 Like