of course i was unable to reproduce problem yesterday - my workaround was still in place! (and working well). doh!
removed my workaround and voilà! problem exhibited again. to summarise: * non-root owner wxsys:wxsys with pidfile in weewx/run/; /etc/init.d/weewx changed to reflect this * no extensions added, no skin configs, high end RPi (4B 8GB with U-3 SD) * tests run while no reports being generated * ’sudo /etc/init.d/weewx stop’ and ’sudo /systemctl stop weewx’ fail to stop weewx; weewx process running happily but systemctl reports it in failed state Jul 9 14:45:25 dizzy weewx[621] INFO weewx.reportengine: Copied 5 files to /opt/weewx/public_html Jul 9 14:47:36 dizzy systemd[1]: Stopping LSB: weewx weather system... Jul 9 14:47:36 dizzy weewx[902]: Stopping weewx weather system: weewxstart-stop-daemon: matching only on non-root pidfile /opt/weewx/run/weewx.pid is insecure Jul 9 14:49:37 dizzy weewx[902]: ........................ failed! Jul 9 14:49:37 dizzy systemd[1]: weewx.service: Control process exited, code=exited, status=1/FAILURE Jul 9 14:49:37 dizzy systemd[1]: weewx.service: Failed with result 'exit-code'. Jul 9 14:49:37 dizzy systemd[1]: Stopped LSB: weewx weather system. Jul 9 14:50:16 dizzy weewx[621] INFO weewx.manager: Added record 2020-07-09 14:50:00 AEST (1594270200) to database 'weewx.sdb' my interpretation of log: * after issuing ‘stop’ command, the command logged “non-root pidfile is insecure” then hung for 121 secs * weewx carried on and never reported SIGTERM => signal was not sent * ‘stop’ command reports failure after timeout and marks state ‘failed’ previous observations: * if weewxd process manually killed during command hang, command notices weewxd gone and completes successfully hypothesis: the “non-root pidfile is insecure” msg indicates start-stop-daemon refused to send signal to pid found in “insecure” pidfile. corollary: this would work fine if run as root, not as wxsys:wxsys Q: is anyone else trying non-root? do they see this behaviour or is it just me? in the meantime, my workaround goes back in place. cheers g-eddy > On 8 Jul 2020, at 11:38 pm, Graham Eddy <[email protected]> wrote: > > will report in when i can reproduce the problem again... > thanks > g-eddy > >> On 8 Jul 2020, at 9:37 pm, mwall <[email protected] >> <mailto:[email protected]>> wrote: >> >> when you do '/etc/init.d/weewx stop' or 'systemctl stop weewx', does weewx >> eventually stop? >> >> when you do either of these commands, this sends a SIGTERM to weewx, which >> tells the main thread to stop. however, weewx will not actually stop until >> all of its threads have completed. so if you have a report that takes a >> long time to run then weewx may not shut down until well after you send the >> SIGTERM. >> -- 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 on the web visit https://groups.google.com/d/msgid/weewx-user/A8303A88-AC66-4F3A-B424-EB21BF14B53A%40gmail.com.
