3

I'm setting up CloudWatch for several of my EC2 instances, using AWS custom CloudWatch metrics.

Everything is going fine, except one of my instances gives me the below error:

ubuntu@my-host:~$ /etc/aws-scripts-mon/mon-put-instance-data.pl --mem-util --disk-space-util --disk-path=/ --aws-credential-file=/etc/aws-scripts-mon/awscreds.template

ERROR: Failed to call CloudWatch: HTTP 400. Message: Signature expired: 20150515T204709Z is now earlier than 20150515T204917Z (20150515T205417Z - 5 min.)

For more information, run 'mon-put-instance-data.pl --help'

I've tried searching around the Internet, including this link, but no luck. Any ideas?

One hint: I have a cron job invoking this same command every 5 minutes. It is also unsuccessful. That may be related to the x - 5 min. message bit in the above error message.

Community
  • 1
  • 1
DJohnson
  • 161
  • 1
  • 8
  • Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See [What topics can I ask about here](http://stackoverflow.com/help/on-topic) in the Help Center. Perhaps [Super User](http://superuser.com/) would be a better place to ask. Also see [Where do I post questions about Dev Ops?](http://meta.stackexchange.com/q/134306). – jww May 15 '15 at 21:07
  • @jww oops sorry about that. I've reposted this question/answer to [ServerFailt](http://serverfault.com/questions/693114/aws-cloudwatch-signature-expired), so feel free to close/delete this. – DJohnson May 19 '15 at 19:28
  • If someone is looking, here is an Amazon guide for dealing with the issue https://aws.amazon.com/premiumsupport/knowledge-center/system-clock-drift-ubuntu/ – TomTom Nov 03 '17 at 12:48

1 Answers1

9

The system time of the problem EC2 instance is off by several minutes. See AWS SDK Error - Signature not yet current

This is likely the solution!

Community
  • 1
  • 1
DJohnson
  • 161
  • 1
  • 8
  • 4
    One of the solutions in the linked answer worked for me, I had to run `sudo ntpdate ntp.ubuntu.com` on my Ubuntu machine. – user666 Sep 21 '16 at 05:03