0

I need to permanently sync my servers NTP with that of Amazon's AWS servers so my request to their servers don't go Awry. i've been able to (temporarily) do so by making the following edits to my ntp.conf file:

# Specify one or more NTP servers.

# Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board
# on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
# more information.
#pool 0.ubuntu.pool.ntp.org iburst
#pool 1.ubuntu.pool.ntp.org iburst
#pool 2.ubuntu.pool.ntp.org iburst
#pool 3.ubuntu.pool.ntp.org iburst
server 0.amazon.pool.ntp.org iburst
server 1.amazon.pool.ntp.org iburst
server 2.amazon.pool.ntp.org iburst
server 3.amazon.pool.ntp.org iburst

Now after a reload of my system, and comparing both amazons server time and my servers time, All is successful:

vagrant@homestead:~$ curl http://s3.amazonaws.com -v
* Connected to s3.amazonaws.com port 80 (#0)
> GET / HTTP/1.1
> Host: s3.amazonaws.com
< Date: Wed, 23 May 2018 04:53:06 GMT
< Location: https://aws.amazon.com/s3/

vagrant@homestead:~$ timedatectl status
      Local time: Wed 2018-05-23 04:54:04 GMT
  Universal time: Wed 2018-05-23 04:54:04 UTC
        RTC time: Wed 2018-05-23 04:54:02
       Time zone: Etc/GMT (GMT, +0000)
 Network time on: no
NTP synchronized: no
 RTC in local TZ: no

However, after about a half hour or so, after checking timedatectl again, the NTP synchronized parameter is flipped to yes, and throws my time completely off again... How can I permanently stop this?

  • What do you mean with time completely off? Is it off for exactly N hours? In that case you have to set your timezone. If it says that it is NTP snychronized it should be precise. – nobody May 23 '18 at 5:38
  • yes it is off about 5 hours @nobody – Itzhak Ira May 23 '18 at 6:43
  • Then try to set the correct timezone. Take a look here tecmint.com/… to see how it should be done. I think setting the correct timezone for the system would work for NTP and timedatectl, too (sudo dpkg-reconfigure tzdata). – nobody May 23 '18 at 10:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.