You are not logged in.

#1 2015-06-29 04:45:12

f4hy
Member
From: Pittsburgh Pa
Registered: 2009-02-08
Posts: 55

timedatectl set-ntp is not working

Hey guys. Noticed I had an issue with my clock not syncing.

timedatectl status

gives me

>timedatectl status
      Local time: Mon 2015-06-29 13:42:14 JST
  Universal time: Mon 2015-06-29 04:42:14 UTC
        RTC time: Mon 2015-06-29 04:42:05
       Time zone: Asia/Tokyo (JST, +0900)
 Network time on: yes
NTP synchronized: no
 RTC in local TZ: no

which I guess my problem is the NTP synchronized is 'no'. So to fix it I have tried

timedatectl set-ntp true

however that does not change anything. The

timedatectl status

displays the same thing. the "NTP synchronized" is not changed.

Is that not the correct command? How can I fix this?

Offline

#2 2015-06-29 04:51:06

hydracone
Member
Registered: 2015-06-25
Posts: 24

Re: timedatectl set-ntp is not working

Check whether the time is getting synced with the NTP server :

journalctl --unit=systemd-timesyncd.service

It does take some time for systemd-timesyncd to sync with the NTP server. You'll probably notice it the next time you boot. Also, try checking /etc/systemd/timesyncd.conf

Offline

#3 2015-06-29 04:53:52

f4hy
Member
From: Pittsburgh Pa
Registered: 2009-02-08
Posts: 55

Re: timedatectl set-ntp is not working

It is not getting synced

-- Reboot --
Jun 23 21:34:21 f4hy systemd[1]: Starting Network Time Synchronization...
Jun 23 21:34:21 f4hy systemd[1]: Started Network Time Synchronization.
Jun 24 00:13:54 f4hy systemd[1]: Stopping Network Time Synchronization...
Jun 24 00:13:54 f4hy systemd[1]: Stopped Network Time Synchronization.
-- Reboot --
Jun 24 08:15:25 f4hy systemd[1]: Starting Network Time Synchronization...
Jun 24 08:15:25 f4hy systemd[1]: Started Network Time Synchronization.
Jun 24 23:19:23 f4hy systemd[1]: Stopping Network Time Synchronization...
Jun 24 23:19:23 f4hy systemd[1]: Stopped Network Time Synchronization.
-- Reboot --
Jun 25 08:15:43 f4hy systemd[1]: Starting Network Time Synchronization...
Jun 25 08:15:43 f4hy systemd[1]: Started Network Time Synchronization.
Jun 26 01:03:07 f4hy systemd[1]: Stopping Network Time Synchronization...
Jun 26 01:03:07 f4hy systemd[1]: Stopped Network Time Synchronization.
-- Reboot --
Jun 26 08:15:20 f4hy systemd[1]: Starting Network Time Synchronization...
Jun 26 08:15:20 f4hy systemd[1]: Started Network Time Synchronization.
Jun 27 03:12:59 f4hy systemd[1]: Stopping Network Time Synchronization...
Jun 27 03:12:59 f4hy systemd[1]: Stopped Network Time Synchronization.
-- Reboot --
Jun 27 08:15:47 f4hy systemd[1]: Starting Network Time Synchronization...
Jun 27 08:15:47 f4hy systemd[1]: Started Network Time Synchronization.
Jun 28 01:38:24 f4hy systemd[1]: Stopping Network Time Synchronization...
Jun 28 01:38:24 f4hy systemd[1]: Stopped Network Time Synchronization.
-- Reboot --
Jun 28 10:37:34 f4hy systemd[1]: Starting Network Time Synchronization...
Jun 28 10:37:34 f4hy systemd[1]: Started Network Time Synchronization.
Jun 28 18:52:41 f4hy systemd[1]: Stopping Network Time Synchronization...
Jun 28 18:52:41 f4hy systemd[1]: Stopped Network Time Synchronization.
-- Reboot --
Jun 28 18:53:08 f4hy systemd[1]: Starting Network Time Synchronization...
Jun 28 18:53:08 f4hy systemd[1]: Started Network Time Synchronization.
Jun 28 23:27:00 f4hy systemd[1]: Stopping Network Time Synchronization...
Jun 28 23:27:00 f4hy systemd[1]: Stopped Network Time Synchronization.

No messages of syncing, on a different machine I get proper sync messages. However on the other machine I have

NTP synchronized: yes

yet I don't know how to change that on this machine, as the command set-ntp command doesn't change that it changes the "network time on" line, yet the configuration of both machines seem the same otherwise. Just not sure where to look.

Offline

#4 2015-06-29 08:56:46

hydracone
Member
Registered: 2015-06-25
Posts: 24

Re: timedatectl set-ntp is not working

Could you try to manually restart the systemd-timesyncd.service? Maybe it's trying to sync before the network has been brought up. Also try referring - https://bbs.archlinux.org/viewtopic.php?id=182600

# systemctl restart systemd-timesyncd

Last edited by hydracone (2015-06-29 09:01:25)

Offline

Board footer

Powered by FluxBB