You are not logged in.

#1 2014-05-30 06:32:50

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Using systemd-timesync instead of NTP

Hi there,

I just read this that with systemd 213 it is now possible to use the systemd-timesync daemon that can replace NTP.

They write:

To make use of
this daemon a new system user and group "systemd-timesync"
needs to be created on installation of systemd.

Is this user and group created automatically by arch on update of systemd?

Is there any other manual intervention required by me or can I simply remove NTP on the update to 213?

Thanks!

Offline

#2 2014-05-30 09:01:52

loqs
Member
Registered: 2014-03-06
Posts: 6,896

Re: Using systemd-timesync instead of NTP

The user and group will be crated with an update to the filesystem package to match systemd 213 see committ

Last edited by loqs (2014-05-30 09:02:34)

Offline

#3 2014-05-30 09:30:00

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: Using systemd-timesync instead of NTP

@loqs

Thanks! So all I need to do is uninstalling ntp once systemd has been updated, correct?

Offline

#4 2014-05-30 09:44:37

loqs
Member
Registered: 2014-03-06
Posts: 6,896

Re: Using systemd-timesync instead of NTP

I do not run testing so I can not say if you will need to manually enable systemd-timesync as well.

Last edited by loqs (2014-05-30 09:45:01)

Offline

#5 2014-06-04 22:15:01

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: Using systemd-timesync instead of NTP

Now it's there!

 create mode 100644 request-key.d/cifs.idmap.conf
 create mode 100644 request-key.d/cifs.spnego.conf
 create mode 100644 systemd/resolved.conf
 create mode 120000 systemd/system/network-online.target.wants/systemd-networkd-wait-online.service
 create mode 100644 systemd/timesyncd.conf

I will remove ntp and see if systemd-timesyncd works out of the box.

Offline

#6 2014-06-06 02:52:40

Nickoladze
Member
Registered: 2014-02-11
Posts: 2

Re: Using systemd-timesync instead of NTP

Seems to run out of the box for me, just had to start the service 'systemd-timesyncd'. Also made sure to reboot since I got a new kernel at the same time.

Offline

#7 2014-06-06 04:35:15

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: Using systemd-timesync instead of NTP

I'm not sure that systemd-timesyncd works without systemd-networkd.  I tried to run it while using alternative network management solutions and while it claimed to have started (and stopped properly), it wasn't reporting any querying and updating of time like this:

Jun 05 19:16:04 thinkpad systemd-timesyncd[281]: interval/delta/delay/jitter/drift 32s/-0.239s/1.087s/0.086s/-500ppm
Jun 05 19:16:36 thinkpad systemd[405]: Time has been changed
Jun 05 19:16:36 thinkpad systemd-timesyncd[281]: interval/delta/delay/jitter/drift 32s/+0.549s/0.017s/0.229s/-500ppm

Offline

#8 2014-06-06 08:16:28

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: Using systemd-timesync instead of NTP

For me it is also not working out of the box with netctl. I get the following error in my journal:

Jun 06 10:02:46 thinkpad systemd-timesyncd[1524]: Assertion 'm->current_server_name' failed at src/timesync/timesyncd.c:235, function manager_send_request(). Aborting.

Offline

#9 2014-06-06 16:25:54

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 808

Re: Using systemd-timesync instead of NTP

I have no idea what isn't playing nice in your situation, but maybe a bug, I'm not running testing.
Also have it working, removed NTP package, enabled 'systemd-timesyncd' & 'systemd-networkd'.
Tried it with both connmand & netctl , both seem to make it work..
If you need more info...
journal:

Jun 06 17:35:42 nymph systemd-timesyncd[401]: Using NTP server [2001:4860:4802:32::f]:123 (time1.google.com).
Jun 06 17:35:43 nymph systemd-timesyncd[401]: Using NTP server 216.239.34.15:123 (time2.google.com).
Jun 06 17:35:43 nymph systemd-timesyncd[401]: interval/delta/delay/jitter/drift 64s/+0.013s/0.032s/0.005s/+92ppm

Do you know, if it is possible to change the NTP server?

Offline

#10 2014-06-06 16:42:53

olantwin
Member
Registered: 2014-05-21
Posts: 28

Re: Using systemd-timesync instead of NTP

Maybe using /etc/systemd/timesyncd.conf .
The file contains some commented out server addresses.

Offline

#11 2014-06-06 16:49:24

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 808

Re: Using systemd-timesync instead of NTP

olantwin wrote:

Maybe using /etc/systemd/timesyncd.conf .
The file contains some commented out server addresses.

Thanks, I totally overlooked that file.

Offline

#12 2014-06-06 17:02:31

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: Using systemd-timesync instead of NTP

olantwin wrote:

Maybe using /etc/systemd/timesyncd.conf .
The file contains some commented out server addresses.

The configuration file just contains the defaults, like all systemd config files.  So you can uncomment them and change them if you like, but you need not uncomment anything for it to run as intended.

I have personally been using wpa_supplicant@.service in combination with systemd-{networkd,resolved} anyway.  So this really isn't an issue for me.  I just decided to give it a whirl for a few hours with other network management daemons.  Maybe I just didn't wait long enough with any of them... I don't know.

Offline

#13 2014-06-06 17:07:51

AnAkkk
Member
Registered: 2014-03-03
Posts: 148

Re: Using systemd-timesync instead of NTP

It works but systemd-networkd doesn't auto start, even if you enable it. How do you make it start automatically for systemd-timesyncd?

Offline

#14 2014-06-06 17:12:22

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: Using systemd-timesync instead of NTP

AnAkkk wrote:

It works but systemd-networkd doesn't auto start, even if you enable it. How do you make it start automatically for systemd-timesyncd?

Enable it like any other service?  I feel like I must be missing something here...

Offline

#15 2014-06-06 17:16:05

AnAkkk
Member
Registered: 2014-03-03
Posts: 148

Re: Using systemd-timesync instead of NTP

WonderWoofy wrote:
AnAkkk wrote:

It works but systemd-networkd doesn't auto start, even if you enable it. How do you make it start automatically for systemd-timesyncd?

Enable it like any other service?  I feel like I must be missing something here...

Enable it and reboot, you'll see it doesn't auto start.

● systemd-networkd.service - Network Service
   Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; enabled)
   Active: inactive (dead)
     Docs: man:systemd-networkd.service(8)

Offline

#16 2014-06-06 17:19:47

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: Using systemd-timesync instead of NTP

Since I actually use systemd-networkd... it works fine for me while enabled.  I'm not sure why you might be getting that.

Offline

#17 2014-06-06 17:21:19

AnAkkk
Member
Registered: 2014-03-03
Posts: 148

Re: Using systemd-timesync instead of NTP

WonderWoofy wrote:

Since I actually use systemd-networkd... it works fine for me while enabled.  I'm not sure why you might be getting that.

I tried on two computers, and I have the same issue. I have to start systemd-networkd manually for systemd-timesyncd to work.

Offline

#18 2014-06-06 23:25:34

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: Using systemd-timesync instead of NTP

Can anyone reproduce my error message from above?

Jun 06 18:26:49 thinkpad systemd-timesyncd[1928]: Assertion 'm->current_server_name' failed at src/timesync/timesyncd.c:235, function manager_send_request(). Aborting.

I also enabled both systemd-networkd and systemd-timesyncd but I still keep getting this error. sad

Offline

#19 2014-06-07 03:06:56

anatolik
Developer
Registered: 2012-09-27
Posts: 433

Re: Using systemd-timesync instead of NTP

orschiro wrote:

Can anyone reproduce my error message from above?

Nope. I use timesyncd at 3 different machines and everything seems fine. Time to send a bug report to systemd folks?

Offline

#20 2014-06-07 08:30:01

ukhippo
Member
From: Non-paged pool
Registered: 2014-02-21
Posts: 366

Re: Using systemd-timesync instead of NTP

Can you ping the NTP servers timesyncd is trying to use?

Offline

#21 2014-06-07 14:26:53

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 808

Re: Using systemd-timesync instead of NTP

ukhippo wrote:

Can you ping the NTP servers timesyncd is trying to use?

I think that is a valid question, looking at the files on github.
I don't know how to solve it, but think this is the part screwing things up, see:
Line 219 https://github.com/systemd/systemd/blob … imesyncd.c

                 * "The client initializes the NTP message header, sends the request
                 * to the server, and strips the time of day from the Transmit
                 * Timestamp field of the reply.  For this purpose, all the NTP
                 * header fields are set to 0, except the Mode, VN, and optional
                 * Transmit Timestamp fields.

Offline

#22 2014-06-27 10:45:52

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,175

Re: Using systemd-timesync instead of NTP

My clock got messed up, and I didn't remember to set it for UTC, so everytime I boot without it being UTC, the clock doesn't update with systemd-timesync, and I manually update it with ntpdate -s xxx.xxx.xxx.xxx.  It only remembers until I reboot.  Then I finally set the clock to UTC, so at least reads the right time in the right timezone.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#23 2014-06-27 11:21:20

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 808

Re: Using systemd-timesync instead of NTP

@nomorewindows, If I get it right, systemd-timesyncd only works when 'etc/timezone' is set to UTC?, also between reboots?

Offline

#24 2014-06-27 13:45:01

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,175

Re: Using systemd-timesync instead of NTP

I set my hardware clock for UTC, and then use /etc/localtime to set the timezone.  I guess the minutes could've still been right, but ntpdate knows the difference.

Last edited by nomorewindows (2014-06-27 13:45:48)


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#25 2014-06-27 14:30:12

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 808

Re: Using systemd-timesync instead of NTP

I don't  have a clue where to start looking, but you could have a look at 'journalctl -b|grep timesyncd', which you may already have done.
Did you set your own pool in timesyncd.conf?, which probably is not of much help either, but I don't have more ideas..., it's just strange it works with UTC, and not with a localtime set

Offline

Board footer

Powered by FluxBB