Following on from an earlier post <https://groups.google.com/d/msg/weewx-development/ISCjmpv62Rs/Hj6sh__-DwAJ>I am finally getting around to attempting to run dual weeWX instances. Whilst the weewx-multi script appears to start the 2 weeWX instances OK (each instance seems to be running as expected) the output from the weewx-multi script indicates weeWX is loaded but failed plus I cannot stop either/any instance using weewx-multi. I am not init or systemd proficient by any stretch of the imagination, so I don't know if this is a simple mis-configuration or my part or whether there is an issue between weewx-multi and systemd.
My setup is a follows. Debian 8.9 running on a VirtualBox VM. WeeWX 3.7.1 was installed via setup.py. I have two .conf files in /home/weewx; simulator.conf and bloomsky.conf. Each .conf uses a different driver (standard weeWX simulator driver and my bloomsky driver respectively), has its own SQLite db and own report directory. Otherwise the .conf are out of the box. In setting up weewx-multi I edited the WEEWX_INSTANCES setting to use "simulator bloomsky". As I have a setup.py install I changed line 65 CFGFILE=/etc/weewx/$INSTANCE.conf to CFGFILE=/home/weewx/$INSTANCE.conf (appreciate this may not be upgrade proof but I think it will do for now). To preserve my 'single instance' setup I copied weewx-multi to /etc/init.d/weewx-multi and made it executable with sudo chmod +x /etc/init.d/weewx-multi. Finally did sudo update-rc.d weewx-multi defaults 98. Now when I do sudo /etc/init.d/weewx-multi start I get: gary@jessie17:~$ sudo /etc/init.d/weewx-multi start [....] Starting weewx-multi (via systemctl): weewx-multi.serviceJob for weewx-multi.service failed. See 'systemctl status weewx-multi.service' and 'journalctl -xn' for details. failed! but both instances are running (and doing what they should); ps -aux shows (extract): root 2361 0.0 1.5 49000 16304 ? S 14:46 0:00 /usr/bin/python /home/weewx/bin/weewxd --daemon --log-label weewx-simulator --pidfile=/var/ run/weewx-simulator.pid /home/weewx/simulator.conf root 2372 0.1 1.8 131460 18620 ? Sl 14:46 0:00 /usr/bin/python /home/weewx/bin/weewxd --daemon --log-label weewx-bloomsky --pidfile=/var/ run/weewx-bloomsky.pid /home/weewx/bloomsky.conf sudo /etc/init.d/weewx-multi status shows: gary@jessie17:~$ sudo /etc/init.d/weewx-multi status ● weewx-multi.service - LSB: weewx-multi Loaded: loaded (/etc/init.d/weewx-multi) Active: failed (Result: exit-code) since Wed 2017-09-06 14:46:01 AEST; 2min 46s ago Process: 2348 ExecStart=/etc/init.d/weewx-multi start (code=exited, status =1/FAILURE) Sep 06 14:47:37 jessie17 weewx-bloomsky[2372]: bloomsky: bloomsky-client: url: https://api.bloomsky.com/api/skydata/ data: {'unit': 'intl'} hdr: {'Authorization': '....qsM='} Sep 06 14:47:38 jessie17 weewx-bloomsky[2372]: bloomsky: bloomsky-client: Next update in 15 seconds Sep 06 14:47:53 jessie17 weewx-bloomsky[2372]: bloomsky: bloomsky-client: url: https://api.bloomsky.com/api/skydata/ data: {'unit': 'intl'} hdr: {'Authorization': '....qsM='} Sep 06 14:47:54 jessie17 weewx-bloomsky[2372]: bloomsky: bloomsky-client: Next update in 15 seconds Sep 06 14:48:09 jessie17 weewx-bloomsky[2372]: bloomsky: bloomsky-client: url: https://api.bloomsky.com/api/skydata/ data: {'unit': 'intl'} hdr: {'Authorization': '....qsM='} Sep 06 14:48:09 jessie17 weewx-bloomsky[2372]: bloomsky: bloomsky-client: Next update in 15 seconds Sep 06 14:48:25 jessie17 weewx-bloomsky[2372]: bloomsky: bloomsky-client: url: https://api.bloomsky.com/api/skydata/ data: {'unit': 'intl'} hdr: {'Authorization': '....qsM='} Sep 06 14:48:26 jessie17 weewx-bloomsky[2372]: bloomsky: bloomsky-client: Next update in 15 seconds Sep 06 14:48:41 jessie17 weewx-bloomsky[2372]: bloomsky: bloomsky-client: url: https://api.bloomsky.com/api/skydata/ data: {'unit': 'intl'} hdr: {'Authorization': '....qsM='} Sep 06 14:48:42 jessie17 weewx-bloomsky[2372]: bloomsky: bloomsky-client: Next update in 15 seconds Similar result for sudo /etc/init.d/weewx-multi status simulator. If I try to stop with sudo /etc/init.d/weewx-multi stop: gary@jessie17:~$ sudo /etc/init.d/weewx-multi stop [ ok ] Stopping weewx-multi (via systemctl): weewx-multi.service. all appears OK but both instances continue to run. I am happy to work through this myself but given my lack of init and systemd knowledge I don't really know where to start. Gary
