open-telemetry / opentelemetry-go

OpenTelemetry Go API and SDK
https://opentelemetry.io/docs/languages/go
Apache License 2.0
5.28k stars 1.07k forks source link

exec /otelcol: exec format error #4730

Open sunmery opened 11 months ago

sunmery commented 11 months ago

Description

按照https://github.com/open-telemetry/opentelemetry-go/tree/main/example/otel-collector 运行了Makefile的内容: microk8s kubectl apply -f k8s/otel-collector.yaml 出现错误: exec /otelcol: exec format error

Environment

Steps To Reproduce

  1. microk8s installed on my Mac 14.2Beta,
  2. According to the https://github.com/open-telemetry/opentelemetry-go/tree/main/example/otel-collector I run a Makefile
  3. I changed the kubectl command in the Makefile to microk8s kubectl to run on my microk8s,
  4. I get an error when I run make otel-collector-k8s in opentelemetry-go/example/otel-collector directory: exec format error, this is the contents of the Makefile: microk8s kubectl apply -f k8s/otel-collector.yaml

this is error:

image

Full Description:

image

Possible Additions:

image

Expected behavior

Otell-collector-9dc956dd6-6h9z4 Pod Its state should be Running

oliverdding commented 11 months ago

Hi @lisa-sum , I'm not the developer, but I can answer your question.

Because 0.6.0 is too old to have multi-arch support:

image

https://hub.docker.com/r/otel/opentelemetry-collector-contrib/tags?page=1&name=0.6.0

This example is too old, you can try with the latest tag 0.89.0, which may not work as well.

Or, deploy the helm chart: https://github.com/open-telemetry/opentelemetry-helm-charts

sunmery commented 11 months ago

Hi @lisa-sum , I'm not the developer, but I can answer your question.嗨,我不是开发人员,但我可以回答你的问题。

Because 0.6.0 is too old to have multi-arch support:因为 0.6.0 太旧了,无法提供多架构支持:

image

https://hub.docker.com/r/otel/opentelemetry-collector-contrib/tags?page=1&name=0.6.0

This example is too old, you can try with the latest tag 0.89.0, which may not work as well.这个例子太旧了,你可以尝试使用最新的标签 0.89.0,它可能不起作用。

Or, deploy the helm chart: https://github.com/open-telemetry/opentelemetry-helm-charts或者,部署 helm 图表:https://github.com/open-telemetry/opentelemetry-helm-charts

Thank you. I changed the opentelemetry-go/example/ otell-collector /k8s/ otell-collector.yaml file to the 0.89 image. The error did disappear, but a new problem appeared. I checked the contents of the new Pod, and here is the error message pointing to the configuration data.tel-collector-config in the opentelemetry-go/example/ tel-collector/k8s/otel-collector.yaml file:

image

the documentation may be out of date, I am from https://opentelemetry.io/docs/instrumentation/go/exporters/#otlp tutorial to follow to https://github.com/open-telemetry/opentelemetry-go/tree/main/example/otel-collector expects an official update

this is opentelemetry-go/example/ otell-collector /k8s/ otell-collector.yaml file core config:

image
oliverdding commented 11 months ago

Hi @lisa-sum , use official helm chart please.