When I was trying to connect to s3bucket from my local it failed and the reason I found was my system time was bit behind.
So I tried to fix time by running below command:
$ sudo ntpdate pool.ntp.org
But I got this error message:
3 Jun 11:23:43 ntpdate[25890]: the NTP socket is in use, exiting
And tried again by adding -u and it worked:
$ sudo ntpdate -u pool.ntp.org
If that doesn't work, then it can be updated by stopping ntp:
$ sudo service ntp stop [ ok ] Stopping NTP server: ntpd. $ sudo ntpdate pool.ntp.org 3 Jun 11:23:33 ntpdate[25862]: adjust time server 202.60.94.15 offset 105897.873344 sec $ sudo service ntp start
It may ask your password again at that last step.