Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: [EN] ntpd errors  (Read 3644 times)

Offline sunrat

  • User
  • Posts: 406
[EN] ntpd errors
« on: 2015/11/13, 02:40:13 »
journalctl is almost free of errors apart from a recurring one for ntpd -
Code: [Select]
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?

Offline melmarker

  • User
  • Posts: 2.799
    • g-com.eu
Re: ntpd errors
« Reply #1 on: 2015/11/13, 02:52:38 »
Code: [Select]
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
Code: [Select]
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)

Offline sunrat

  • User
  • Posts: 406
Re: ntpd errors
« Reply #2 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.

Code: [Select]
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!

Online ayla

  • User
  • Posts: 1.745
Re: ntpd errors
« Reply #3 on: 2015/11/13, 05:10:05 »
hmm...

Quote
timedatectl 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?

Offline sunrat

  • User
  • Posts: 406
Re: ntpd errors
« Reply #4 on: 2015/11/13, 08:53:11 »
Different result here -
Code: [Select]
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.

Offline der_bud

  • User
  • Posts: 1.078
  • member
Re: ntpd errors
« Reply #5 on: 2015/11/13, 10:32:38 »
I think ntp functionality of timesyncd should be independent of using network manager or not. Doesn't
Code: [Select]
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.

Online ayla

  • User
  • Posts: 1.745
Re: ntpd errors
« Reply #6 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

Online ayla

  • User
  • Posts: 1.745
Re: ntpd errors
« Reply #7 on: 2015/11/13, 18:52:23 »
hmm. Now it's running as it should on my desktop also...
#
Code: [Select]
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

Offline der_bud

  • User
  • Posts: 1.078
  • member
Re: ntpd errors
« Reply #8 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
Code: [Select]
Status: "Synchronized to time server 79.133.48.121:123 (2.debian.pool.ntp.org)."
My /etc/systemd/timesyncd.conf reads
Code: [Select]
#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?
Du lachst? Wieso lachst du? Das ist doch oft so, Leute lachen erst und dann sind sie tot.

Online ayla

  • User
  • Posts: 1.745
Re: ntpd errors
« Reply #9 on: 2015/11/13, 19:23:33 »
Code: [Select]
Status: "Synchronized to time server 131.234.137.24:123 (2.debian.pool.ntp.org)Then:
Code: [Select]

nano /etc/systemd/timesyncd.conf
[Time]
Quote
NTP=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
Code: [Select]
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

Offline der_bud

  • User
  • Posts: 1.078
  • member
Re: ntpd errors
« Reply #10 on: 2015/11/13, 20:38:12 »
Here too, thx.:D
Du lachst? Wieso lachst du? Das ist doch oft so, Leute lachen erst und dann sind sie tot.