Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Flag Service doesn't start when built from repository | server file "missing" #882

Closed
kainawroth opened this issue May 8, 2023 · 14 comments
Labels
bug Something isn't working

Comments

@kainawroth
Copy link

Bug Report

OpenTelemetry Demo 1.4

Symptom

When I build from https://github.com/open-telemetry/opentelemetry-demo with docker compose build, the Feature Flag Service doesn't start and shows in Logs exec /app/bin/server: no such file or directory even though the file is present:

featureflag-notworking-files

When I instead fetch the images from ghcr with docker compose up --no-build, the Feature Flag Service starts without any problems.

Solution

I saved the server file in question from the ghcr image and added it to the version built from the repository, and it fixed the issue:

featureflag-working-files

featureflag-working

Reproduce

Build from https://github.com/open-telemetry/opentelemetry-demo repository.

Additional Context

The file from the ghcr image is 2 Bytes bigger (223 Bytes vs 221 Bytes when composed from the repository) even though the content is the same. Attached are both files for comparison:

server-files.zip

@kainawroth kainawroth added the bug Something isn't working label May 8, 2023
@kainawroth kainawroth changed the title Feature Flag Service doesn't start when built from repository | server file Feature Flag Service doesn't start when built from repository | server file "missing" May 8, 2023
@julianocosta89
Copy link
Member

Hello @kainawroth 👋🏽 ,

Which OS are you using?

@kainawroth
Copy link
Author

Hi @julianocosta89,

I'm using Docker Desktop on Windows 11.

@julianocosta89
Copy link
Member

@kainawroth is this issue gone?

@kainawroth
Copy link
Author

@julianocosta89, I just wanted to check, but I don't even get that far. When I try to compose from the demo repo or from my fork, I'm stuck at the following:

Demo repo:

[+] Building 1359.2s (152/208)
 => => extracting sha256:c1e5026c64577dee4b6bac20b18196f964a41d8b9016fbbbada0c70b601cd5bf                     1274.5s
 => [quoteservice stage-1 3/6] RUN chmod +x /usr/local/bin/install-php-extensions   && install-php-extension  1349.4s
 => => # /src/php/ext/opcache -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I
 => => # /usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -fstack-prote
 => => # ctor-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -fstack-protector-str
 => => # ong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wno-implicit-fallthrough -DZEN
 => => # D_ENABLE_STATIC_TSRMLS_CACHE=1 -DZEND_COMPILE_DL_EXT=1 -c /usr/src/php/ext/opcache/shared_alloc_mmap.c -MMD
 => => # -MF shared_alloc_mmap.dep -MT shared_alloc_mmap.lo  -fPIC -DPIC -o .libs/shared_alloc_mmap.o
 => [frauddetectionservice internal] load metadata for gcr.io/distroless/java17-debian11:latest                  1.5s
 => [accountingservice internal] load metadata for docker.io/library/golang:1.19.2-alpine                        1.7s
 => [frauddetectionservice auth] library/gradle:pull token for registry-1.docker.io                              0.0s
 => [accountingservice] importing cache manifest from ghcr.io/open-telemetry/demo:1.4.0-accountingservice        1.8s
 => [accountingservice builder 1/4] FROM docker.io/library/golang:1.19.2-alpine@sha256:e4dcdac3ed37d8c2b3b8bcef  0.0s
 => [accountingservice internal] load build context                                                              0.7s
 => => transferring context: 192.14kB                                                                            0.2s
 => [frauddetectionservice] importing cache manifest from ghcr.io/open-telemetry/demo:1.4.0-frauddetectionservi  2.0s
 => [frauddetectionservice builder 1/5] FROM docker.io/library/gradle:7-jdk17@sha256:b2d88da755a317d084535201eb  0.0s
 => [frauddetectionservice stage-1 1/4] FROM gcr.io/distroless/java17-debian11@sha256:672df6324b5e36527b201135c  0.0s
 => [frauddetectionservice internal] load build context                                                          0.7s
 => => transferring context: 84.90kB                                                                             0.2s
 => CACHED [accountingservice builder 2/4] WORKDIR /usr/src/app/                                                 0.0s
 => CACHED [accountingservice builder 3/4] COPY ./src/accountingservice/ ./                                      0.0s
 => [accountingservice builder 4/4] RUN go build -o /go/bin/accountingservice/                                1341.0s
 => => # go: downloading github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0
 => => # go: downloading golang.org/x/crypto v0.10.0
 => => # go: downloading github.com/jcmturner/rpc/v2 v2.0.3
 => => # go: downloading github.com/jcmturner/aescts/v2 v2.0.0
 => => # go: downloading google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc
 => => # go: downloading golang.org/x/text v0.10.0
 => CACHED [frauddetectionservice stage-1 2/4] WORKDIR /usr/src/app/                                             0.0s
 => CACHED [frauddetectionservice builder 2/5] WORKDIR /usr/src/app/                                             0.0s
 => CACHED [frauddetectionservice builder 3/5] COPY ./src/frauddetectionservice/ ./                              0.0s
 => CACHED [frauddetectionservice builder 4/5] COPY ./pb/ ./src/main/proto/                                      0.0s
 => CANCELED [frauddetectionservice builder 5/5] RUN gradle shadowJar                                           87.2s

My fork:

[+] Building 260.5s (156/208)
 => [quoteservice stage-1 3/6] RUN chmod +x /usr/local/bin/install-php-extensions   && install-php-extensions  253.3s
 => => # r/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/ph
 => => # p/ext -I/usr/local/include/php/ext/date/lib  -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D
 => => # _FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H  -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_O
 => => # FFSET_BITS=64 -D_GNU_SOURCE   -Wno-implicit-fallthrough -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -DZEND_COMPILE_D
 => => # L_EXT=1 -c /usr/src/php/ext/opcache/shared_alloc_posix.c -o shared_alloc_posix.lo  -MMD -MF shared_alloc_pos
 => => # ix.dep -MT shared_alloc_posix.lo
 => => extracting sha256:c1e5026c64577dee4b6bac20b18196f964a41d8b9016fbbbada0c70b601cd5bf                      182.4s
 => [frauddetectionservice internal] load build context                                                          0.5s
 => => transferring context: 84.90kB                                                                             0.2s
 => [frauddetectionservice stage-1 1/4] FROM gcr.io/distroless/java17-debian11@sha256:672df6324b5e36527b201135c  0.0s
 => CACHED [frauddetectionservice stage-1 2/4] WORKDIR /usr/src/app/                                             0.0s
 => [accountingservice internal] load .dockerignore                                                              0.7s
 => => transferring context: 1.22kB                                                                              0.1s
 => [accountingservice internal] load build definition from Dockerfile                                           0.6s
 => => transferring dockerfile: 478B                                                                             0.1s
 => CACHED [frauddetectionservice builder 2/5] WORKDIR /usr/src/app/                                             0.0s
 => CACHED [frauddetectionservice builder 3/5] COPY ./src/frauddetectionservice/ ./                              0.0s
 => CACHED [frauddetectionservice builder 4/5] COPY ./pb/ ./src/main/proto/                                      0.0s
 => [frauddetectionservice builder 5/5] RUN gradle shadowJar                                                   242.3s
 => => #  - Added support for Java 19.
 => => #  - Introduced `--rerun` flag for individual task rerun.
 => => #  - Improved dependency block for test suites to be strongly typed.
 => => #  - Added a pluggable system for Java toolchains provisioning.
 => => # For more details see https://docs.gradle.org/7.6.1/release-notes.html
 => => # Starting a Gradle Daemon (subsequent builds will be faster)
 => [accountingservice internal] load metadata for docker.io/library/golang:1.19.2-alpine                        3.0s
 => [accountingservice] importing cache manifest from ghcr.io/open-telemetry/demo:1.4.0-accountingservice        2.5s
 => [accountingservice builder 1/4] FROM docker.io/library/golang:1.19.2-alpine@sha256:e4dcdac3ed37d8c2b3b8bcef  0.0s
 => [accountingservice internal] load build context                                                              0.2s
 => => transferring context: 623B                                                                                0.1s
 => CACHED [accountingservice builder 2/4] WORKDIR /usr/src/app/                                                 0.0s
 => CACHED [accountingservice builder 3/4] COPY ./src/accountingservice/ ./                                      0.0s
 => CANCELED [accountingservice builder 4/4] RUN go build -o /go/bin/accountingservice/                         89.4s

I won't cancel, but it doesn't stop building either.

@julianocosta89
Copy link
Member

Hmmm, that is odd.
I know that it may be a lot of pain, but would you be able to run a docker system prune -a, and then, try again?

@kainawroth
Copy link
Author

Thanks, that helped. Unfortunately, I'm still running into the same issue and have to replace the server file after deployment.

@julianocosta89
Copy link
Member

@tsloughter have you ever seen this???

@joshleecreates
Copy link
Contributor

I'm not able to recreate this on ARM64/MacOS — if I have time I will attempt with windows later today.

@tsloughter
Copy link
Member

Has anyone else with Windows 11 tried and reproduced?

@julianocosta89
Copy link
Member

@tsloughter we got another user in slack reporting the same issue in Windows 11 and Docker Desktop.
Any ideas what could be the culprit?
https://cloud-native.slack.com/archives/C03B4CWV4DA/p1690972086181209

@IrrelevantElephant
Copy link

I had the same issue with Docker Desktop and Windows 10. I believe the issue is with line endings in the Feature Flag Service source files. When I converted from CRLF to LF it built and ran without issue.

@kainawroth try configuring your git client to checkout with Unix style line endings rather than windows https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings#global-settings-for-line-endings

Also running in WSL worked without issue.

@tsloughter
Copy link
Member

@julianocosta89 na, no idea. I can ask around to find Erlang Windows users and see if anyone has experienced similar.

@puckpuck
Copy link
Contributor

Is this still something that we need to track? Do we need to document to use WSL if developing on Windows?

@austinlparker
Copy link
Member

Closing this as part of issue cleanup. If there's anything that needs to be done, please create a new issue.

FF Service issues will be mooted by #1388

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants