You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey there, @FoxeyesJK! 👋 I'm here to help you out with your otel custom collector issue. I'm a bot that can help you solve bugs, answer questions, and become a contributor. Let's figure this out together!
The "Exec format error" you're encountering is likely due to the binary being built for a different architecture than the one your Docker image is running on. This can happen if the binary is not statically linked or if it requires libraries that are not present in the Alpine Linux base image.
Here are a few steps you can take to resolve this issue:
Ensure Correct Architecture: Make sure that the binary you are copying into the Docker image is built for the correct architecture. If you are building on a different architecture than the one you are targeting (e.g., building on an x86_64 machine for an ARM target), you need to cross-compile the binary.
Static Linking: Ensure that the binary is statically linked. This can be done by setting the CGO_ENABLED=0 environment variable when building the Go binary. This will ensure that the binary does not depend on any shared libraries that might not be present in the Alpine image.
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o otelcol-custom
Use a Compatible Base Image: If the binary is dynamically linked, consider using a base image that includes the necessary libraries. For example, using a debian or ubuntu base image might include the required libraries.
Check Binary Compatibility: Verify that the binary is not corrupted and is executable. You can do this by running the binary on a similar environment outside of Docker to ensure it works as expected.
Use a Known Working Version: If the issue persists, consider using a known working version of the OpenTelemetry Collector that includes statically linked binaries, such as version 0.115.1, which does not have issues with dynamically linked binaries requiring external libraries [1].
By following these steps, you should be able to resolve the "Exec format error" and successfully run your custom OpenTelemetry Collector Docker image.
Hi, I'm new to otel and trying to build a custom collector running our own docker image.
I've been reading the official documentation, and achieved following so far
I'm stuck here running the docker container with what I have below. Any suggestion I can try?
docker run -it --entrypoint sh custom-collector:0.1.8
Dockerfile
config.yaml
manifest.yaml
The text was updated successfully, but these errors were encountered: