Error release_command failed running on machine xxxxx with exit code 127

Hi everyone,

I’ve got the exit code 127 when I try to deploy my app: this morning deployements were ok and suddently it doesn’t work anymore.

Running display-prod4 release_command: /app/bin/migrate
  Waiting for 6e8299da673258 to get exit event
Error release_command failed running on machine 6e8299da673258 with exit code 127.

Here are the detailled logs :

  Pulling container image registry.fly.io/xxxxxxxxxxxxxxxxxxx
  Successfully prepared image registry.fly.io/xxxxxxxxxxxxxxxxx (378.03996ms)
  Configuring firecracker
  [    0.063771] PCI: Fatal: No config space access function found
   INFO Starting init (commit: 5293a085)...
   INFO Preparing to run: `/app/bin/migrate` as nobody
   INFO [fly api proxy] listening at /.fly/api
  2023/08/29 14:28:39 listening on [fdaa:0:ef46:a7b:ae02:4067:1ff:2]:22 (DNS: [fdaa::3]:53)
: not found: 2: /app/releases/0.1.0/env.sh:
   INFO Main child exited normally with code: 127
   INFO Starting clean up.
   WARN hallpass exited, pid: 257, status: signal: 15 (SIGTERM)
  2023/08/29 14:28:40 listening on [fdaa:0:ef46:a7b:ae02:4067:1ff:2]:22 (DNS: [fdaa::3]:53)
  [    2.297270] reboot: Restarting system
  machine restart policy set to 'no', not restarting
Error: release command failed - aborting deployment. error release_command machine 6e8299da673258 exited with non-zero status of 127

Do you know what’s happening?

Hi, return code 127 usually means “file not found”. , it seems to be the case here:

2023/08/29 14:28:39 listening on [fdaa:0:ef46:a7b:ae02:4067:1ff:2]:22 (DNS: [fdaa::3]:53)
: not found: 2: /app/releases/0.1.0/env.sh:
   INFO Main child exited normally with code: 127

Make sure that file is included in your image. What I usually do is build locally (docker build .) and fire up the image locally to see whether the file is there. This might yield more clues!

  • Daniel
1 Like

Hi,
I’ve checked, the file “env.sh” is not missing…
When I try to deploy, I got CACHED docker command, so it doesn’t check if the file is rightfully here :

=> [internal] load build definition from Dockerfile                                                               0.1s
 => => transferring dockerfile: 2.52kB                                                                             0.1s
 => [internal] load .dockerignore                                                                                  0.1s
 => => transferring context: 35B                                                                                   0.0s
 => [internal] load metadata for docker.io/library/debian:bullseye-20220801-slim                                   0.6s
 => [internal] load metadata for docker.io/hexpm/elixir:1.14.2-erlang-25.0.4-debian-bullseye-20220801-slim         0.6s
 => [builder  1/18] FROM docker.io/hexpm/elixir:1.14.2-erlang-25.0.4-debian-bullseye-20220801-slim@sha256:0115941  0.0s
 => [internal] load build context                                                                                  1.6s
 => => transferring context: 1.24MB                                                                                1.6s
 => [stage-1 1/6] FROM docker.io/library/debian:bullseye-20220801-slim@sha256:a811e62769a642241b168ac34f615fb02da  0.0s
 => CACHED [stage-1 2/6] RUN apt-get update -y && apt-get install -y libstdc++6 openssl libncurses5 locales   &&   0.0s
 => CACHED [stage-1 3/6] RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen                          0.0s
 => CACHED [stage-1 4/6] WORKDIR /app                                                                              0.0s
 => CACHED [stage-1 5/6] RUN chown nobody /app                                                                     0.0s
 => CACHED [builder  2/18] RUN apt-get update -y && apt-get install -y build-essential git     && apt-get clean &  0.0s
 => CACHED [builder  3/18] WORKDIR /app                                                                            0.0s
 => CACHED [builder  4/18] RUN mix local.hex --force &&     mix local.rebar --force                                0.0s
 => CACHED [builder  5/18] COPY mix.exs mix.lock ./                                                                0.0s
 => CACHED [builder  6/18] RUN mix deps.get --only prod                                                            0.0s
 => CACHED [builder  7/18] RUN mkdir config                                                                        0.0s
 => CACHED [builder  8/18] COPY config/config.exs config/prod.exs config/                                          0.0s
 => CACHED [builder  9/18] RUN mix deps.compile                                                                    0.0s
 => CACHED [builder 10/18] COPY priv priv                                                                          0.0s
 => CACHED [builder 11/18] COPY lib lib                                                                            0.0s
 => CACHED [builder 12/18] COPY assets assets                                                                      0.0s
 => CACHED [builder 13/18] COPY node_modules node_modules                                                          0.0s
 => CACHED [builder 14/18] RUN mix assets.deploy                                                                   0.0s
 => CACHED [builder 15/18] RUN mix compile                                                                         0.0s
 => CACHED [builder 16/18] COPY config/runtime.exs config/                                                         0.0s
 => CACHED [builder 17/18] COPY rel rel                                                                            0.0s
 => CACHED [builder 18/18] RUN mix release                                                                         0.0s
 => CACHED [stage-1 6/6] COPY --from=builder --chown=nobody:root /app/_build/prod/rel/display ./                   0.0s
 => exporting to image                                                                                             0.0s

Thomas

Even if i do fly deploy --no-cache I’m still facing the same issue…

Hi there,
I’ve tried a lot of things without any success.
So i came back few commits behind, re-fly deployed my app and everything was ok.
It looks like i did something wrong on some config files or somewhere…
thx @roadmr for your answer and your time!
Thomas