Can't complete flyctl deploy process - context deadline exceeded

I can confirm the same happening on my Github Actions. It’s not a blocker, but makes me want to double-check all deploys.

Here is my action.yaml

name: Deploy master branch to indiepaper on fly
on:
  push:
    branches:
      - master
env:
  FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
jobs:
  deploy:
    name: Deploy Production App
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: superfly/flyctl-actions@1.1
        with:
          args: "deploy -a indiepaper-production --remote-only"

If you’re using Github Actions (or most CI, really), you’re much better off building with local Docker. CI doesn’t seem to love our wireguard setups and we haven’t figure out why yet.

You can see a great example of how to build with Docker in Github Actions, courtesy of @kentcdodds: kentcdodds.com/deployment.yml at main · kentcdodds/kentcdodds.com · GitHub

This is nice because it uses Github’s caching, too, it should perform much better than remote only for most apps.

2 Likes

I’m having this problem as well atm:

❯ fly version
fly v0.0.276 darwin/amd64 Commit: 0e35938 BuildDate: 2022-01-01T17:54:59Z

I have no CI or WireGuard setup

Same for me. Deleted everything and run the process from scratch.

Once I got

--> docker host: 20.10.12 linux x86_64
Sending build context to Docker daemon  108.9kB
[+] Building 597.1s (0/1)                                                                                                                                      
 => [internal] load remote build context                                                                                                                597.1s
Error error building: unexpected EOF

and the other time

--> docker host: 20.10.12 linux x86_64
Sending build context to Docker daemon  108.9kB
[+] Building 598.1s (0/1)                                                                                                                                      
 => [internal] load remote build context                                                                                                                598.1s
Error error building: error during connect: Post "http://[***]:2375/v1.41/build?buildargs=null&buildid=***&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

FYI, this is happening for me also as of today. To confirm, I am deploying using a Github action. However I’ve been doing this with all my private and commercial apps, and it has been working fine. I’ll take a look at building the container on GH’s side, but I’m wondering whether there’s a way to increase the timeout?

@OldhamMade If by this you are only getting a timeout (rather than e.g “error during connect” or “EOF” or one of the other issues/errors mention in this thread) the good news is thatone may be fixed as soon as tomorrow, based on this post. It’s because of the time taken for the peer.

Until then the solution I found was to persist the config.yml file between deploys (you may see the fly deploy command complain about it missing if not). As with CI, generally that file is not persisted, resulting in a big delay. Not sure how you do that with Github Actions specifically though.

I’m running into the same issue as well. Using the latest flytctl, I can’t run deploy --remote-only.

it tries to connect to the builder, but fails. I’m on a non-VPNed MacOS Silicon, using a FIOS wifi access point.

I tried running the same command on a brand new linux VM inside MacOS, and it also did not work.

I tried both of the above switching to a T-Mobile hotspot, and still no luck.

I tried running the same command on a GCP instance, and it worked just fine.

Happy to try all sorts of commands to debug this, but it’s really frustrating. It just gets stuck on:

Waiting for remote builder fly-builder-proud-sound-5393… connecting ⢿

Then eventually times out.

Note: I can run flyctl --app fly-builder-proud-sound-5393 logs just fine, but I imagine that doesn’t invoke wireguard.

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?