SOLVED: WeeWX startup on Debian 12 Bookworm with Vantage Pro console using ethernet

140 views
Skip to first unread message

Neil B

unread,
Feb 21, 2024, 9:57:55 AM2/21/24
to weewx-user
This may not be an issue you have encountered yet, but as it affected me, this post is for others who may have the same problem.

Situation: WeeWX 5.0.2 installed on vanilla Debian 12 (bookwork) with fixed IP address. Weatherstation hardware is Vantage Pro with an ethernet interface.

Issue: WeeWX fails to start and reports:

Feb 21 13:53:05 SCADA weewxd[522]: INFO weewx.engine: Loading station type Vantage (weewx.drivers.vantage)
Feb 21 13:53:05 SCADA weewxd[522]: ERROR weewx.drivers.vantage: Socket error while opening port 22222 to ethernet host >
Feb 21 13:53:05 SCADA weewxd[522]: ERROR weewx.engine: Import of driver failed: [Errno 101] Network is unreachable (<cl>
Feb 21 13:53:05 SCADA weewxd[522]: CRITICAL weewx.engine:     ****  Traceback (most recent call last):
Feb 21 13:53:05 SCADA weewxd[522]: CRITICAL weewx.engine:     ****    File "/usr/share/weewx/weewx/drivers/vantage.py",>
Feb 21 13:53:05 SCADA weewxd[522]: CRITICAL weewx.engine:     ****      self.socket.connect((self.host, self.port))
Feb 21 13:53:05 SCADA weewxd[522]: CRITICAL weewx.engine:     ****  OSError: [Errno 101] Network is unreachable
Feb 21 13:53:05 SCADA weewxd[522]: CRITICAL weewx.engine:     ****
Feb 21 13:53:05 SCADA weewxd[522]: CRITICAL weewx.engine:     ****  During handling of the above exception, another exc>
Feb 21 13:53:05 SCADA weewxd[522]: CRITICAL weewx.engine:     ****
Feb 21 13:53:05 SCADA weewxd[522]: CRITICAL weewx.engine:     ****  Traceback (most recent call last):
Feb 21 13:53:05 SCADA weewxd[522]: CRITICAL weewx.engine:     ****    File "/usr/share/weewx/weewx/engine.py", line 115>
Feb 21 13:53:05 SCADA weewxd[522]: CRITICAL weewx.engine:     ****      self.console = loader_function(config_dict, sel>
Feb 21 13:53:05 SCADA weewxd[522]: CRITICAL weewx.engine:     ****                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^>
Feb 21 13:53:05 SCADA weewxd[522]: CRITICAL weewx.engine:     ****    File "/usr/share/weewx/weewx/drivers/vantage.py",>
Feb 21 13:53:05 SCADA weewxd[522]: CRITICAL weewx.engine:     ****      return VantageService(engine, config_dict)
Feb 21 13:53:05 SCADA weewxd[522]: CRITICAL weewx.engine:     ****             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 21 13:53:05 SCADA weewxd[522]: CRITICAL weewx.engine:     ****    File "/usr/share/weewx/weewx/drivers/vantage.py",>
Feb 21 13:53:05 SCADA weewxd[522]: CRITICAL weewx.engine:     ****      Vantage.__init__(self, **config_dict[DRIVER_NAM>
Feb 21 13:53:05 SCADA weewxd[522]: CRITICAL weewx.engine:     ****    File "/usr/share/weewx/weewx/drivers/vantage.py",>
Feb 21 13:53:05 SCADA weewxd[522]: CRITICAL weewx.engine:     ****      self.port.openPort()
Feb 21 13:53:05 SCADA weewxd[522]: CRITICAL weewx.engine:     ****    File "/usr/share/weewx/weewx/drivers/vantage.py",>
Feb 21 13:53:05 SCADA weewxd[522]: CRITICAL weewx.engine:     ****      raise weewx.WeeWxIOError(ex)
Feb 21 13:53:05 SCADA weewxd[522]: CRITICAL weewx.engine:     ****  weewx.WeeWxIOError: [Errno 101] Network is unreacha>
Feb 21 13:53:05 SCADA weewxd[522]: CRITICAL __main__: Unable to load driver: [Errno 101] Network is unreachable
Feb 21 13:53:05 SCADA weewxd[522]: CRITICAL __main__:     ****  Exiting...
Feb 21 13:53:05 SCADA systemd[1]: weewx.service: Main process exited, code=exited, status=4/NOPERMISSION
Feb 21 13:53:05 SCADA systemd[1]: weewx.service: Failed with result 'exit-code'.


Resolution:

Even though the correct dependencies were set in the 'weewx.service' file, the network was not available in time.  I'd set a static IP address in the '/etc/network/interfaces' file using the standard commands for this.

Solution involved adding an UP SLEEP command. Here is the example that works for me:

iface enp1s0 inet static
        address 192.168.1.242/24
        gateway 192.168.1.254
        up sleep 5

Note: ENP1S0 is my LAN interface name.

Hope this helps any others who come across this.

Neil
Reply all
Reply to author
Forward
0 new messages