Error: failed to fetch an image or build from source

Hello.

I was trying to deploy my application to Fly.io, but a strange issue occurred today.

> fly deploy
==> Verifying app config
--> Verified app config
==> Building image
WARN Failed to start remote builder heartbeat: failed building options: failed probing "personal": context deadline exceeded
Error failed to fetch an image or build from source: error connecting to docker: failed building options: failed probing "personal": context deadline exceeded

When I try to deploy the app, this error keeps happening. What’s even more strange is that Fly.io doesn’t have this issue when I deploying other apps.

I ran fly doctor command, and this was the result:

Testing authentication token... PASSED
Testing flyctl agent... PASSED
Testing local Docker instance... Nope
Pinging WireGuard gateway (give us a sec)... FAILED
(Error: ping gateway: no response from gateway received)

We can't establish connectivity with WireGuard for your personal organization.

WireGuard runs on 51820/udp, which your local network may block.

If this is the first time you've ever used 'flyctl' on this machine, you
can try running 'flyctl doctor' again.

If this was working before, you can ask 'flyctl' to create a new peer for
you by running 'flyctl wireguard reset'.

If your network might be blocking UDP, you can run 'flyctl wireguard websockets enable',
followed by 'flyctl agent restart', and we'll run WireGuard over HTTPS.

I also ran commands such as: fly wireguard reset, fly wireguard websockets enable, and fly agent restart. But none of them work.

What should I do?

Hey there! I’m sorry you’re experiencing an issue with the wireguard connection, we’re going to dig into this and see what could be causing this issue. Do you know what gateway/region your wireguard peer is attempting to connect to?

I ran fly wireguard list command, and it says the region is Hong Kong (hkg).

And my application won’t restart after it randomly died 5 days prior. (I should have said this first, but I forgot. Sorry…)

Awesome, this is helpful! I’ll let you know when we figure this out.

Also, we updated the status page to reflect the connectivity issues in flyctl → https://status.flyio.net/

Ok, thanks!

It looks like the issue has been resolved, here’s a little summary about what happened:

It works like a charm now. Thanks!

1 Like

I am not sure if this is related, but I am getting a similar error message when I run

fly deploy
==> Verifying app config
→ Verified app config
==> Building image
WARN Failed to start remote builder heartbeat: failed building options: failed probing “personal”: context deadline exceeded
Error failed to fetch an image or build from source: error connecting to docker: failed building options: failed probing “personal”: context deadline exceeded

Any idea how to fix it?

edit: fly deploy --local-only seems to be working

Hey @kiru, it’s likely an issue with the remote builder, can you nuke it and try building with the remote flag again?

That did not help. I deleted the previous builder and then tried fly deploy.
It created a new builder (named fly-builder-old-snow-2077), but I am getting the same issue:


==> Verifying app config
--> Verified app config
==> Building image
WARN Failed to start remote builder heartbeat: failed building options: failed probing "personal": context deadline exceeded
Error failed to fetch an image or build from source: error connecting to docker: failed building options: failed probing "personal": context deadline exceeded

Can you try running fly doctor and maybe fly wireguard reset and see if that does anything?

2 Likes

I figured out what was the issue. I was behind a network, which was blocking many ports. I am not sure which ports need to be open generally for this command to work?=

Thank you @shortdiv, this worked for me :ok_hand:

1 Like

I had this as well, and the Wireguard passed, but support suggested that it was wireguard failing anyway, and to run through the procedure. I did it and it is working again