Getting an odd error, no idea how to fix?

Getting the following error when deploying:

Error: error creating a new machine: failed to launch VM: Mounts source volume “vol_lgz1vpp7wgwv78m3” is in the wrong region (“atl” != “sjc”)

How do I fix this? Thank you!

The Machine and the volume need to be in the same region. Do you have primary_region set in your fly.toml file? Could you share the file?

You can also check what regions you have configured for the app (per process group) by running fly regions list.

No primary_regions set.

that command, fly regions list, doesn’t return anything?

On my dashboard, it’s saying the machine and volume are in atl?

It looks like I have a remote builder that went live for deploying - It’s based in SJC… Would this be causing the problem? How to fix?

I started completely from step one to deploy and now I’m getting the same error, except with a different location (I set this volume for this deployment to SJC):

Error: error creating a new machine: failed to launch VM: Mounts source volume “vol_2gk9vwek358v76wm” is in the wrong region (“sjc” != “ewr”)

Do you want sjc to be your primary region?

Could you try setting primary_region = "sjc" in your fly.toml file? Just right at the top under the app name is fine:

app = "your-app-name"
primary_region = "sjc"

Then try scaling down to zero machines:
fly scale count 0

(if you have multiple process group then specify the group to scale)

When you run fly deploy again it should create the machines in your primary region.

The region of your builder app shouldn’t matter (I don’t think).

Thank you, that seemed to be working until the very last second and I got this error this time:

Error: error creating machine configuration: New machine in group ‘app’ needs an unattached volume named ‘data’ in region ‘atl’

Oh right, if you deploy from zero then we create 2 machines by default for redundancy. You can either turn this off for now by deploying with:
fly deploy --ha=false
you can create a second volume that will get attached to the second machine:

fly volumes create data -r sjc
fly deploy

Well… we’re making progress. Now I’m getting this error?

timeout reached waiting for healthchecks to pass for machine 5683dd9ec2058e failed to get VM 5683dd9ec2058e: Get “”: net/http: request canceled

You can check the logs for your app when it’s deploying to see what’s happening there. You can use the Monitoring tab for your app in the Dashboard, which will show live logs.

I’ve seen this issue come up a few times in the last few days, so I’ll check into that as well.

Just confirming that you did set the primary_region in the fly.toml file?

I did. I’m starting over again completely from scratch, though.

Sorry you’ve had a bit of a bumpy experience! When there’s a region mismatch like that it can be some work to sort it out.

So, redoing everything from scratch: It’s working. Thank you for all your help!

Great news! :tada:

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