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/CAPq0zECAPwquWVfi0o_3X%3DTBb%3DjOhf9rPr8QMNn1A4wxxqfp%2BQ%40mail.gmail.com.
