NTP failed or could not be found!

Hello,

I have problems with NTP services or some confusion. (I’ve been searching the forum but couldn’t find something to fix the problem.)
In some RS it tells me that the NTP service cannot be found

myshake@raspberryshake:/opt $ sudo systemctl status ntp
Unit ntp.service could not be found.

and in other RS the ntp service fails

myshake@raspberryshake:~ $ sudo systemctl status ntp

  • ntp.service - Network Time Service
    Loaded: loaded (/lib/systemd/system/ntp.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Mon 2021-05-24 20:17:22 UTC; 1min 32s ago
    Docs: man:ntpd(8)
    Process: 4951 ExecStart=/usr/lib/ntp/ntp-systemd-wrapper (code=exited, status=0/SUCCESS)
    Main PID: 4957 (code=exited, status=1/FAILURE)

May 24 20:17:22 raspberryshake systemd[1]: Starting Network Time Service…
May 24 20:17:22 raspberryshake ntpd[4951]: ntpd 4.2.8p12@1.3728-o (1): Starting
May 24 20:17:22 raspberryshake ntpd[4951]: Command line: /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 106:111
May 24 20:17:22 raspberryshake systemd[1]: Started Network Time Service.
May 24 20:17:22 raspberryshake ntpd[4957]: proto: precision = 1.407 usec (-19)
May 24 20:17:22 raspberryshake ntpd[4957]: restrict 0.0.0.0: KOD does nothing without LIMITED.
May 24 20:17:22 raspberryshake ntpd[4957]: restrict ::: KOD does nothing without LIMITED.
May 24 20:17:22 raspberryshake ntpd[4957]: unable to bind to wildcard address :: - another process may be running - EXITING
May 24 20:17:22 raspberryshake systemd[1]: ntp.service: Main process exited, code=exited, status=1/FAILURE
May 24 20:17:22 raspberryshake systemd[1]: ntp.service: Failed with result ‘exit-code’.

I am attaching logs of the two examples, R45D7 (ntp cannot be found) and R2E0F (ntp failed)

Thank you very much in advance for the helpRSNTP.txt (4.2 KB)

RSH.R457D.2021-05-24T20 34 49.logs.tar (105 KB) RSH.R2E0F.2021-05-24T20 20 48.logs.tar (1.3 MB)

Hello marvh, welcome to the community!

Thank you for the provided logs. From them, nothing actually appears to be wrong. Both of them successfully manage to activate their NTP service, which means that they are connected to the timing server.

The second one had problems, initially, in finding it, but they were solved soon after.

However, I am also seeing some strange errors in other log files, and I would like to explore those more. Can you please shut down both Shakes, disconnect them from the network, wait for around 10 minutes, reconnect them, turn them on again and wait another 30 minutes.

After this time has passed, please download the logs from both Shakes again and post them here.

Thank you.

Hi Stormchaser,

I attach the log files with the indicated instructions.
I changed the RS R2E0F (I don’t have it within reach) for the REBDD with the same connection characteristics.

Some differences:

REBDD: VPN connection

myshake@raspberryshake:/opt $ timedatectl status

            Local time: Tue 2021-05-25 19:51:36 UTC
            Universal time: Tue 2021-05-25 19:51:36 UTC
             RTC time: n/a
            Time zone: Etc/UTC (UTC, +0000)
            System clock synchronized: yes
            NTP service: inactive
            RTC in local TZ: no

myshake@raspberryshake:/opt $ lsb_release -a

   No LSB modules are available.
   Distributor ID:	Raspbian
   Description:	Raspbian GNU/Linux 10 (buster)
   Release:	10
  Codename:	buster

R457D: NO VPN

myshake@raspberryshake:/opt $ timedatectl status

   Local time: Tue 2021-05-25 19:53:31 UTC
   Universal time: Tue 2021-05-25 19:53:31 UTC
    RTC time: n/a
   Time zone: Etc/UTC (UTC, +0000)
   Network time on: yes
   NTP synchronized: yes
   RTC in local TZ: no

myshake@raspberryshake:/opt $ lsb_release -a

 No LSB modules are available.
 Distributor ID:	Raspbian
 Description:	Raspbian GNU/Linux 9.6 (stretch)
 Release:	9.6
 Codename:	stretch

Thank you very much
RSH.R457D.2021-05-25T19 46 19.logs.tar (278.5 KB) RSH.REBDD.2021-05-25T19 46 06.logs.tar (702.5 KB)

Hello marvh,

Thank you for the new logs. Now they look definitely better, all the strange errors that I was seeing are not present anymore, so a reboot was needed.

I can see the NTP services not starting immediatly, but starting after a couple of seconds. There are quite big differences (more than 2000s for one Shake and just shy of 1000s for the other) but the service seems to be working.

Here are portions of the logs that prove this:

REBDD

2021 145 19:01:24: We have an internet connection
2021 145 19:01:30: NTP failed to start, and we have an interent connection, trying to restart it...
2021 145 19:18:04: We have NTP services

R457D

2021 145 19:17:48: We have an internet connection
2021 145 19:17:48: We have NTP services

If you want, you can manually reset the date and time for your Shakes as explained here: Offline and stand-alone applications (like classroom demos) — Instructions on Setting Up Your Raspberry Shake to make it closer to what the real time is. But, as said, the time synchro services seems to be working fine.

Hi,

One more question:
Is it normal to have the following response for ntp service status?

R457D

myshake@raspberryshake:/opt $ sudo systemctl status ntp
Unit ntp.service could not be found.

REBDD

myshake@raspberryshake:/opt $ sudo systemctl status ntp

  • ntp.service - Network Time Service
    Loaded: loaded (/lib/systemd/system/ntp.service; enabled; vendor preset: enabled)
    Active: inactive (dead) since Tue 2021-05-25 19:01:30 UTC; 20h ago
    Docs: man:ntpd(8)
    Process: 458 ExecStart=/usr/lib/ntp/ntp-systemd-wrapper (code=exited, status=0/SUCCESS)
    Main PID: 475 (code=exited, status=0/SUCCESS)

May 25 19:01:16 raspberryshake ntpd[475]: new interface(s) found: waking up resolver
May 25 19:01:22 raspberryshake ntpd[475]: Listen normally on 6 docker0 172.17.0.2:123
May 25 19:01:22 raspberryshake ntpd[475]: new interface(s) found: waking up resolver
May 25 19:01:30 raspberryshake ntpd[475]: ntpd exiting on signal 15 (Terminated)
May 25 19:01:30 raspberryshake ntpd[475]: 127.127.28.0 local addr 127.0.0.1 ->
May 25 19:01:30 raspberryshake ntpd[475]: 127.127.28.1 local addr 127.0.0.1 ->
May 25 19:01:30 raspberryshake ntpd[475]: 192.36.143.130 local addr 192.168.1.115 ->
May 25 19:01:30 raspberryshake ntpd[475]: 132.248.3.29 local addr 192.168.1.115 ->
May 25 19:01:30 raspberryshake ntpd[475]: 185.194.94.71 local addr 192.168.1.115 ->
May 25 19:01:30 raspberryshake systemd[1]: ntp.service: Succeeded.

Thank you

Víctor H.

Hello again marvh,

Executing that command gives me a failed status result, but the actual two services that control the NTP time synchronization services are, as shown in our manual here NTP and GPS timing details — Instructions on Setting Up Your Raspberry Shake

  • ntpdate
  • ntpd

If you execute a systemctl status with these two names, you will (should) get an “Active” response for both of them.