with the latest version of cmx i've noticed that at first start up cmx start to recording with a wrong clock date. How can i set the correct clock ? (the system clock is ok)
Thanks in advance! this happen with davis and fineoffset station
Moderator: mcrossley
I have had this issue a few times, I did wonder whether I should put in a request for MX to detect a sudden massive change in the clock time, but was not sure what it should then do!
Code: Select all
Wants=network-online.target
After=network-online.target
i've stop cumulus (systemctl stop...). then i've deleted the ping start up on cumulus.ini file, restarted, and now works with correct clock.
I know you have already created 3.15.3 - b3172 in your development, but there are actually only 2 public releases with that change.
My fault, I typed the whole post just before going to bed on Monday, the correct words short downtime were in my head as I composed that post, but I typed the wrong words for the text repeated below, and misled you.
I should have typed "2) I sometimes reboot my computer as part of upgrading to a new MX release, and do not want a long start-up delay for a short downtime."
I don't have the technical knowledge to understand this, but it appears that when I use (a) above, MONO crashes (and creates a dump file), instead of coping with MX restart (maybe another change is needed in service definition file to handle Mono stop?).2) I have seen advice in this support forum, that leaving a RPi running for long periods, can give rise to issues, and sometimes rebooting it is good practice. Therefore when I upgrade MX to a new release, I may EITHER (a) copy all files from release distribution over the existing files, then type "sudo systemctl restart cumulusmx", OR (b) type "sudo systemctl stop cumulusmx", then reboot my RPi, the system is not off long enough for the clock time to be out by more than the logging interval I use. In this case there has been a slight delay for the computer reboot and I do not want MX to add a start-up delay set long enough to always ensure that time-sync has been done.
I have attached the MXdiags file which had debugging turned on at the time. The clock problem and catch-up starts at line 326. The RPi clock corrected itself at line 569 where the time changed from 03:30 to 04:05.[Unit]
Description=CumulusMX service
Documentation=https://cumuluswiki.org/a/Main_Page
Requires= time-sync.target local-fs.target
After=network-online.target
Wants=network-online.target
[Service]
User=root
Group=root
ExecStart=/usr/bin/mono-service -d:/home/pi/CumulusMX CumulusMX.exe -service -lang en-AU
Type=forking
ExecStopPost=/bin/rm /tmp/CumulusMX.exe.lock
[Install]
WantedBy=multi-user.target
Point 1: I did write in the Wiki that the advice re changing the systemd definition file was for technical people, this is because you can't do just that change in that file and expect your raspberry pi to have correct time on restart. There are other start-up processes running on your computer including a fake-hwclock package. It is this package that assigned the fake time of 03:22 for you. That fake time satisfied the time sync condition in your MX service definition file and so it is working as I expected although MX started with incorrect time. Changing the service definition file for MX may be a useful step, but it is not the magic solution for wrong time issues.flort wrote: ↑Sun 22 May 2022 2:16 am I believe I have implemented everything as suggested on the Wiki and in this post with updates to my cumulusmx.service file.
...
The RPi clock corrected itself at line 569 where the time changed from 03:30 to 04:05.
...
It may also be that the time-sync command is not completely working as expected.
Many RPi users don't need an online connection, so these computers are designed to work offline, and not worry about correct time, and I find that useful. I have two Raspberry Pi computers, and I have often seen that when these are connected to the network, it can take several minutes before the time gets corrected, upto 10 minutes.sfws wrote: ↑Mon 14 Mar 2022 10:17 pm It is irrelevant because the RPi clock sync does not happen as soon as the network is available as in my Storm Arwen experience.
...
I decided to research this time-synch issue again
...
My MX service has successfully restarted with this new service definition.
I have not had a power issue to upset the time, and prove it waits for time-sync,
Code: Select all
Ensure systemd-timesyncd.service is being used:
sudo systemctl enable --now systemd-timesyncd.service
Configure time-sync.target to wait until time is synchronised:
sudo systemctl enable --now systemd-time-wait-sync.service
Edit your desired service settings:
sudo systemctl edit <name>.service
Add/edit:
[Unit]
After=time-sync.target
Wants=time-sync.target
Test by rebooting and then from terminal run:
sudo journalctl -b \
-u systemd-timesyncd.service \
-u systemd-time-wait-sync.service \
-u time-sync.target \
-u <name>.service
The log should show entries that confirm the service was only started after time was sync’d.