Unable to deploy after resetting Wireguard keys

I’ve had this problem ever since I started using Fly. In fact, I wrote off Fly for 6+ months because I could never deploy anything after the initial one. Recently, I tried deplying again, and things worked well enough, but today I reset my Wireguard keys, and it’s broken again.

$ fly deploy --verbose --verbose --verbose
==> Verifying app config
--> Verified app config
==> Building image
Waiting for remote builder fly-builder-hidden-dream-3249... 🌎
^C
WARN Failed to start remote builder heartbeat: failed building options: context canceled
WARN failed to create build in graphql: Post "https://api.fly.io/graphql": context canceled
Error failed to fetch an image or build from source: error connecting to docker: context canceled

In the dashboard, it looks the builder never got anything:

2023-03-01T10:08:31.031 app[568346dfd9958e] sin [info] time="2023-03-01T10:08:31.031392017Z" level=debug msg="Calling GET /v1.41/containers/json?filters=%7B%22status%22%3A%7B%22running%22%3Atrue%7D%7D&limit=0"
2023-03-01T10:08:32.034 app[568346dfd9958e] sin [info] time="2023-03-01T10:08:32.034061067Z" level=debug msg="checking docker activity"
2023-03-01T10:08:32.034 app[568346dfd9958e] sin [info] time="2023-03-01T10:08:32.034517798Z" level=debug msg="Calling GET /v1.41/containers/json?filters=%7B%22status%22%3A%7B%22running%22%3Atrue%7D%7D&limit=0"
2023-03-01T10:08:33.036 app[568346dfd9958e] sin [info] time="2023-03-01T10:08:33.036451815Z" level=debug msg="checking docker activity"
2023-03-01T10:08:33.036 app[568346dfd9958e] sin [info] time="2023-03-01T10:08:33.036715556Z" level=debug msg="Calling GET /v1.41/containers/json?filters=%7B%22status%22%3A%7B%22running%22%3Atrue%7D%7D&limit=0"

Is the Wireguard reset just coincidence? I don’t have any Wireguard connection running on this machine. It was just working before

So it turns out, there was a stuck fly agent running locally:

$ ps gawxu | grep fly
fly             81215   0.0  0.2 409549456  39472   ??  S    Sun05PM  10:02.67 fly agent run /Users/fly/.fly/agent-logs/3915215944.log

After I killed it, the deploy proceeded just fine.

1 Like

Ok I’m glad you found that. If you hit a similar issue, fly doctor might answer it more quickly.

I am having this same issue. I tried troubleshooting steps from another post referencing issues with Wireguard, as I have recently starting using Tailscale’s VPN. No dice

Steps taken so far:

Also seen this post, and my account was recently blocked from deployments due to a payment method issue. But that has been resolved
- remote builder not working

Edit:
I was able to deploy from a different machine, so something must be misconfigured on my main machine. Both machines are running Tailscale and are both in the same VLAN, but my main machine is much older and has usually been responsible for my deployments

I remember having issues running Tailscale at the same time as trying to deploy on Fly. They said they’re using a userspace/in-app tunnel? I don’t know why it would affect deployments, maybe something to do with DNS.

Maybe use a CI/CD runner to deploy from a consistent environment if it’s appropriate for your project.