If something happens to the station, weewxd will keep retrying every 60
seconds indefinitely.

On Mon, Sep 26, 2022 at 3:19 PM Ryan Stasel <[email protected]> wrote:

> Thanks Tom, that was easy enough! Got it flipped over to systemd.
>
> Will this also, theoretically, handle the situation where station goes
> offline? Or will weewx die after a few minutes and require manual
> intervention?
>
> On Monday, September 26, 2022 at 2:41:54 PM UTC-7 [email protected] wrote:
>
>> On an RPi running a modern version of Raspbian, I much prefer systemd.
>> Easier to do things like run as a non-root user, and, as you can see, set
>> up dependencies.
>>
>> See the wiki article *How to configure WeeWX to run under systemd
>> <https://github.com/weewx/weewx/wiki/systemd>* if you decide to switch.
>>
>>
>> On Mon, Sep 26, 2022 at 8:47 AM Ryan Stasel <[email protected]> wrote:
>>
>>> Sorry for delay responding, Google groups not auto-subscribing to
>>> threads I start myself is... annoying.
>>>
>>> I'm using the default init.d script I believe. Didn't even know there
>>> was a systemd option.
>>>
>>> So for init.d I should be able to just add "--loop-on-init" to the
>>> "start-stop-daemon" line?
>>>
>>> Or should I just switch to systemd?
>>> On Saturday, September 24, 2022 at 10:54:01 AM UTC-7 [email protected]
>>> wrote:
>>>
>>>> Are you using a systemd script? Or, init? If the former, you could
>>>> include a network target. Under the [Unit] section, you'd want something
>>>> like
>>>>
>>>> [Unit]
>>>>   ...
>>>>   After=network-online.target
>>>>   Wants=network-online.target
>>>>   ...
>>>>
>>>> Alternatively, if you do not use systemd, you can use the
>>>> --loop-on-init flag on the weewxd command line. Normally, if a device
>>>> driver cannot be loaded on startup, weewxd quits, figuring it's a
>>>> configuration issue. This flag tells it to keep trying.
>>>>
>>>>
>>>>
>>>> On Sat, Sep 24, 2022 at 9:58 AM Ryan Stasel <[email protected]> wrote:
>>>>
>>>>> Just restarted my weewx Pi, and noticed Weewx wasn't running. Logs
>>>>> show:
>>>>>
>>>>> Sep 24 09:29:57 raspi-server-misc weewx[528] INFO weewx.engine:
>>>>> Loading station type Vantage (weewx.drivers.vantage)
>>>>> Sep 24 09:29:57 raspi-server-misc weewx[528] ERROR
>>>>> weewx.drivers.vantage: Socket error while opening port 22222 to ethernet
>>>>> host 10.0.6.23.
>>>>> Sep 24 09:29:57 raspi-server-misc weewx[528] ERROR weewx.engine:
>>>>> Import of driver failed: [Errno 101] Network is unreachable (<class
>>>>> 'weewx.WeeWxIOError'>)
>>>>> Sep 24 09:29:57 raspi-server-misc weewx[528] CRITICAL weewx.engine:
>>>>> **** Traceback (most recent call last):
>>>>> Sep 24 09:29:57 raspi-server-misc weewx[528] CRITICAL weewx.engine:
>>>>> **** File "/usr/share/weewx/weewx/drivers/vantage.py", line 342, in 
>>>>> openPort
>>>>> Sep 24 09:29:57 raspi-server-misc weewx[528] CRITICAL weewx.engine:
>>>>> **** self.socket.connect((self.host, self.port))
>>>>> Sep 24 09:29:57 raspi-server-misc weewx[528] CRITICAL weewx.engine:
>>>>> **** OSError: [Errno 101] Network is unreachable
>>>>> Sep 24 09:29:57 raspi-server-misc weewx[528] CRITICAL weewx.engine:
>>>>> ****
>>>>> Sep 24 09:29:57 raspi-server-misc weewx[528] CRITICAL weewx.engine:
>>>>> **** During handling of the above exception, another exception occurred:
>>>>> Sep 24 09:29:57 raspi-server-misc weewx[528] CRITICAL weewx.engine:
>>>>> ****
>>>>> Sep 24 09:29:57 raspi-server-misc weewx[528] CRITICAL weewx.engine:
>>>>> **** Traceback (most recent call last):
>>>>> Sep 24 09:29:57 raspi-server-misc weewx[528] CRITICAL weewx.engine:
>>>>> **** File "/usr/share/weewx/weewx/engine.py", line 119, in setupStation
>>>>> Sep 24 09:29:57 raspi-server-misc weewx[528] CRITICAL weewx.engine:
>>>>> **** self.console = loader_function(config_dict, self)
>>>>> Sep 24 09:29:57 raspi-server-misc weewx[528] CRITICAL weewx.engine:
>>>>> **** File "/usr/share/weewx/weewx/drivers/vantage.py", line 40, in loader
>>>>> Sep 24 09:29:57 raspi-server-misc weewx[528] CRITICAL weewx.engine:
>>>>> **** return VantageService(engine, config_dict)
>>>>> Sep 24 09:29:57 raspi-server-misc weewx[528] CRITICAL weewx.engine:
>>>>> **** File "/usr/share/weewx/weewx/drivers/vantage.py", line 1916, in
>>>>> __init__
>>>>> Sep 24 09:29:57 raspi-server-misc weewx[528] CRITICAL weewx.engine:
>>>>> **** Vantage.__init__(self, **config_dict[DRIVER_NAME])
>>>>> Sep 24 09:29:57 raspi-server-misc weewx[528] CRITICAL weewx.engine:
>>>>> **** File "/usr/share/weewx/weewx/drivers/vantage.py", line 514, in 
>>>>> __init__
>>>>> Sep 24 09:29:57 raspi-server-misc weewx[528] CRITICAL weewx.engine:
>>>>> **** self.port.openPort()
>>>>> Sep 24 09:29:57 raspi-server-misc weewx[528] CRITICAL weewx.engine:
>>>>> **** File "/usr/share/weewx/weewx/drivers/vantage.py", line 346, in 
>>>>> openPort
>>>>> Sep 24 09:29:57 raspi-server-misc weewx[528] CRITICAL weewx.engine:
>>>>> **** raise weewx.WeeWxIOError(ex)
>>>>> Sep 24 09:29:57 raspi-server-misc weewx[528] CRITICAL weewx.engine:
>>>>> **** weewx.WeeWxIOError: [Errno 101] Network is unreachable
>>>>> Sep 24 09:29:57 raspi-server-misc weewx[528] CRITICAL __main__: Unable
>>>>> to load driver: [Errno 101] Network is unreachable
>>>>> Sep 24 09:29:57 raspi-server-misc weewx[528] CRITICAL __main__: ****
>>>>> Exiting...
>>>>>
>>>>> Seems like it tried to start up prior to the network stack. Any way to
>>>>> keep this from happening? Or have weewx wait a bit and try again? I 
>>>>> noticed
>>>>> something similar a couple weeks ago when I was updating my home network
>>>>> (firmware on Unifi switches) weewx couldn't talk to my Vantage so it gave
>>>>> up and died. Seems like it should go into some "retry" state where it 
>>>>> backs
>>>>> off and tries again in like 1-5 minutes automatically.
>>>>>
>>>>> Thanks!
>>>>>
>>>>> --
>>>>> 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/5eaf66b1-6c2d-4007-bdb8-34f9d09ac9een%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/weewx-user/5eaf66b1-6c2d-4007-bdb8-34f9d09ac9een%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>> --
>>> 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/f3667380-9bce-4620-9125-37a0794db00en%40googlegroups.com
>>> <https://groups.google.com/d/msgid/weewx-user/f3667380-9bce-4620-9125-37a0794db00en%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> 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/712204d2-8e60-4ea6-ab82-3d4da5bafb53n%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/712204d2-8e60-4ea6-ab82-3d4da5bafb53n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAPq0zECcd9t34zBrBJTYkXCna5bV-VCt7fWqJCskD%2B4Phf4xeg%40mail.gmail.com.

Reply via email to