beta-tester / RPi-GPS-PPS-StratumOne

setup a Raspberry Pi as a Stratum One time server (GPS with PPS)
GNU General Public License v3.0
128 stars 27 forks source link

buster-lite 2019-09-26 busts script? #5

Closed dcmk1mr2 closed 4 years ago

dcmk1mr2 commented 4 years ago

I have tried several times with the requisite hardware and software. install-gps-pps.sh ran without errors.

The login shell is disabled over serial. I have tried with and without serial enabled. The only difference is with serial disabled one of the boot steps fails due to no serial, and enabled, after login I get {"class:"VERSION","release":"3.17","rev":"3.17","proto_major":3,"proto_minor":12}

I can login and see that NTP is not the stock version. timedatectl shows NTP inactive.

beta-tester commented 4 years ago

yes, you are right, there is something wrong. i can reproduce that issue as well on an RPi1 + buster lite 2019-09-26. give me some time to figure out, what is going on there.

EDIT: i have to buy a new microSD card to test on a newer RPi, because installing and updateing a RPi1 is too slow to do test runs

beta-tester commented 4 years ago

ok,

1'st, the issue of the {"class:"VERSION","release":"3.17","rev":"3.17","proto_major":3,"proto_minor":12} i don't know how i could prevent this. it must be the initial output of gpsd, because it is the same version number:

$ gpsd -V
gpsd: 3.17 (revision 3.17)

even an untouched raspbian-buster-lite image will show up some glitches on the console, while the login message shows up.

2'nd, timedatectl shows NTP service: inactive, because of a condition. don't run timesyncd if we have another NTP daemon installed ConditionFileIsExecutable=!/usr/sbin/chronyd on man timedatectl is written, that their ntp service value is related to the systemd-timesyncd.service

$ sudo systemctl status systemd-timesyncd.service
Warning: The unit file, source configuration file or drop-ins of systemd-timesyncd.service changed on disk. Run 'systemctl daemon-reload' to reload units.
? 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 Sat 2019-12-07 19:48:39 CET; 3min 22s ago
           ?? ConditionFileIsExecutable=!/usr/sbin/chronyd was not met
     Docs: man:systemd-timesyncd.service(8)

Dec 06 17:33:31 Server systemd[1]: Condition check resulted in Network Time Synchronization being skipped.
Dec 07 19:48:39 Server systemd[1]: Condition check resulted in Network Time Synchronization being skipped.
$ cat /lib/systemd/system/systemd-timesyncd.service.d/disable-with-time-daemon.conf 
[Unit]
# don't run timesyncd if we have another NTP daemon installed
ConditionFileIsExecutable=!/usr/sbin/ntpd
ConditionFileIsExecutable=!/usr/sbin/openntpd
ConditionFileIsExecutable=!/usr/sbin/chronyd
ConditionFileIsExecutable=!/usr/sbin/VBoxService

so, that is the normal behavior when there is another ntp service installed, up and running. it is not good, when two different ntp services are fighting for the control of the clock.

3'rd, NTP is not the stock version... what do you mean? i use chrony, it is now the running NTP service with chronyc you can see the version on the console. take a look to the stable version of chrony for Debian

to see if the sync is working: $ chronyc -m tracking sources

if there are no other issues, i will close this issue...

dcmk1mr2 commented 4 years ago

Chrony display looks correct.

I'm not familiar with chronyc and was stumped without ntpq and so on.

My client PCs can sync to the RasPi server so problem solved.

Thanks!

Martin

beta-tester commented 4 years ago

no problem, and good to know that it works. i also learned something new, it was also new to me, that timedatectl (systemd-timesyncd.service) is working that way.

(and now i have a new spare microSD card only for testing)

bye.