9

I'm trying to fix error RequestTimeTooSkewed i get when trying to deploy a project to amazon servers i found this article.

http://www.emind.co/how-to/how-to-fix-amazon-s3-requesttimetooskewed/

I was following the steps but stucked at restarting the ntp service.

I used service.ntpd restartcommand but i get a error saying

Failed to restart ntpd.service: Unit ntpd.service not found.

How can i fix this?

Alpha Dog
  • 193
  • 1
  • 2
  • 6

6 Answers6

9

Try

$ systemctl start ntpd 

If that doesn't work, probably ntp is not installed. Try installing it first.

$ sudo yum install ntp 
greenhorn
  • 1,097
  • 6
  • 10
5

The following worked for me.

$ apt install ntpdate
$ apt install ntp
$ ntpdate -u "in.pool.ntp.org"
$ sudo service ntp restart

Note: Replace the server url "in.pool.net.org" with the ntp server available in your country.

avanisagar
  • 111
  • 1
  • 6
1

These two commands fixed things for me in Ubuntu 20.04 server edition:

sudo apt-get install ntp
sudo service ntp restart
user3503711
  • 1,623
  • 1
  • 21
  • 32
0

Although this doesn't resolve your problem with ntpd specifically, here are some relevant docs on time-sync with npd on ubuntu that may be of help to some.

The key portion here is:

In recent Ubuntu releases timesyncd replaces the client portion of ntpd. By default timesyncd regularly checks and keeps the time in sync. It also stores time updates locally, so that after reboots monotonically advances if applicable.

The current status of time and time configuration via timedatectl and timesyncd can be checked with timedatectl status.

In summary: if timedatectl status shows Network time on: yes, then your system is already configured to use ntp in a similar way that would have been achieved with ntpd. This should be the default behavior for "recent" ubuntu releases (confirmed in 16.04).

Community
  • 1
  • 1
7yl4r
  • 4,788
  • 4
  • 34
  • 46
0

On Ubuntu, the service name for ntpd is ntp, not ntpd. So try

$ sudo service ntp restart

or, equivalently

$ sudo systemctl restart ntp
Tilman Schmidt
  • 193
  • 1
  • 5
0

Keep Your Virtual OS machine running on Bridge Adapter and then try -

First run -> yum install ntp and the run

systemctl start ntpd