flyctl deploy TLS handshake timeout

Hello,

I’ve been recently trying out fly and I love the simplicity around the tooling. That being said, I’ve been trying to redeploy my app using flyctl --app my_app deploy ., however I keep running into TLS handshake issues:

After the image has been built:

The push refers to repository [registry.fly.io/my_app]
Error failed to fetch an image or build from source: error rendering push status stream: Get "https://registry.fly.io/v2/": net/http: TLS handshake timeout

other attempts:

==> Pushing image to fly
The push refers to repository [registry.fly.io/my_app]
14a6b6fe94e3: Pushing [==================================================>]  24.64MB
7c3c9eaa96cb: Pushing  1.536kB
630326550950: Pushed
e419ed535fd4: Pushed
04b2adabacbf: Pushed
d3ab2bc4c88a: Pushed
60c5ba62db2b: Retrying in 2 seconds
e2eb06d8af82: Pushed
Error failed to fetch an image or build from source: error rendering push status stream: net/http: TLS handshake timeout

and sometimes:

--> docker host: 20.10.11 linux x86_64
[+] Building 1.4s (0/1)
[+] Building 20.1s (4/4) FINISHED
 => CACHED [internal] load remote build context                                                                    0.0s
 => CACHED copy /context /                                                                                         0.0s
 => ERROR [internal] load metadata for docker.io/library/alpine:3.14.2                                            20.0s
 => [internal] load metadata for docker.io/hexpm/elixir:1.13.1-erlang-24.2-alpine-3.14.2                          15.3s
------
 > [internal] load metadata for docker.io/library/alpine:3.14.2:
------
Error failed to fetch an image or build from source: error building: failed to solve with frontend dockerfile.v0: failed to create LLB definition: failed to authorize: failed to fetch anonymous token: Get "https://auth.docker.io/token?scope=repository%3Alibrary%2Falpine%3Apull&service=registry.docker.io": net/http: TLS handshake timeout

I’m running flyctl on WSL 2.0 with Ubuntu 18.04 if that helps.

Thank you!

I seem to have worked around the issue by using the --remote-only flag as part of the deploy args.

That’s a good workaround! I’m guessing there was a transient network issue breaking image pushes yesterday. If it crops up again, let us know (but feel free to keep using remote builds if you’d rather).

I am experiencing the same issue even after using the --remote-only flag.