> > After=time-sync.target > Wants=network-online.target > After=network-online.target
I'm not an expert on SystemD service files but shouldn't the After= be a single line? eg After=network-online.target time-sync.target On Sat, 15 Aug 2026 at 21:37, [email protected] <[email protected]> wrote: > pi@Pi-3:~ $ sudo systemctl status weewx > ● weewx.service - WeeWX weather system > Loaded: loaded (/etc/systemd/system/weewx.service; enabled; preset: > enabled) > Active: active (running) since Fri 2026-08-14 12:32:53 CDT; 17h ago > Invocation: 267b6c1305ba4ad4a6f6872ade89aa05 > Docs: https://weewx.com/docs > Main PID: 985 (python) > Tasks: 6 (limit: 806) > CPU: 1h 4min 27.142s > CGroup: /system.slice/weewx.service > └─985 /home/pi/weewx-venv/bin/python > /home/pi/weewx-venv/lib/python3.13/site-packages/weewxd.py > /home/pi/weewx-data/weewx.conf > > pi@Pi-3:~ $ cat /etc/systemd/system/weewx.service > # systemd service configuration file for WeeWX > > [Unit] > Description=WeeWX weather system > Documentation=https://weewx.com/docs > Requires=time-sync.target > After=time-sync.target > Wants=network-online.target > After=network-online.target > > # If you are using MySQL uncomment the following lines: > # After=mysqld.service > # Wants=mysqld.service > > # If you are using MariaDB uncomment the following lines: > # After=mariadb.service > # Wants=mariadb.service > > [Service] > ExecStart=/home/pi/weewx-venv/bin/python > /home/pi/weewx-venv/lib/python3.13/site-packages/weewxd.py > /home/pi/weewx-data/weewx.conf > StandardOutput=null > StandardError=journal+console > User=pi > Group=pi > > [Install] > WantedBy=multi-user.target > pi@Pi-3:~ $ > > On Friday, August 14, 2026 at 5:29:04 PM UTC-5 Tom Keffer wrote: > >> Could you post your weewx.service file? >> >> On Fri, Aug 14, 2026 at 2:34 PM [email protected] <[email protected]> >> wrote: >> >>> Tom and Vince, >>> >>> This time gap was only a couple of minutes, but what if the power goes >>> out for a couple of hours? Isn't the station time being changed >>> incorrectly? From my log, a couple of lines above the clock sync: >>> Aug 14 12:33:01 Pi-3 weewxd[985]: INFO weewx.engine: Clock error is >>> 185.33 seconds (positive is fast) >>> Aug 14 12:33:02 Pi-3 weewxd[985]: INFO weewx.drivers.vantage: Clock set >>> to 2026-08-14 12:33:02 CDT (1786728782) >>> Can't that cause db errors and Vantage memory being overwritten if the >>> time is way off? >>> Thanks for your help. Here's the output of those commands: >>> pi@Pi-3:~ $ journalctl -b -u systemd-timesyncd >>> Aug 14 12:32:29 Pi-3 systemd[1]: Starting systemd-timesyncd.service - >>> Network Time Synchronization... >>> Aug 14 12:32:29 Pi-3 systemd[1]: Started systemd-timesyncd.service - >>> Network Time Synchronization. >>> Aug 14 12:32:31 Pi-3 systemd-timesyncd[315]: Network configuration >>> changed, trying to establish connection. >>> Aug 14 12:32:32 Pi-3 systemd-timesyncd[315]: Network configuration >>> changed, trying to establish connection. >>> Aug 14 12:32:32 Pi-3 systemd-timesyncd[315]: Network configuration >>> changed, trying to establish connection. >>> Aug 14 12:32:32 Pi-3 systemd-timesyncd[315]: Network configuration >>> changed, trying to establish connection. >>> Aug 14 12:32:32 Pi-3 systemd-timesyncd[315]: Network configuration >>> changed, trying to establish connection. >>> Aug 14 12:36:07 Pi-3 systemd-timesyncd[315]: Contacted time server >>> [2607:f1c0:f054:5e00::2]:123 (2.debian.pool.ntp.org). >>> Aug 14 12:36:07 Pi-3 systemd-timesyncd[315]: Initial clock >>> synchronization to Fri 2026-08-14 12:36:07.050420 CDT. >>> pi@Pi-3:~ $ journalctl -b -u weewx | head >>> Aug 14 12:32:53 Pi-3 systemd[1]: Started weewx.service - WeeWX weather >>> system. >>> Aug 14 12:32:54 Pi-3 weewxd[985]: INFO __main__: Initializing weewxd >>> version 5.4.0 >>> Aug 14 12:32:54 Pi-3 weewxd[985]: INFO __main__: Command line: >>> /home/pi/weewx-venv/lib/python3.13/site-packages/weewxd.py >>> /home/pi/weewx-data/weewx.conf >>> Aug 14 12:32:54 Pi-3 weewxd[985]: INFO __main__: Using Python: 3.13.5 >>> (main, Jul 15 2026, 20:25:40) [GCC 14.2.0] >>> Aug 14 12:32:54 Pi-3 weewxd[985]: INFO __main__: Located at: >>> /home/pi/weewx-venv/bin/python >>> Aug 14 12:32:54 Pi-3 weewxd[985]: INFO __main__: Platform: >>> Linux-6.18.39+rpt-rpi-v8-aarch64-with-glibc2.41 >>> Aug 14 12:32:54 Pi-3 weewxd[985]: INFO __main__: Locale: >>> 'en_US.UTF-8' >>> Aug 14 12:32:54 Pi-3 weewxd[985]: INFO __main__: Entry path: >>> /home/pi/weewx-venv/lib/python3.13/site-packages/weewxd.py >>> Aug 14 12:32:54 Pi-3 weewxd[985]: INFO __main__: WEEWX_ROOT: >>> /home/pi/weewx-data >>> Aug 14 12:32:54 Pi-3 weewxd[985]: INFO __main__: Config file: >>> /home/pi/weewx-data/weewx.conf >>> pi@Pi-3:~ $ >>> On Friday, August 14, 2026 at 3:01:28 PM UTC-5 Tom Keffer wrote: >>> >>>> I assume your concern are the lines >>>> >>>> Aug 14 12:36:07 Pi-3 systemd-timesyncd[315]: Contacted time server >>>> [2607:f1c0:f054:5e00::2]:123 (2.debian.pool.ntp.org). >>>> Aug 14 12:36:07 Pi-3 systemd-timesyncd[315]: Initial clock synchronization >>>> to Fri 2026-08-14 12:36:07.050420 CDT. >>>> >>>> >>>> which occur well after weewxd has started up. You did not post the full >>>> log from boot, so we don't know if there was an earlier attempt at >>>> synchronization. Let's take a look. Try running this: >>>> >>>> journalctl -b -u systemd-timesyncd >>>> >>>> Compare the time to the weewxd startup: >>>> >>>> journalctl -b -u weewx | head >>>> >>>> Also, was there a meaningful clock correction? Is there something that >>>> is creating concern? >>>> >>>> -tk >>>> >>>> >>>> On Fri, Aug 14, 2026 at 11:52 AM [email protected] <[email protected]> >>>> wrote: >>>> >>>>> I noticed after booting that weewx is starting before the time is >>>>> synchronized. See the partial log attached. I'm a weewx pip install >>>>> Version 5.4 on a Pi running Trixie based Raspberry OS Lite. I don't think >>>>> I've messed with anything and it sure looks like the weewx.service file >>>>> that's active has the Requires= and After=time-sync.target commands. >>>>> >>>>> I don't know when this broke, but I'm positive it used to work. >>>>> >>>>> Walt >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "weewx-user" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to [email protected]. >>>>> To view this discussion visit >>>>> https://groups.google.com/d/msgid/weewx-user/79c08560-8e07-4b39-afca-0eea029149d6n%40googlegroups.com >>>>> <https://groups.google.com/d/msgid/weewx-user/79c08560-8e07-4b39-afca-0eea029149d6n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> >>>> -- >>> You received this message because you are subscribed to the Google >>> Groups "weewx-user" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> >> To view this discussion visit >>> https://groups.google.com/d/msgid/weewx-user/49b52235-bf13-4fc3-a51b-73d4a3ef6261n%40googlegroups.com >>> <https://groups.google.com/d/msgid/weewx-user/49b52235-bf13-4fc3-a51b-73d4a3ef6261n%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- > You received this message because you are subscribed to the Google Groups > "weewx-user" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion visit > https://groups.google.com/d/msgid/weewx-user/d414c6d7-bd3d-4d78-8000-39da0334c3c3n%40googlegroups.com > <https://groups.google.com/d/msgid/weewx-user/d414c6d7-bd3d-4d78-8000-39da0334c3c3n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/weewx-user/CAGTinV7wme-BKc4vPpW0cFFuUg%3D%2B4Wgpi%3DKHLQ3UZ%3DeWddkRNQ%40mail.gmail.com.
