Weewx 4.3.0 and weewx multi on a fresh install

132 views
Skip to first unread message

sc.lep...@gmail.com

unread,
Jan 17, 2021, 3:52:34 PM1/17/21
to weewx-user
Hello 
FYI : ( I ve posted the same post in weewx developpement group) 


I reinstall from scratch my raspberry Pi 
I decided to install python3 by default  ( now I use  python2)  
I decided to install weewx 4.3.0 latest release

But  I decided to install weewx-multi ( i have 2 stations  an old WMR200 with the good driver) 
and a new Froggit)
I install weewx-multi 
But  It seems there is a little bug when I want to stop service ...
When I start  : 

root@rpi-weewx:/etc/init.d# systemctl status weewx.service
● weewx.service - LSB: weewx-multi
   Loaded: loaded (/etc/init.d/weewx; generated)
   Active: failed (Result: exit-code) since Wed 2021-01-13 22:12:26 CET; 7s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 6148 ExecStart=/etc/init.d/weewx start (code=exited, status=1/FAILURE)
    Tasks: 6 (limit: 2063)
   CGroup: /system.slice/weewx.service
           └─6163 python /usr/share/weewx/weewxd --daemon --log-label weewx-WMR200 --pidfile=/var/run/weewx-WMR200.pid /etc/weewx/WMR200.conf

janv. 13 22:12:27 rpi-weewx python[6163]: weewx-WMR200[6163] INFO weewx.restx: WOW: Posting not enabled.
janv. 13 22:12:27 rpi-weewx python[6163]: weewx-WMR200[6163] INFO weewx.restx: AWEKAS: Posting not enabled.
janv. 13 22:12:27 rpi-weewx python[6163]: weewx-WMR200[6163] INFO __main__: Starting up weewx version 4.3.0
janv. 13 22:12:27 rpi-weewx python[6163]: weewx-WMR200[6163] INFO weewx.engine: Using binding 'wx_binding' to database 'weewx-WMR200.sdb'
janv. 13 22:12:27 rpi-weewx python[6163]: weewx-WMR200[6163] INFO weewx.manager: Starting backfill of daily summaries
janv. 13 22:12:28 rpi-weewx python[6163]: weewx-WMR200[6163] INFO user.wmr200: Time drift between host and console in seconds:29
janv. 13 22:12:32 rpi-weewx python[6163]: weewx-WMR200[6163] INFO user.wmr200: genStartup() Still receiving archive packets cnt:0 len:1
janv. 13 22:12:32 rpi-weewx python[6163]: weewx-WMR200[6163] INFO user.wmr200: Using pc time adjusting archive record time by 29 sec 2021-01-13 06:21:00 CET (1610515260) => 2021-01-13 06:21:29 CET (1610515289)
janv. 13 22:12:32 rpi-weewx python[6163]: weewx-WMR200[6163] INFO weewx.manager: Added record 2021-01-13 06:21:29 CET (1610515289) to database 'weewx-WMR200.sdb'
janv. 13 22:12:32 rpi-weewx python[6163]: weewx-WMR200[6163] INFO weewx.manager: Added record 2021-01-13 06:21:29 CET (1610515289) to daily summary in 'weewx-WMR200.sdb'


 this is important i thing  :  
6163 python /usr/share/weewx/weewxd --daemon --log-label weewx-WMR200 --pidfile=/var/run/weewx-WMR200.pid /etc/weewx/WMR200.conf  

But When I want to stop the weewx service 
never this PID is killed ;-( ...

Perhaps I ve make some mistakes

Someone help me ? 
Best regards
Stéphane

gjr80

unread,
Jan 17, 2021, 5:31:33 PM1/17/21
to weewx-user
Hi,

It would be helpful to see the WeeWX service file you are using and the corresponding defaults. Assuming you followed the weewx-multi instructions in the wiki the service file should be /etc/init.d/weewx and the defaults /etc/default/weewx-multi. Please post the contents of both here.
 
FYI : ( I ve posted the same post in weewx developpement group)

Also, perhaps you did not read the weewx-user banner:

There is a separate group, weewx-development, for developers who are actively working on extensions and the weewx codebase. 

Please do not cross-post to both weewx-user and weewx-development!

Cross posting doesn't get you any more help any faster, in fact it just slows things down as we have twice as much to read.

Gary

Stéphane et Corinne LE PROVOST

unread,
Jan 18, 2021, 2:18:40 AM1/18/21
to weewx...@googlegroups.com
Hello
the file weewx.txt :is the file in /etc/init.d/
the file etc-default-weewx.txt  is the file in /etc/default/weewx

I ve used it on a old install well but since I install on a fresh install  , I ve problem with the path   (weewx-multi doesnt find the "good path" of weewxd
Thanks a lot 
Stéphane


--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/nlg3qFnlWB8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/f06ec671-467f-48ad-9ee8-f945d23a07acn%40googlegroups.com.
etc-default-weewx.txt
weex.txt

sc.lep...@gmail.com

unread,
Jan 22, 2021, 3:23:08 PM1/22/21
to weewx-user
Hello Gary

I ve tried to reinstall on a fresh install
I install a fresh DEBIAN 10 and by default debian 10 use  systemctl to control service.

It s possible to start / stop weewx with single script (by default)  systemctl start weewx   or systemctl stop weewx : it work well 


I ve found this wiki page   here  :  https://github.com/weewx/weewx/wiki/systemd
this page explain to register weewx but with systemctl service


I want to  install  2 stations 

I dont find anywhere  for weewx-mutli , I found only  here :  https://github.com/weewx/weewx/wiki/weewx-multi
this work only for start ( the 2 process start with good log and good conf file 

like this  :
root      4835     1  0 21:13 ?        00:00:02 python3 /usr/share/weewx/weewxd --daemon --log-label weewx-WMR200 --pidfile=/var/run/weewx-WMR200.pid /etc/weewx/WMR200.conf
root      4847     1  0 21:13 ?        00:00:02 python3 /usr/share/weewx/weewxd --daemon --log-label weewx-FROGGIT --pidfile=/var/run/weewx-FROGGIT.pid /etc/weewx/FROGGIT.conf


but it s impossible to stop these process.

I  m looking for weewx-multi scripts but for systemctl system
Can you help me or someone ?

Best regards 

Stéphane

vince

unread,
Jan 22, 2021, 5:02:27 PM1/22/21
to weewx-user
FWIW, you can always kill the processes directly ala "kill 4835 4847" if you really need to stop it, but typically this is never necessary.


Gary - I would agree that 'stop' does not work on a debian10 system but 'start' works fine.   Same problem exists regardless of whether you use the init.d file directly or if you use systemctl to let systemd control the processes.  Start works.  Stop silently does nothing.  Nothing I could see in the logs to indicate that it even tried to shut the processes down. 
  • One other tidbit is that you need to be consistent re: which way you try to control the processes.  On a debian10 system using a dpkg install, bootups will use systemd to run the legacy init.d file start sequence.  If you 'also' manually start via init.d commands using the pre-systemd instructions on the wiki you'll get 'two' sets of processes running, neither knowing the other exists.  But regardless, I can't find an incantation of systemctl or the init.d commands that actually tries to stop the processes.
  • Lastly, if you manually kill the processes then use systemctl to try to (re)start them, it reports failure but it actually worked and the multiple weewx processes indeed run.   Same for init.d - if you kill the processes and run the init.d manually to start, it silently returns (having succeeded) but then if you run ./init.d/weewx status it reports the processes are not running (although they 'are').  Speculate that's something to do with the old pid files init.d files typically use, but I didn't dig further into that.
Bottom line - I think the weewx-multi thing needs some refactoring for the systemd world.   Uncertain why exactly a debian10 system uses an init.d file for weewx anyway (for a dpkg installation) but it might just be a timing thing for when systemd started to take over the world.


gjr80

unread,
Jan 22, 2021, 7:20:08 PM1/22/21
to weewx-user
 Not sure why this aimed at me, I have never had a problem with the weewx-multi script under Raspbian Stretch or Buster, start/stop/restart/reload all work as expected. Though I only use setup.py installs. I don't have the skills to debug further.

Gary

vince

unread,
Jan 22, 2021, 7:36:35 PM1/22/21
to weewx-user

Oh - you answered earlier so I thought you were interested in more info.  Not a problem....sorry...

Graham Eddy

unread,
Jan 22, 2021, 9:19:05 PM1/22/21
to weewx...@googlegroups.com
this sounds like the posting i made about 12 months ago where ‘stop’ does not work because the options on start-stop-daemon changed and you had to add an extra argument - without the new arg the ‘stop’ silently fails

Graham Eddy

unread,
Jan 22, 2021, 9:21:45 PM1/22/21
to weewx...@googlegroups.com
hmm just recalled that was only for weewx process owned by non-root user - presumably not relevant

sc.lep...@gmail.com

unread,
Jan 23, 2021, 7:59:17 AM1/23/21
to weewx-user
Hello  back 

systemctl is the default system to start /stop / manage service on a Debian 10 / Ubuntu  Centos 7 /8 and in future  Centos  Stream ( ?) 
the two systems coexist (init.d and systemctl) : We can use start / stop system via init.d  ,  the weex-multi script is for this system and dont work fine  with systemctl service.

I find a wiki page   here https://github.com/weewx/weewx/wiki/systemd  by CameronD73 ( but  I dont find  how to contact his author) 

So  i use this system  for  my WMR200 station (weewx-WMR200.service) and another file service  wwewx-FROGGIT.service : 
(this file is in tar.gz source weewx).

I put them in /etc/system.d/system/

stef@debian-weewx:/etc/systemd/system$ ls  -l weewx*
-rw-r--r-- 1 root root 460 janv. 22 23:41 weewx-FROGGIT.service
-rw-r--r-- 1 root root 455 janv. 22 23:41 weewx-WMR200.service
stef@debian-weewx:/etc/systemd/system$


I unsunscribe the init.d service ("weewx service") from init.d  (rc)

And now  , I ve to service which control my 2 stations ! 

stef@debian-weewx:/etc/systemd/system$ ps  -ef | grep weewx
avahi      474     1  0 13:32 ?        00:00:00 avahi-daemon: running [debian-weewx.local]
root       559     1  0 13:32 ?        00:00:04 python3 /usr/share/weewx/weewxd --daemon --log-label weewx-FROGGIT --pidfile=/run/weewx-FROGGIT.pid /etc/weewx/FROGGIT.conf
root       632     1  0 13:32 ?        00:00:04 python3 /usr/share/weewx/weewxd --daemon --log-label weewx-WMR200 --pidfile=/run/weewx-WMR200.pid /etc/weewx/WMR200.conf
stef      1684  1643  0 13:56 pts/0    00:00:00 grep weewx
stef@debian-weewx:/etc/systemd/system$


I will write a post blog on my website in few days.


Perhaps weex-multi must be write for systemctl control service 

Thansk a lot every one  ! 

I ve got a solution  ;) 

Thanks  Gary, Vince, Eddy 

Stéphane 
Reply all
Reply to author
Forward
0 new messages