PiAware start on PiZeroW running Bookworm fails

I’ve updated one of my feeders to run the latest PI OS, and the sequence of startup often has piaware failing to start on the PiZeroW. If I remember to log into the machine and start the service, it starts just fine.

Jan 31 12:16:59 WimPiZeroW systemd[1]: Started piaware.service - FlightAware ADS-B uploader.
Jan 31 12:17:16 WimPiZeroW piaware[468]: software failed to determine MAC address of the device.  cannot proceed without it.
Jan 31 12:17:16 WimPiZeroW systemd[1]: piaware.service: Main process exited, code=exited, status=6/NOTCONFIGURED
Jan 31 12:17:16 WimPiZeroW systemd[1]: piaware.service: Failed with result 'exit-code'.
Jan 31 12:17:16 WimPiZeroW systemd[1]: piaware.service: Consumed 2.069s CPU time.

I’ve noticed that the systemd unit file explicitly won’t restart piaware based on return code 6, described as missing MAC.

# piaware uploader service for systemd
# install in /etc/systemd/system

[Unit]
Description=FlightAware ADS-B uploader
Documentation=https://flightaware.com/adsb/piaware/
Wants=network-online.target
After=dump1090-fa.service network-online.target time-sync.target

[Service]
User=piaware
RuntimeDirectory=piaware
ExecStart=/usr/bin/piaware -p %t/piaware/piaware.pid -plainlog -statusfile %t/piaware/status.json
ExecReload=/bin/kill -HUP $MAINPID
Type=simple
Restart=on-failure
RestartSec=30
# exit code 4 means login failed
# exit code 6 means startup failed (bad args or missing MAC)
RestartPreventExitStatus=4 6
WatchdogSec=120
WatchdogSignal=SIGKILL
NotifyAccess=all

[Install]
WantedBy=default.target

Will removing the 6 from the RestartPreventExitStatus line likely fix my problems, and what are the implications doing so?

If I do that I’ll probably also increase the RestartSec value from 30 to 60.

It will mean that piaware might keep restarting in a loop indefinitely if there is some problem that prevents it working correctly (e.g. login failure).

We should probably relax the requirement of finding a MAC address, it’s mostly a legacy thing.
I guess in your case it’s something like the wireless interface isn’t present yet at the point that piaware first starts.

Thanks for the information. I at least got this system working correctly by removing the 6. With my changes it tries to start a second time a minute later and works properly.

I might also try adding StartLimitBurst to the unit section, but I need to remember more details of exactly how it works.

StartLimitBurst=5
StartLimitIntervalSec=33

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.