Can't complete flyctl deploy process - context deadline exceeded

Looks like the timeout issues have resolved themselves today. :+1:t2:

Yep :rocket:

I went ahead and tried this on a brand new MacStadium bare metal M1, so it’s in a data center.

Same issue:

Waiting for remote builder fly-builder-proud-sound-5393… connecting ⣾ Error error connecting to docker: unable to connect WireGuard tunnel: context deadline exceeded

So it seems like it’s currently not working on Macs at all. Tried fltctl from nixpkgs:

flyctl v0.0.0-1643132251+dev darwin/arm64 Commit: BuildDate: 2022-01-25T12:37:31-05:00

And from homebrew:

fly v0.0.286 darwin/arm64 Commit: cd174ea BuildDate: 2022-01-23T12:22:32Z

So unless I’m doing something wrong, it seems like deploy on Mac (at least silicon) is not working at all. At least for me. Let me know if there’s anything I can do to help diagnose the issue.

1 Like

I’m also unable to get past the timeout issue. Here’s my flyctl version:

flyctl v0.0.286 darwin/amd64 Commit: cd174ea BuildDate: 2022-01-23T12:22:32Z

I’m on the NJ region, not sure the changes to fix this have propagated to my region yet.

fwiw, here’s my error message:

Waiting for remote builder fly-builder…819… connecting ⣾ Error failed to fetch an image or build from source: error connecting to docker: unable to connect WireGuard tunnel: context deadline exceeded

Same issue here. Waiting for remote builder.

I created a new topic that’s Mac specific with every combination, you can find it here:

@Bill_Cromie @gMac @Silvio_Gutierrez and anyone else who hit timeouts, will you give it another try now? We fixed one big issue, I believe it might’ve been affecting all of you.

Ok! My very first Fly.io “fly launch” command now works. Nice job, thanks. This app has nothing in it, I was just trying out your launch tutorial.

I’m new to Fly, so I was quite ready to deal with the unexpected. Now, “fly open” fails to resolve on my browser, but that looks like a separate issue.

fly open can take a few minutes, when you first create an app we give you an IP address and a DNS entry. The internet is not as fast to get those to your local system as I’d like …

Got it! It makes sense. But overall it’s pretty fast (post launch), it was maybe a minute or 2.

I’m Stoked!

1 Like

Did you find a solution to this issue? I’m getting the same:

Error failed to fetch an image or build from source: error building: error during connect: Post "http...

I’m trying to deploy from an M1 MacBook Pro with fly deploy --remote-only.

@Darryl what host was it trying to POST to?

Hi, @michael. Thanks for the reply.

A bit of context: I was just trying to deploy an example Remix app. I’ve never used Remix or Fly.io before so it seemed like a good chance to test both.

I set up the sample app like this:

➜ npx create-remix@latest
? Where would you like to create your app? ./my-remix-app
? What type of app do you want to create? Just the basics
? Where do you want to deploy? Choose Remix if you're unsure, it's easy to change deployment targets. Fly.io
? TypeScript or JavaScript? TypeScript
? Do you want me to run `npm install`? Yes

Then, as shown in the README.md generated with that project, I tried to deploy with fly deploy --remote-only once I’d created my account. I’ve tried restarting the agent, deleting the builder, etc. No luck unfortunately.

Update: the sample project has no database; it’s literally a single route with some text.

This is a bad first impression!

The issue you posted earlier looks like a timeout connecting to something. I’m curious if it’s a timeout with our API (api.fly.io), or fetching images from docker hub, or flyctl connecting to the docker daemon in your remote builder. If you know the url from the error it can help narrow it down.

Hi, Michael. Here’s the error, complete with URL. Please tell me if I shouldn’t be sharing this complete URL publicly.

Error failed to fetch an image or build from source: error building: error during connect: Post "http://[fdaa:0:55ae:a7b:23c4:0:b5ba:2]:2375/v1.41/build?buildargs=null&buildid=upload-request%3Ac867feda0ab3dd5bb0476577cc1192eb562d1b7e1d64771ffe62b522bd00d800&cachefrom=null&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=&labels=null&memory=0&memswap=0&networkmode=&rm=0&shmsize=0&target=&ulimits=null&version=2": EOF

That URL is safe to share publicly. It looks like it had a problem talking to the remote Docker Daemon.

Your builder is running in Frankfurt, Germany. Is that close to where you are?

Hi, Kurt. Yeah, as close as I can get. I’m in southern Germany so Frankfurt is the closest location.

Dang ok, that’s a weird error then. This could be:

  1. A very large context. Run du -sh in your app directory, if it’s like 1GB that’s a problem. When you run fly deploy it should tell you the context size. If your context is over >100MB it could make things slow and timeout. You can keep contexts small with a .dockerignore file.
  2. Our network agent may be causing a problem.

If this keeps happening and you’re feeling adventurous, you can debug #2 with a a real Wireguard Peer: Private Networking

Then try a deploy using your host wireguard connection:

FLY_REMOTE_BUILDER_HOST_WG=1 fly deploy

Running du -sh gives me 223M. It’s getting a little late here but I’ll look into your other suggestion over the weekend if I can. Thanks for your help so far!

Oh, and I have a .dockerignore file containing node_modules.

Ok well that’s probably not the issue then! That’s a pretty small directory, even with node_modules.