I just created a new app on fly.io to deploy a new rails app.
The setup process with the flyctl cli seemed to be smooth.
However I am not able to deploy the app.
Output of fly deploy --remote-only
==> Verifying app config
--> Verified app config
==> Building image
Remote builder fly-builder-icy-sunset-6025 ready
==> Creating build context
--> Creating build context done
==> Building image with Docker
--> docker host: 20.10.12 linux x86_64
Sending build context to Docker daemon 128.6kB
[+] Building 598.7s (0/1)
=> [internal] load remote build context 598.7s
Error failed to fetch an image or build from source: error building: unexpected EOF
It is either a very short error message:
Error failed to fetch an image or build from source: error building: unexpected EOF
Or a more detailed one:
Error failed to fetch an image or build from source: error building: error during connect: Post "http://[fdaa:0:49cc:xxx:xxxx:xxxx:xxx:2]:2375/v1.41/build?buildargs=null&buildid=upload-request%somehash&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
I am not able to make any sense of this error message. It always seems to timeout around 10 minutes.
Any hints are highly appreciated!
Output of flyctl doctor
Testing authentication token... PASSED
Testing flyctl agent... PASSED
Testing local Docker instance... PASSED
Pinging WireGuard gateway (give us a sec)... PASSED
Output of flyctl status
App
Name = my-app-name
Owner = personal
Version = 0
Status = pending
Hostname = my-app-name.fly.dev
App has not been deployed yet.
Do you have Docker installed locally? Iām guessing not by your use of --remote-only but if you do you can bypass any possible issue with remote builders by building the image locally. That shouldnāt be necessary but it can sometimes get you going again.
I do wonder if something may be up given another user today reported an issue that also ends with an unexpected EOF. Itās not entirely clear why that is happening for them either. Hmm. Normally that would be because a response is not being completed or parsed. The status page does not indicate any issues though.
Iām sure someone from Fly will be investigating.
You are correct: I do not use Docker locally. The Dockerfile was created by flyctl which also told me to deploy it with the --remote-only flag.
I might try building it locally as a workaround - thank you for the hint!
However, I would like to learn about another solution as I am not planning to use Docker for local development.
Understandable. I noticed other people having issues with remote builders. It seems like there was a problem on Flyās end and they reported theyād fixed it:
However you are still getting an error. Of course you could be getting a different, unrelated error with remote building ā¦ but the timing suggests it is related.
Do you have any request ID shown? Seems like Fly want that, at least based on that other thread. In the meantime they do track these forums so hopefully they should get back to you.
hi! would you try destroying the remote builder and redeploying? The issues from yesterday with remote builders should be all taken care of, so this can help us rule out issues specific to your particular builder
Sad news: I tried to deploy a second time today and I am facing the same issues again.
Most of the time it will just keep counting seconds during the Building image with Docker stage and will time out after quite a while:
$> flyctl deploy --remote-only --verbose --no-cache
==> Verifying app config
--> Verified app config
==> Building image
Remote builder fly-builder-old-shadow-2352 ready
==> Creating build context
--> Creating build context done
==> Building image with Docker
--> docker host: 20.10.12 linux x86_64
Sending build context to Docker daemon 97.06kB
[+] Building 274.5s (0/1)
One time I got another error message:
$> flyctl deploy --remote-only --verbose --no-cache
==> Verifying app config
--> Verified app config
==> Building image
Error failed to fetch an image or build from source: error connecting to docker: failed building options: failed probing "personal": context deadline exceeded
Destroyed builder app, updated flyctl, still it does not work.
Just for context:
This is a super simple, new Rails app. It has like 2 models and afaik nothing special to it.
I am also happy to provide access to the source code, because I would really be interested in what the problem is.
Yeah! So EOF means the connection to our API was cut short, one way or another. That could be a result of poor network connectivity. Where are you located?
Has it been okay for you since it worked last week? Iām getting the same unexpected EOF error when trying to deploy a barebones Remix app. Iām also using Frankfurt as Iām in Germany.
Update: the only way Iāve been able to deploy was by tethering my MacBook to my iPhone, and using cellular data. When on Wi-Fi, I get the EOF error every time, including when trying different VPN regions.
By different VPN regions, I mean I connected to VPN as if I was in various regions ā Germany, Austria, etc. ā just to see if that made any difference. I was testing different countries as Iād tried everything else I could think of.
Ah OK. So VPNs can conflict with flyctl which uses its own UDP-based VPN (Wireguard). Itās best to try without them where possible. Or, use the websockets change mentioned above, which will run traffic over websockets.
because @Darryl asked: I just tried it again, and the usual deployment command did again not work for me. I am not using a VPN of any kind, so I am still not sure what causes the problem.
However, I applied the websockets setting and now it is working for me!
Iām encountering the exact same issue: trying to deploy my first Rails app on Fly, not using Docker locally, good internet & no VPN, websockets enabled, builder deleted and rebuilt, and I made sure my firewall was open on UDP port 51820, inbound and outbound. I even tried over my partnerās iPhone hotspot.
In all of the above Iām still getting
fly deploy --remote-only --verbose ā¹ ā
==> Verifying app config
--> Verified app config
==> Building image
Error failed to fetch an image or build from source: error connecting to docker: failed building options: failed probing "personal": context deadline exceeded
and
fly doctor ā¹ ā
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.
Any idea what might be going on? Iām at the end of my rope and given that this is my very first time trying to deploy with Fly, Iām inclined to start searching for alternatives.