v1.300045.0 doesn't work on ECS Fargate
rchanbg opened this issue · 2 comments
Describe the bug
Latest version v1.300045.0 doesn't work on ECS Fargate. The following errors are presented and then the container is stopped:
Error: failed to build pipelines: failed to create "resourcedetection" processor, in pipeline "metrics/application_signals": failed creating detector type "eks": failed to create config: unable to load in-cluster configuration, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined
E! [telegraf] Error running agent: failed to build pipelines: failed to create "resourcedetection" processor, in pipeline "traces/application_signals": failed creating detector type "eks": failed to create config: unable to load in-cluster configuration, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined
Steps to reproduce
Running the cloudwatch agent as a container in ECS Fargate
What did you expect to see?
The container should be in running state
What did you see instead?
The container fails to start
What version did you use?
v1.300045.0
What config did you use?
- Name: cloudwatch-agent
Image: public.ecr.aws/cloudwatch-agent/cloudwatch-agent:1.300045.0b810-arm64
Essential: false
Secrets:
- Name: CW_CONFIG_CONTENT
ValueFrom: ecs-cwagent
LogConfiguration:
LogDriver: awslogs
Options:
awslogs-group: !Ref LogGroup
awslogs-region: !Ref AWS::Region
awslogs-stream-prefix: cloudwatch-agent
Environment
ECS Fargate
Additional context
Previous version v1.300044.0 works fine but on Application Signals Console you get the following warning:
The services in your account are using a version of the CloudWatch agent or EKS add-on that will no longer be supported by Application Signals after August 9, 2024. To continue using Application Signals please upgrade to the latest version. After August 9, 2024 Application Signals will not discover and display services instrumented with previous agent or EKS add-on versions.
And also it shows this link https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Application-Signals-Agent-Versions.html that says versions older than 1.300040.0 would not longer be supported eventhough I'm running v1.300044.0
Thanks for bringing this to our attention. We've released v1.300045.1 (https://gallery.ecr.aws/cloudwatch-agent/cloudwatch-agent) with a fix for this issue. Please try it out.