fly deploy : no such organization

I have setup separate orgs for prod and dev and created apps with fly launch --no-deploy and also managed to setup secrets using fly secrets but when I try to do deploy it keeps failing with no such organization

fly --access-token $FLY_ACCESS_TOKEN_DEV deploy --config fly.dev.toml

deploy works now which means it was a fly deploy issue. This is now becoming a routine that deployment downtime is neither reported nor acknowledged. Leaving users in the dark. This is not great. Deployment has become very flaky :expressionless:

1 Like

Syncing data across workers can take a moment, so if you create an org and deploy to it immediately after, it might say the org is not found. It usually should be less than a minute before the sync works.

it worked fine last night and now 1 of the 2 orgs are failing deploy, no changes made. Tried with new deploy token as well .

checked can successfully update or set new secrets but fly deploy fails with no such organization

still can’t deploy to 1 org and the status page list no issues

Hi @dar ! I’m checking on this issue, trying to narrow down the problem. Could you please try fly --access-token $FLY_ACCESS_TOKEN_DEV orgs list and confirm the expected org is listed?

yes the org is listed, I was able to deploy to it yesterday night. The one with prod postfix is having issue, the dev is working for now
photo_6248946776392447960_x

now i can deploy to the prod org but deploy failing to dev org with same no such organization error. :person_facepalming:

Thanks for the confirmation! Based on my preliminary research, I’d say it’s not related to a specific org but something not working as expected with the wireguard agent. I’ll keep investigating and update here with my findings.

deployed to both orgs right now, will update this thread again if issue arises

Great news it’s working now for you. I’ll keep digging to see what I can find. Thanks!

@dar if this happens again, run fly agent stop and retry the deployment again.
kindly let me know in this thread if that works for you.

working well for now, will update if issue is faced again

fly agent stop did the trick, deployment worked after initially failing once ran it

great, i think i might have an idea how to fix it. but I have one more question for you.

are you using 2 different tokens for deployments? one token for the the dev app and another token for the prod app?

(for context, we have an agent which is a long running process, and i think what’s happening is, it’s not invalidating old tokens quickly enough)

1 Like

moved to have 2 deploy tokens , 1 for each org . but saw same issue when using access token or deploy token

gotcha. will try and reproduce it and push a permanent fix.

fly agent stop is failing with Error: failed dialing agent: agent not running and deploy fails with Error: Could not find App <app name>. I checked the logs under ~/.fly/agent-logs/ and can see it is connecting to the wrong org most likely because it is holding token from last deploy and I can’t stop the agent successfully.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.