How do I troubleshoot Amazon CloudWatch Agent startup or instance reboot errors?

2 minute read
0

I want to troubleshoot Amazon CloudWatch Agent startup or instance reboot errors.

Short description

When you start up or reboot an Amazon Elastic Compute Cloud (Amazon EC2) instance in CloudWatch Agent, you might encounter the following issues:

  • CloudWatch Agent is installed, but when you start the service you receive error 1053.
  • CloudWatch Agent is running, but doesn't start automatically when you reboot an Amazon EC2 instance.

Resolution

CloudWatch Agent is installed, but when you start the service you receive error 1053

This error occurs when CloudWatch Agent can't open or locate configuration file C:\ProgramData\Amazon\AmazonCloudWatchAgent\amazon-cloudwatch-agent.json. When CloudWatch Agent attempts to roll back, there's no configuration file in C:\ProgramData\Amazon\AmazonCloudWatchAgent\Configs.

To resolve this error, complete the following steps:

  1. Create a CloudWatch agent configuration file. Or, manually create or edit the CloudWatch agent configuration file.
  2. Copy the file to the config folder C:\ProgramData\Amazon\AmazonCloudWatchAgent\Configs.
  3. Start the CloudWatch Agent service.

CloudWatch Agent is running, but doesn't start automatically when you reboot an Amazon EC2 instance

By default, CloudWatch Agent starts automatically after an instance reboot. If the agent doesn't start up, then check the window event logs for the following error message:

"The Amazon CloudWatch Agent service failed to start due to the following error: The service did not respond to the start or control request in a timely fashion. A timeout was reached (30000 milliseconds) while waiting for the Amazon CloudWatch Agent service to connect."

This error occurs when the CloudWatch agent takes more than 30 seconds to start on a Windows Server installation. To resolve this timeout error, increase the service timeout value. For more information, see A slow service does not start due to time-out error in Windows on the Microsoft website.

AWS OFFICIAL
AWS OFFICIALUpdated 2 months ago