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

Docker example failed to run because 'service' has invalid keys: telemetry #657

Closed
yysu opened this issue Sep 22, 2021 · 2 comments
Closed

Comments

@yysu
Copy link

yysu commented Sep 22, 2021

Problem

I followed the step mentioned in the Run a single Aws-OTel-Collector instance in Docker doc

When I ran the docker container :

-bash-4.2$ pwd
/home/ec2-user/test/aws-otel-collector
-bash-4.2$ docker run --rm -p 4317:4317 -p 55680:55680 -p 8889:8888 \
      -e "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}" \
      -e "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}" \
      -e AWS_REGION=us-west-2 \
      -v "${PWD}/examples/docker/config-test.yaml":/otel-local-config.yaml \
      --name awscollector public.ecr.aws/aws-observability/aws-otel-collector:latest \
      --config otel-local-config.yaml;

2021/09/22 04:12:49 AWS OTel Collector version: v0.12.0
2021/09/22 04:12:49 find no extra config, skip it, err: open /opt/aws/aws-otel-collector/etc/extracfg.txt: no such file or directory
2021-09-22T04:12:49.229Z	info	service/collector.go:303	Starting aws-otel-collector...	{"Version": "v0.12.0", "NumCPU": 1}
2021-09-22T04:12:49.229Z	info	service/collector.go:242	Loading configuration...
Error: cannot load configuration: error reading top level configuration sections: 1 error(s) decoding:

* 'service' has invalid keys: telemetry
2021/09/22 04:12:49 application run finished with error: cannot load configuration: error reading top level configuration sections: 1 error(s) decoding:

* 'service' has invalid keys: telemetry

The same error also appeared in docker-compose.

[Workaround]
After removed the last 3 lines in aws-otel-collector/examples/docker/config-test.yaml, I was able to run the container without any error.

Could you please explain if the last 3 lines are needed ?

Thanks for checking the issue.

@Aneurysm9
Copy link
Member

The latest aws-otel-collector image is v0.13.0. You may have a cached image locally and need to docker pull the current image, or use the v0.13.0 tag explicitly instead of latest.

@yysu
Copy link
Author

yysu commented Sep 30, 2021

The latest aws-otel-collector image is v0.13.0. You may have a cached image locally and need to docker pull the current image, or use the v0.13.0 tag explicitly instead of latest.

From my previous testing, I started a new EC2 instance and run the docker image. I thought the latest version at that time is v0.12.0 instead of v0.13.0. Checking the ECR registry, I can confirm the latest v0.13.0 has been published.

Now, I can run the docker image without any issue. Close the issue. Thank you @Aneurysm9

@yysu yysu closed this as completed Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants