0

Due to Time Synchronization Issue, We manually tried to sync the time by,

sudo ntpdate pool.ntp.org

It works. But instead of running this command everytime maually, I setup NTP by installing

sudo apt-get install ntp

The output of timedatectl gives :

    Local time: Mon 2017-01-09 10:19:24 CET
  Universal time: Mon 2017-01-09 09:19:24 UTC
        Timezone: Europe/Paris (CET, +0100)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
      DST active: no
 Last DST change: DST ended at
                  Sun 2016-10-30 02:59:59 CEST
                  Sun 2016-10-30 02:00:00 CET
 Next DST change: DST begins (the clock jumps one hour forward) at
                  Sun 2017-03-26 01:59:59 CET
                  Sun 2017-03-26 03:00:00 CEST

NTP enabled & NTP Synchronized value is yes now. But, if i try this command tommorrow, it gives NTP Synchronized value to No & time is still behind 20 minutes that causes wrong time issue.

EDIT :

sudo service ntp status gives Starting NTP server ntpd

ntpq -p gives,

     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 dedibox.demonge 195.83.222.27    2 u   10   64    1    4.715   -4.367   0.000
 electra.pinklem 129.69.1.153     2 u    9   64    1    8.588   -5.518   0.000
 head1.mirror.ca 195.66.241.10    2 u    8   64    1    5.990   -5.512   0.000
 lon.jonesey.net 81.174.136.35    2 u    7   64    1    5.191   -4.197   0.000
 x.ns.gin.ntt.ne 249.224.99.213   2 u    6   64    1   24.962   -3.461   0.000
 alphyn.canonica 132.246.11.231   2 u    5   64    1   75.727   -4.524   0.000
  • Is you ntpd running? Check with service ntp status and add the output of ntpq -p to your question. – Thomas Jan 9 '17 at 10:58
  • @Thomas added the output. Can you check now? – Yuvraj S Jan 9 '17 at 11:12
  • This looks good. Your ` ntpd` is running and can also connect to the ntp servers. Check the same when the problem occurs. If the ntpd is not running, search your logfiles for the reason. If ntpd is still running, check if it can reach the ntp servers ( nptq -p ) and search the logfiles. – Thomas Jan 9 '17 at 11:16
  • By this time tomorrow, for sudo service ntp status command, it shows NTP is not running. That's the issue. It gets automatically stopped. – Yuvraj S Jan 9 '17 at 11:18
  • Have a look at /var/log/syslogto see if there are error messages from ntpd (or maybe some other file in /var/log). If your local time when starting differs from the 'real' time more than 1000s (default), ntpd will not synchronise; you can override this behaviour by adding option -g to the start of ntpd by setting NTPD_OPTS='-g' in /etc/default/ntp, see man ntpd. – ridgy Jan 9 '17 at 11:43

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.