v5 Connection Socket Error at initial startup

154 views
Skip to first unread message

Chris Alemany

unread,
Aug 22, 2023, 12:48:32 AM8/22/23
to weewx-development

Hi all,


I'm trying out v5 with the pip install.  

Everything went fine and I'm ready to start it up but on manual startup with weewxd I am getting a Connection Refused error when it tries to connect to my Ethernet serial adapter.


Logs below.


Any known issues on Ethernet connections?

The v.4.10 daemon is stopped.

Permissions issue socket locked out from pi user?


Cheers

Chris



Aug 21 21:32:46 weewx-pi weewx[320981] INFO weewx.engine: Loading station type Vantage (weewx.drivers.vantage)

Aug 21 21:32:46 weewx-pi weewx[320981] ERROR weewx.drivers.vantage: Socket error while opening port 22222 to ethernet host 192.168.1.101.

Aug 21 21:32:46 weewx-pi weewx[320981] ERROR weewx.engine: Import of driver failed: [Errno 111] Connection refused (<class 'weewx.WeeWxIOError'>)

Aug 21 21:32:46 weewx-pi weewx[320981] CRITICAL weewx.engine:     ****  Traceback (most recent call last):

Aug 21 21:32:46 weewx-pi weewx[320981] CRITICAL weewx.engine:     ****    File "/home/pi/weewx-venv/lib/python3.9/site-packages/weewx/drivers/vantage.py", line 354, in openPort

Aug 21 21:32:46 weewx-pi weewx[320981] CRITICAL weewx.engine:     ****      self.socket.connect((self.host, self.port))

Aug 21 21:32:46 weewx-pi weewx[320981] CRITICAL weewx.engine:     ****  ConnectionRefusedError: [Errno 111] Connection refused

Aug 21 21:32:46 weewx-pi weewx[320981] CRITICAL weewx.engine:     ****  

Aug 21 21:32:46 weewx-pi weewx[320981] CRITICAL weewx.engine:     ****  During handling of the above exception, another exception occurred:

Aug 21 21:32:46 weewx-pi weewx[320981] CRITICAL weewx.engine:     ****  

Aug 21 21:32:46 weewx-pi weewx[320981] CRITICAL weewx.engine:     ****  Traceback (most recent call last):

Aug 21 21:32:46 weewx-pi weewx[320981] CRITICAL weewx.engine:     ****    File "/home/pi/weewx-venv/lib/python3.9/site-packages/weewx/engine.py", line 116, in setupStation

Aug 21 21:32:46 weewx-pi weewx[320981] CRITICAL weewx.engine:     ****      self.console = loader_function(config_dict, self)

Aug 21 21:32:46 weewx-pi weewx[320981] CRITICAL weewx.engine:     ****    File "/home/pi/weewx-venv/lib/python3.9/site-packages/weewx/drivers/vantage.py", line 32, in loader

Aug 21 21:32:46 weewx-pi weewx[320981] CRITICAL weewx.engine:     ****      return VantageService(engine, config_dict)

Aug 21 21:32:46 weewx-pi weewx[320981] CRITICAL weewx.engine:     ****    File "/home/pi/weewx-venv/lib/python3.9/site-packages/weewx/drivers/vantage.py", line 2046, in __init__

Aug 21 21:32:46 weewx-pi weewx[320981] CRITICAL weewx.engine:     ****      Vantage.__init__(self, **config_dict[DRIVER_NAME])

Aug 21 21:32:46 weewx-pi weewx[320981] CRITICAL weewx.engine:     ****    File "/home/pi/weewx-venv/lib/python3.9/site-packages/weewx/drivers/vantage.py", line 536, in __init__

Aug 21 21:32:46 weewx-pi weewx[320981] CRITICAL weewx.engine:     ****      self.port.openPort()

Aug 21 21:32:46 weewx-pi weewx[320981] CRITICAL weewx.engine:     ****    File "/home/pi/weewx-venv/lib/python3.9/site-packages/weewx/drivers/vantage.py", line 359, in openPort

Aug 21 21:32:46 weewx-pi weewx[320981] CRITICAL weewx.engine:     ****      raise weewx.WeeWxIOError(ex)

Aug 21 21:32:46 weewx-pi weewx[320981] CRITICAL weewx.engine:     ****  weewx.WeeWxIOError: [Errno 111] Connection refused

Aug 21 21:32:46 weewx-pi weewx[320981] CRITICAL weewxd: Unable to load driver: [Errno 111] Connection refused

Aug 21 21:32:46 weewx-pi weewx[320981] CRITICAL weewxd:     ****  Exiting...

Chris Alemany

unread,
Aug 22, 2023, 11:24:20 AM8/22/23
to weewx-development
I am noticing that when my 4.10 install starts up it often fails to connect to the Ethernet Vantage device the first time but then subsequently retires successfully.

There seems to have been no no retry with v5.

Cheers
Chris

--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/6fc17ef0-eecd-44c2-839d-887b0ca60ed7n%40googlegroups.com.

Tom Keffer

unread,
Aug 22, 2023, 3:12:20 PM8/22/23
to Chris Alemany, weewx-development
1. It would be nice to see the full log from startup, with debug=1.

2. V5 generally does not run as root. Perhaps this is a permissions issue (although I doubt it).

3. By default, weewxd does not try again if the driver fails on startup. The thinking is that the problem is likely to be a configuration issue, so restarting won't help. If you want to try anyway, set option loop_on_init to true.

Chris Alemany

unread,
Aug 23, 2023, 11:31:44 AM8/23/23
to Tom Keffer, weewx-development
Resolved:  
I’ve discovered the issue. It looks like the default port has changed from 4660 to 22222? There was no prompt for this in the initial weectl run (unless I gapped and missed it, if so my bad) so I missed it until I did a comparison on the two weewx.conf files.

The port has been 4660 for as long as I can remember (possibly even going back to wview?). Or perhaps I’ve just been using that port for that long. My suggestion would be to include setting the port in the initial weectl if it’s not already.

V5 has now started up.

Cheers
Chris

jpb...@gmail.com

unread,
Oct 15, 2023, 1:11:38 PM10/15/23
to weewx-development
I know I am replying to an old thread, but 22222 has been the default port for the ethernet/serial adapter for some time. It is configurable if you connect to the 'web server' port of the device.
Reply all
Reply to author
Forward
0 new messages