Hey there I’m following the elixir deployment docs. I’ve setup the database and it’s healthily deployed however I’m unable to attach my database to my app. I’ve tried deploying twice and it’s simply not working. I know I’m adding the right database name and the app is setup properly. This is the same unanswered issue as: An unknown error occurred?
I decided to redeploy this as another app and the last deploy was working before I switched it over so I believe my config files are just fine.
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.
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?
@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.
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.
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
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.
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