ntpd errors

Begonnen von sunrat, 2015/11/13, 02:40:13

Vorheriges Thema - Nächstes Thema

sunrat

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?

melmarker


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
Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety. (Benjamin Franklin, November 11, 1755)
Never attribute to malice that which can be adequately explained by stupidity. (Hanlons razor)

sunrat

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!

ayla

hmm...

Zitattimedatectl 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
  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?

sunrat

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.

der_bud

I think ntp functionality of timesyncd should be independent of using network manager or not. Doesn't timedatectl set-ntp true work for you?
Du lachst? Wieso lachst du? Das ist doch oft so, Leute lachen erst und dann sind sie tot.

ayla

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

ayla

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

der_bud

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'
Zitat von: 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?
Du lachst? Wieso lachst du? Das ist doch oft so, Leute lachen erst und dann sind sie tot.

ayla

Status: "Synchronized to time server 131.234.137.24:123 (2.debian.pool.ntp.org)Then:


nano /etc/systemd/timesyncd.conf

[Time]
ZitatNTP=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

der_bud

Du lachst? Wieso lachst du? Das ist doch oft so, Leute lachen erst und dann sind sie tot.