Wewx is not rebooted with the system

377 views
Skip to first unread message

P C

unread,
Apr 14, 2021, 5:25:44 AM4/14/21
to weewx-user
Hello,

Not used to Linux and Raspbian systems in particular, I can not put Weewx as a service (Deamon).
Thus, when editing the system, Weewx is not restarted.
Can you help me ?

Thank you !

vince

unread,
Apr 14, 2021, 12:59:57 PM4/14/21
to weewx-user
On Wednesday, April 14, 2021 at 2:25:44 AM UTC-7 blaise....@gmail.com wrote:
Not used to Linux and Raspbian systems in particular, I can not put Weewx as a service (Deamon).
Thus, when editing the system, Weewx is not restarted.


What exactly is the problem you are reporting ?

Which version of weewx are you using ?
Did you install from setup.py or from apt-get ?
Which version of the Raspbian os are you running ?
Which driver are you using ?
What do your system logs say ?

 

Susan Mackay

unread,
Apr 14, 2021, 11:18:49 PM4/14/21
to weewx-user
Depending on how you do this, it is quite possible to set up systemctl to do this - you need to 'enable' the service, not just 'start' it.
If you are using the older system (that automatically gets converted to the systemctl equivalent on system boot if it was set up correctly) then there are also other threads in this forum on how to do that.
Susan

P C

unread,
Apr 17, 2021, 8:52:10 AM4/17/21
to weewx-user
Sorry, I do not see how we can put this service on the way.
Thank you for help

log after reboot «
pi@pi:~ $ sudo tail -f /var/log/syslog | tee /var/tmp/SysLog
Apr 17 14:12:33 pi dbus-daemon[352]: [system] Activating via systemd: service name='org.freedesktop.ColorManager' unit='colord.service' requested by ':1.6' (uid=0 pid=341 comm="/usr/sbin/cupsd -l ")
Apr 17 14:12:33 pi systemd[1]: Starting Manage, Install and Generate Color Profiles...
Apr 17 14:12:33 pi dbus-daemon[352]: [system] Successfully activated service 'org.freedesktop.ColorManager'
Apr 17 14:12:33 pi systemd[1]: Started Manage, Install and Generate Color Profiles.
Apr 17 14:12:34 pi colord[977]: failed to get session [pid 341]: Aucune donnée disponible
Apr 17 14:12:39 pi systemd[1]: systemd-fsckd.service: Succeeded.
Apr 17 14:12:51 pi systemd-timesyncd[303]: Synchronized to time server for the first time 193.190.198.10:123 (2.debian.pool.ntp.org).
Apr 17 14:12:52 pi dbus-daemon[679]: [session uid=1000 pid=679] Activating service name='ca.desrt.dconf' requested by ':1.20' (uid=1000 pid=998 comm="mousepad /home/pi/Desktop/aide-m??moire.txt ")
Apr 17 14:12:52 pi dbus-daemon[679]: [session uid=1000 pid=679] Successfully activated service 'ca.desrt.dconf'
Apr 17 14:13:00 pi systemd[1]: systemd-hostnamed.service: Succeeded.
Apr 17 14:15:01 pi CRON[1298]: (root) CMD (/home/pi/Documents/Develop/tfa.sh > /home/pi/Documents/Develop/tfa.log)
»

WeeWX version
4.5.1

pi@pi:~ $ uname -a  
Linux pi 5.10.17-v7+ #1403 SMP Mon Feb 22 11:29:51 GMT 2021 armv7l GNU/Linux

Graham Eddy

unread,
Apr 17, 2021, 9:04:01 AM4/17/21
to weewx...@googlegroups.com
nothing relevant shown in the tiny extract of the very long syslog…
post a copy of your .service file and the systemctl commands you have used

P C

unread,
Apr 17, 2021, 9:57:13 AM4/17/21
to weewx-user
The syslog is right after the reboot, so there is not much.
This is that not know what to set as a parameter for the systemctl command.
I use a translator for English to French.

Graham Eddy

unread,
Apr 17, 2021, 8:58:23 PM4/17/21
to weewx...@googlegroups.com
see weewx util/systemd/weewx.service for an example config file. you will copy this to /etc/systemd/system/.
see online manual systemd.unit(5) to understand its content (you are unlikely to need to change the file)

see online manual systemctl(1) for the commands to start/stop weewx service, once configured as above.
the key command are
  # systemctl [start | stop | enable | status] weewx

(after copying file into /etc/systemd/…, you should run
  # systemctl daemon-reload
to ensure systemd realises it has been updated)

P C

unread,
Apr 18, 2021, 3:13:28 AM4/18/21
to weewx-user
Everything is blocked! And I do not understand the manuals. I copied the file https://github.com/weewx/weewx/blob/master/util/systemd/weewx.service on /etc/systemd system/

# systemctl status weewx
● weewx.service - weewx weather system
   Loaded: loaded (/etc/systemd/system/weewx.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2021-04-18 08:58:19 CEST; 1min 7s ago
  Process: 2183 ExecStart=/home/weewx/bin/weewxd --daemon --pidfile=/var/run/weewx.pid /home/weewx/weewx.conf (code=exited, status=203/EXEC)

avr 18 08:58:19 pi systemd[2183]: weewx.service: Failed at step EXEC spawning /home/weewx/bin/weewxd: No such file or directory
avr 18 08:58:19 pi systemd[1]: Starting weewx weather system...
avr 18 08:58:19 pi systemd[1]: weewx.service: Control process exited, code=exited, status=203/EXEC
avr 18 08:58:19 pi systemd[1]: weewx.service: Failed with result 'exit-code'.
avr 18 08:58:19 pi systemd[1]: Failed to start weewx weather system.

syslog
$ sudo tail -f /var/log/syslog | tee /var/tmp/SysLog
Apr 18 08:49:12 pi dbus-daemon[348]: [system] Activating via systemd: service name='org.freedesktop.ColorManager' unit='colord.service' requested by ':1.7' (uid=0 pid=356 comm="/usr/sbin/cupsd -l ")
Apr 18 08:49:12 pi systemd[1]: Starting Manage, Install and Generate Color Profiles...
Apr 18 08:49:12 pi dbus-daemon[348]: [system] Successfully activated service 'org.freedesktop.ColorManager'
Apr 18 08:49:12 pi systemd[1]: Started Manage, Install and Generate Color Profiles.
Apr 18 08:49:12 pi colord[962]: failed to get session [pid 356]: Aucune donnée disponible
Apr 18 08:49:18 pi systemd[1]: systemd-fsckd.service: Succeeded.
Apr 18 08:49:30 pi systemd-timesyncd[304]: Synchronized to time server for the first time 193.104.37.238:123 (2.debian.pool.ntp.org).
Apr 18 08:49:31 pi dbus-daemon[660]: [session uid=1000 pid=660] Activating service name='ca.desrt.dconf' requested by ':1.20' (uid=1000 pid=986 comm="mousepad /home/pi/Desktop/aide-m??moire.txt ")
Apr 18 08:49:31 pi dbus-daemon[660]: [session uid=1000 pid=660] Successfully activated service 'ca.desrt.dconf'
Apr 18 08:49:40 pi systemd[1]: systemd-hostnamed.service: Succeeded.
Apr 18 08:50:13 pi CRON[1109]: (root) CMD (/home/pi/Documents/Develop/tfa.sh > /home/pi/Documents/Develop/tfa.log)
Apr 18 08:51:01 pi CRON[1214]: (root) CMD (php /home/pi/MB_WeeWX/meteobelgique.php > /dev/null )
Apr 18 08:51:46 pi systemd[1]: Starting weewx weather system...
Apr 18 08:51:46 pi systemd[1324]: weewx.service: Failed to execute command: No such file or directory
Apr 18 08:51:46 pi systemd[1324]: weewx.service: Failed at step EXEC spawning /home/weewx/bin/weewxd: No such file or directory
Apr 18 08:51:46 pi systemd[1]: weewx.service: Control process exited, code=exited, status=203/EXEC
Apr 18 08:51:46 pi systemd[1]: weewx.service: Failed with result 'exit-code'.
Apr 18 08:51:46 pi systemd[1]: Failed to start weewx weather system.
Apr 18 08:55:01 pi CRON[1733]: (root) CMD (/home/pi/Documents/Develop/tfa.sh > /home/pi/Documents/Develop/tfa.log)
Apr 18 08:57:38 pi systemd[1]: Reloading.
Apr 18 08:57:38 pi systemd[1]: /etc/systemd/system/weewx.service:10: PIDFile= references path below legacy directory /var/run/, updating /var/run/weewx.pid → /run/weewx.pid; please update the unit file accordingly.
Apr 18 08:58:19 pi systemd[2183]: weewx.service: Failed to execute command: No such file or directory
Apr 18 08:58:19 pi systemd[2183]: weewx.service: Failed at step EXEC spawning /home/weewx/bin/weewxd: No such file or directory
Apr 18 08:58:19 pi systemd[1]: Starting weewx weather system...
Apr 18 08:58:19 pi systemd[1]: weewx.service: Control process exited, code=exited, status=203/EXEC
Apr 18 08:58:19 pi systemd[1]: weewx.service: Failed with result 'exit-code'.
Apr 18 08:58:19 pi systemd[1]: Failed to start weewx weather system.
Apr 18 09:00:01 pi CRON[2413]: (root) CMD (/home/pi/Documents/Develop/tfa.sh > /home/pi/Documents/Develop/tfa.log)
Apr 18 09:01:01 pi CRON[2547]: (root) CMD (php /home/pi/MB_WeeWX/meteobelgique.php > /dev/null )
Apr 18 09:03:51 pi systemd[1]: Starting Cleanup of Temporary Directories...
Apr 18 09:03:51 pi systemd-tmpfiles[2890]: [/usr/lib/tmpfiles.d/vsftpd.conf:1] Line references path below legacy directory /var/run/, updating /var/run/vsftpd/empty → /run/vsftpd/empty; please update the tmpfiles.d/ drop-in file accordingly.
Apr 18 09:03:51 pi systemd[1]: systemd-tmpfiles-clean.service: Succeeded.
Apr 18 09:03:51 pi systemd[1]: Started Cleanup of Temporary Directories.
Apr 18 09:05:01 pi CRON[3031]: (root) CMD (/home/pi/Documents/Develop/tfa.sh > /home/pi/Documents/Develop/tfa.log)
Apr 18 09:09:00 pi systemd[1]: Starting Clean php session files...
Apr 18 09:09:01 pi systemd[1]: phpsessionclean.service: Succeeded.
Apr 18 09:09:01 pi systemd[1]: Started Clean php session files.
Apr 18 09:09:01 pi CRON[3571]: (root) CMD (  [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Apr 18 09:10:01 pi CRON[3694]: (root) CMD (/home/pi/Documents/Develop/tfa.sh > /home/pi/Documents/Develop/tfa.log)
Apr 18 09:11:01 pi CRON[3823]: (root) CMD (php /home/pi/MB_WeeWX/meteobelgique.php > /dev/null )

Graham Eddy

unread,
Apr 18, 2021, 4:44:01 AM4/18/21
to weewx...@googlegroups.com
change the weewx.service file to point to your weewxd executable.
when you use someone else’s configuartion file, you must always check that it matches your own system configuration and requirements

P C

unread,
Apr 18, 2021, 10:53:52 AM4/18/21
to weewx-user
Well, fortunately I make copies, because it was the disaster.
Thank you for your efforts and sorry I'm void.
I was looking https://github.com/weewx/weewx/blob/master/util/systemd/weewx.service and I changed line 10 according to the indications given for Debian https://weewx.com /docs/debian.htm where the executable is entered in /usr/bin/weewxd and /etc/weewx/weewx.conf, which gives « ExecStart=/usr/bin/weewxd --daemon --pidfile=/var/run/weewx.pid /etc/weewx/weewx.conf »

Before I started this solution, do you think it's correct?
Well to you,
Blaise
Reply all
Reply to author
Forward
0 new messages