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
Agents that are configured with OpenTelemetry Collector are crashing when receiving metrics.
I was being impacted by #1435 , so I already updated agents to version 1.300051.0. Still, I noticed that right before the error (below) there's a retry attempt to IMDS, so I wonder if these are still related.
Steps to reproduce
Launch an EC2 instance (enforced to use IMDSv2, not sure if that matters)
Configure agent with OLTP and configure a client to send metrics to this endpoint (in my case, I'm configuring Terraform Enterprise Agents).
What did you expect to see?
CloudWatch agent able to collect the metrics.
What did you see instead? journalctl -u amazon-cloudwatch-agent -f outputs:
Jan 14 20:27:33 ip-10-14-21-116 systemd[1]: Started Amazon CloudWatch Agent.
Jan 14 20:27:33 ip-10-14-21-116 start-amazon-cloudwatch-agent[24919]: D! [EC2] Found active network interface
Jan 14 20:27:33 ip-10-14-21-116 start-amazon-cloudwatch-agent[24919]: I! imds retry client will retry 1 timesI! Detected the instance is EC2
Jan 14 20:27:33 ip-10-14-21-116 start-amazon-cloudwatch-agent[24919]: 2025/01/14 20:27:33 Reading json config file path: /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.json ...
Jan 14 20:27:33 ip-10-14-21-116 start-amazon-cloudwatch-agent[24919]: /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.json does not exist or cannot read. Skipping it.
Jan 14 20:27:33 ip-10-14-21-116 start-amazon-cloudwatch-agent[24919]: 2025/01/14 20:27:33 Reading json config file path: /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.d/file_deploy-awslogsunified.json ...
Jan 14 20:27:33 ip-10-14-21-116 start-amazon-cloudwatch-agent[24919]: 2025/01/14 20:27:33 I! Valid Json input schema.
Jan 14 20:27:33 ip-10-14-21-116 start-amazon-cloudwatch-agent[24919]: I! Detecting run_as_user...
Jan 14 20:27:33 ip-10-14-21-116 start-amazon-cloudwatch-agent[24919]: I! Trying to detect region from ec2
Jan 14 20:27:33 ip-10-14-21-116 start-amazon-cloudwatch-agent[24919]: timestamp_format set file_path : /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log is the same as agent log file /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log thus do not use timestamp_layout
Jan 14 20:27:33 ip-10-14-21-116 start-amazon-cloudwatch-agent[24919]: timestamp_format set file_path : /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log is the same as agent log file /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log thus do not use timestamp_regex
Jan 14 20:27:33 ip-10-14-21-116 start-amazon-cloudwatch-agent[24919]: 2025/01/14 20:27:33 D! ec2tagger processor required because append_dimensions is set
Jan 14 20:27:33 ip-10-14-21-116 start-amazon-cloudwatch-agent[24919]: 2025/01/14 20:27:33 D! delta processor required because metrics with diskio or net are set
Jan 14 20:27:33 ip-10-14-21-116 start-amazon-cloudwatch-agent[24919]: 2025/01/14 20:27:33 D! ec2tagger processor required because append_dimensions is set
Jan 14 20:27:33 ip-10-14-21-116 start-amazon-cloudwatch-agent[24919]: 2025/01/14 20:27:33 D! delta processor required because metrics with diskio or net are set
Jan 14 20:27:33 ip-10-14-21-116 start-amazon-cloudwatch-agent[24919]: 2025/01/14 20:27:33 D! ec2tagger processor required because append_dimensions is set
Jan 14 20:27:33 ip-10-14-21-116 start-amazon-cloudwatch-agent[24919]: 2025/01/14 20:27:33 Configuration validation first phase succeeded
Jan 14 20:27:33 ip-10-14-21-116 start-amazon-cloudwatch-agent[24915]: I! Detecting run_as_user...
Jan 14 20:28:03 ip-10-14-21-116 start-amazon-cloudwatch-agent[24915]: I! imds retry client will retry 1 timesI! imds retry client will retry 1 timesI! imds retry client will retry 1 timesI! imds retry client will retry 1 timespanic: runtime error: invalid memory address or nil pointer dereference
Jan 14 20:28:03 ip-10-14-21-116 start-amazon-cloudwatch-agent[24915]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x310af22]
Jan 14 20:28:03 ip-10-14-21-116 start-amazon-cloudwatch-agent[24915]: goroutine 145 [running]:
Jan 14 20:28:03 ip-10-14-21-116 start-amazon-cloudwatch-agent[24915]: github.com/aws/amazon-cloudwatch-agent/plugins/outputs/cloudwatch.(*CloudWatch).BuildMetricDatum(0xc0011b4b40, 0xc001562fa0)
Jan 14 20:28:03 ip-10-14-21-116 start-amazon-cloudwatch-agent[24915]: github.com/aws/amazon-cloudwatch-agent/plugins/outputs/cloudwatch/cloudwatch.go:431 +0x422
Jan 14 20:28:03 ip-10-14-21-116 start-amazon-cloudwatch-agent[24915]: github.com/aws/amazon-cloudwatch-agent/plugins/outputs/cloudwatch.(*CloudWatch).pushMetricDatum(0xc0011b4b40)
Jan 14 20:28:03 ip-10-14-21-116 start-amazon-cloudwatch-agent[24915]: github.com/aws/amazon-cloudwatch-agent/plugins/outputs/cloudwatch/cloudwatch.go:175 +0x21a
Jan 14 20:28:03 ip-10-14-21-116 start-amazon-cloudwatch-agent[24915]: created by github.com/aws/amazon-cloudwatch-agent/plugins/outputs/cloudwatch.(*CloudWatch).startRoutines in goroutine 1
Jan 14 20:28:03 ip-10-14-21-116 start-amazon-cloudwatch-agent[24915]: github.com/aws/amazon-cloudwatch-agent/plugins/outputs/cloudwatch/cloudwatch.go:131 +0x318
Jan 14 20:28:03 ip-10-14-21-116 systemd[1]: amazon-cloudwatch-agent.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jan 14 20:28:03 ip-10-14-21-116 systemd[1]: amazon-cloudwatch-agent.service: Failed with result 'exit-code'.
Jan 14 20:29:03 ip-10-14-21-116 systemd[1]: amazon-cloudwatch-agent.service: Service RestartSec=1min expired, scheduling restart.
Jan 14 20:29:03 ip-10-14-21-116 systemd[1]: amazon-cloudwatch-agent.service: Scheduled restart job, restart counter is at 10.
Jan 14 20:29:03 ip-10-14-21-116 systemd[1]: Stopped Amazon CloudWatch Agent.
Jan 14 20:29:03 ip-10-14-21-116 systemd[1]: Started Amazon CloudWatch Agent.
Describe the bug
Agents that are configured with OpenTelemetry Collector are crashing when receiving metrics.
I was being impacted by #1435 , so I already updated agents to version 1.300051.0. Still, I noticed that right before the error (below) there's a retry attempt to IMDS, so I wonder if these are still related.
Steps to reproduce
What did you expect to see?
CloudWatch agent able to collect the metrics.
What did you see instead?
journalctl -u amazon-cloudwatch-agent -f
outputs:The client fails with:
What version did you use?
Version:
v1.300051.0
What config did you use?
Config:
Environment
OS: RHEL 8
The text was updated successfully, but these errors were encountered: