Error: failed to fetch an image or build from source: error connecting to docker: failed building options: upstream service is unavailable

The build is failing to connect the app with Postgres or Redis, later on the below occured.
fly deploy
==> Verifying app config
Validating C:\Users\Dell\Documents\railsapp\fly.toml
Platform: machines
✓ Configuration is valid
→ Verified app config
==> Building image
WARN Failed to start remote builder heartbeat: failed building options: upstream service is unavailable

Error: failed to fetch an image or build from source: error connecting to docker: failed building options: upstream service is unavailable

1 Like

Try this flyctl deploy --local-only worked for me

Tried this command, but unfortunately the error is not going away.

same issue, i am done with it

Chiming in in case this is related. We also started getting docker build errors today:

2023-08-15 00:05:44 [info ] #3 [internal] load metadata for public.ecr.aws/docker/library/python:3.11.4-slim

2023-08-15 00:05:44 [info ] #3 ERROR: unexpected status code [manifests 3.11.4-slim]: 400 Bad Request

Does not happen every time (may be 10% of the time for us).

Running into the same issue. Nothing reported on the fly.io status page - https://status.flyio.net/

Sorry for the inconvenience. We have fixed upstream service is unavailable issue.

@jjak82 Yours seems different. Can you reproduce the issue still? Do you know the region of your remote builder instance?

2 Likes

That issue resolved but I am facing this error
[build 7/7] RUN SECRET_KEY_BASE=DUMMY ./bin/rails assets:precompile:
#0 0.259 /bin/sh: 1: ./bin/rails: not found

Error: failed to fetch an image or build from source: error building: failed to solve: executor failed running [/bin/sh -c SECRET_KEY_BASE=DUMMY ./bin/rails assets:precompile]: exit code: 127

It seems like a Rails issue. Let’s start a new Discourse thread!

If you don’t have a bin/rails file in your project, you can generate it using: rails app:update:bin.

1 Like

It still happens sporadically. It went away for me for a bit. Started again today. The builder is: fly-builder-billowing-shape-7045, dfw region.

I tried to restart but issue persists (it’s flakey, does not happen every time). It shows up because we are using fly.io at large scale, as well as in automated integration tests (that is, we fly deploy multiple apps routinely, so flakes show up - very annoying!).