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!