Pages

Wednesday, July 17, 2013

Amazon S3-RequestTimeTooSkewed The difference between the request time and the current time is too large

Recently while working on a Project which had a hosting on Amazon Cloudfront, Storage on S3 and Streaming from Amazon EC2.I came across an issue which went ok initially but became a 2 day R&D Topic for my team after a server shutdown and Reset...

While requesting bucket I got a strange error from Amazon

"RequestTimeTooSkewed The difference between the request time and the current time is too large"

I checked everything from security credentials to bucket name finally going to Amazon Support where I came to knew that i was the fault of my system clock.

Our Systems must sync to NTP-Network Time Protocol in order to sync with Amazon Cloud Services..

My server

Centos which is redhat/suse based

Here is how i resolved the same

First and foremost I installed ntp again to be on safer side and make sure every stone in path was carved to needs

Install NTP
Yum install ntp

Check from config NTP is On
Chkconfig ntpd on

If everything is going well without any warnings till now its time to finalize

Sync Server time with amazon ntp

You have to check by trying to access your bucket and adding file to it after each and every sync with following servers..its like hit and try depending on your region.

ntpdate -u 0.amazon.pool.ntp.org
ntpdate -d 0.amazon.pool.ntp.org

ntpdate -u 1.amazon.pool.ntp.org
ntpdate -d 1.amazon.pool.ntp.org

ntpdate -u 2.amazon.pool.ntp.org
ntpdate -d 2.amazon.pool.ntp.org

ntpdate -u 3.amazon.pool.ntp.org
ntpdate -d 3.amazon.pool.ntp.org

That's it that solved my issue out

No comments:

Post a Comment