Siduction Forum

Siduction Forum => Software - Support => Topic started by: sunrat on 2015/11/13, 02:40:13

Title: ntpd errors
Post by: sunrat on 2015/11/13, 02:40:13
journalctl is almost free of errors apart from a recurring one for ntpd -
Nov 13 00:18:11 brain ntpd[808]: bind(22) AF_INET6 fe80::fad1:11ff:fe14:3eb%2#123 flags 0x11 failed: Cannot assign requested address
Nov 13 00:18:11 brain ntpd[808]: unable to create socket on wlan0 (44) for fe80::fad1:11ff:fe14:3eb%2#123
Nov 13 09:17:08 brain ntpd[808]: error resolving pool 3.debian.pool.ntp.org: Name or service not known (-2)

Presumably system time is not being synced. Any suggestions?
Title: Re: ntpd errors
Post by: melmarker on 2015/11/13, 02:52:38

apt-get purge ntpdate ntpd (or which package provide ntp)
systemctl enable systemd-timedated

should solve this i think

one can check the status with

timedatectl status
Title: Re: ntpd errors
Post by: sunrat on 2015/11/13, 03:46:49
I purged ntp package and rebooted. No error in journalctl for this boot (yet).
systemd-timedated can not be enabled or disabled as it is static. systemd-timesyncd.service is enabled so I'm guessing that starts systemd-timedated.

roger@brain:~$ timedatectl status
      Local time: Fri 2015-11-13 13:43:38 AEDT
  Universal time: Fri 2015-11-13 02:43:38 UTC
        RTC time: Fri 2015-11-13 02:43:38
       Time zone: Australia/Melbourne (AEDT, +1100)
Network time on: yes
NTP synchronized: yes
RTC in local TZ: no

I'm calling this solved, but curious why ntp is installed by default if it is not needed.
Thanks for your help, melmarker!
Title: Re: ntpd errors
Post by: ayla on 2015/11/13, 05:10:05
hmm...

Quotetimedatectl status
      Local time: Fr 2015-11-13 04:52:02 CET
  Universal time: Fr 2015-11-13 03:52:02 UTC
        RTC time: Fr 2015-11-13 03:52:02
       Time zone: Europe/Berlin (CET, +0100)
Network time on: yes
NTP synchronized: no
RTC in local TZ: no


systemctl status systemd-timesyncd systemd-networkd systemd-timedated.service
● systemd-timesyncd.service - Network Time Synchronization
   Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
  Drop-In: /lib/systemd/system/systemd-timesyncd.service.d
           └─disable-with-time-daemon.conf
   Active: inactive (dead)
Condition: start condition failed at Fr 2015-11-13 04:49:58 CET; 12min ago
     Docs: man:systemd-timesyncd.service(

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

● systemd-timedated.service - Time & Date Service
   Loaded: loaded (/lib/systemd/system/systemd-timedated.service; static; vendor preset: enabled)
   Active: inactive (dead) since Fr 2015-11-13 04:54:49 CET; 7min ago
     Docs: man:systemd-timedated.service(
           man:localtime(5)
           http://www.freedesktop.org/wiki/Software/systemd/timedated (http://www.freedesktop.org/wiki/Software/systemd/timedated)
  Process: 19410 ExecStart=/lib/systemd/systemd-timedated (code=exited, status=0/SUCCESS)
Main PID: 19410 (code=exited, status=0/SUCCESS)

Nov 13 04:54:18 nescaya systemd[1]: Starting Time & Date Service...
Nov 13 04:54:18 nescaya systemd[1]: Started Time & Date Service.

Does this mean I have to deaktivate Networkmanager and use systemd-networkd to get ntp sync back after purging ntp?
Title: Re: ntpd errors
Post by: sunrat on 2015/11/13, 08:53:11
Different result here -
systemctl status systemd-timesyncd systemd-networkd systemd-timedated.service
● systemd-timesyncd.service - Network Time Synchronization
   Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
  Drop-In: /lib/systemd/system/systemd-timesyncd.service.d
           └─disable-with-time-daemon.conf
   Active: active (running) since Fri 2015-11-13 18:29:09 AEDT; 3min 12s ago
     Docs: man:systemd-timesyncd.service(8)
Main PID: 574 (systemd-timesyn)
   Status: "Synchronized to time server 130.102.2.123:123 (0.debian.pool.ntp.org)."
   CGroup: /system.slice/systemd-timesyncd.service
           └─574 /lib/systemd/systemd-timesyncd

Nov 13 18:29:09 brain systemd[1]: Starting Network Time Synchronization...
Nov 13 18:29:09 brain systemd[1]: Started Network Time Synchronization.
Nov 13 18:30:09 brain systemd-timesyncd[574]: Synchronized to time server 130.102.2.123:123 (0.debian.pool.ntp.org).

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

● systemd-timedated.service - Time & Date Service
   Loaded: loaded (/lib/systemd/system/systemd-timedated.service; static; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:systemd-timedated.service(8)
           man:localtime(5)
           http://www.freedesktop.org/wiki/Software/systemd/timedated


The only network I have is wlan0 which is working with NetworkManager.
Title: Re: ntpd errors
Post by: der_bud on 2015/11/13, 10:32:38
I think ntp functionality of timesyncd should be independent of using network manager or not. Doesn't timedatectl set-ntp true work for you?
Title: Re: ntpd errors
Post by: ayla on 2015/11/13, 10:47:19
I'm on my laptop now, here it works without any need of setting or enabling something after purging ntp. Same output as the one of sunrat. And yes, networkmanager is running, so it does not interfere.

Will try your hint when I'm back home, thanks.

greets
ayla
Title: Re: ntpd errors
Post by: ayla on 2015/11/13, 18:52:23
hmm. Now it's running as it should on my desktop also...
# timedatectl status
      Local time: Fr 2015-11-13 18:47:37 CET
  Universal time: Fr 2015-11-13 17:47:37 UTC
        RTC time: Fr 2015-11-13 17:47:37
       Time zone: Europe/Berlin (CET, +0100)
Network time on: yes
NTP synchronized: yes
RTC in local TZ: no

I had rebooted more than twice this morning after purging ntp, no idea what happened in between.

But fine: It's running.

Greets
ayla
Title: Re: ntpd errors
Post by: der_bud on 2015/11/13, 19:09:02
Just for curiosity, do you know which servers are used if not explicity given? I have "NTP synchronized: yes", too, and systemctl status systemd-timesyncd tells me Status: "Synchronized to time server 79.133.48.121:123 (2.debian.pool.ntp.org)."

My /etc/systemd/timesyncd.conf reads #NTP=
#FallbackNTP=0.debian.pool.ntp.org 1.debian.pool.ntp.org 2.debian.pool.ntp.org 3.debian.pool.ntp.org

so there are #comments. According to 'man timesyncd.conf'
Quote from: man timesyncd.conf...If this option is not given, a compiled-in list of NTP servers is used instead.
So what are those compiled-in servers? And can I use the IP of my router instead (in the NTP= line of the conf) , as I have read somewhere that Fritzbox can act as timeserver for local devices?
Title: Re: ntpd errors
Post by: ayla on 2015/11/13, 19:23:33
Status: "Synchronized to time server 131.234.137.24:123 (2.debian.pool.ntp.org)Then:


nano /etc/systemd/timesyncd.conf

[Time]
QuoteNTP=192.168.178.1
#FallbackNTP=0.debian.pool.ntp.org 1.debian.pool.ntp.org 2.debian.pool.ntp.org 3.debian.pool.ntp.org
save&leave
systemctl restart systemd-timesyncd.service
root@nescaya:/home/cal# systemctl status systemd-timesyncd
● systemd-timesyncd.service - Network Time Synchronization
   Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
  Drop-In: /lib/systemd/system/systemd-timesyncd.service.d
           └─disable-with-time-daemon.conf
   Active: active (running) since Fr 2015-11-13 19:19:25 CET; 18s ago
     Docs: man:systemd-timesyncd.service(8)
Main PID: 510 (systemd-timesyn)
   Status: "Synchronized to time server 192.168.178.1:123 (192.168.178.1)."
   CGroup: /system.slice/systemd-timesyncd.service
           └─510 /lib/systemd/systemd-timesyncd

Nov 13 19:19:25 nescaya systemd[1]: Starting Network Time Synchronization...
Nov 13 19:19:25 nescaya systemd[1]: Started Network Time Synchronization.
Nov 13 19:19:25 nescaya systemd-timesyncd[510]: Synchronized to time server 192.168.178.1:123 (192.168.178.1).
root@nescaya:/home/cal# timedatectl status
      Local time: Fr 2015-11-13 19:20:23 CET
  Universal time: Fr 2015-11-13 18:20:23 UTC
        RTC time: Fr 2015-11-13 18:20:23
       Time zone: Europe/Berlin (CET, +0100)
Network time on: yes
NTP synchronized: yes
RTC in local TZ: no


:) seems to work
Title: Re: ntpd errors
Post by: der_bud on 2015/11/13, 20:38:12
Here too, thx.:D