Vantage ip-read error with VVP

149 views
Skip to first unread message

jmviper

unread,
Mar 13, 2019, 3:19:30 AM3/13/19
to weewx-user
Hi

I've got weewx running through VVP IP/TCP connection in a local network and works fine but sometimes (when there's a problem with the local router) Weewx exits with Vantage: ip-read error: Timed out Unable to wake up console. I see at that moment VVP and is still sending loops and the only solution is restart VVP and Weewx.
Some Weewx configuration to avoid such behaviour??

Thanks

Thomas Keffer

unread,
Mar 13, 2019, 8:06:44 AM3/13/19
to weewx-user
Please include the system log from when you had this error. WeeWX should have restarted itself.

--
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 weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

jmviper

unread,
Mar 13, 2019, 8:28:59 AM3/13/19
to weewx-user

Mar 13 06:25:15 localhost weewx[29634]: cheetahgenerator: Generated 9 files for report StandardReport in 2.67 seconds
Mar 13 06:25:17 localhost weewx[29634]: imagegenerator: Generated 12 images for StandardReport in 2.02 seconds
Mar 13 06:25:17 localhost weewx[29634]: copygenerator: copied 0 files to /var/www/weewx
Mar 13 06:25:19 localhost weewx[29634]: vantage: ip-read error: timed out
Mar 13 06:26:01 localhost CRON[29943]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 06:26:01 localhost weewx[29634]: manager: Added record 2019-03-13 06:26:00 CET (1552454760) to database 'weewx.sdb'
Mar 13 06:26:01 localhost weewx[29634]: manager: Added record 2019-03-13 06:26:00 CET (1552454760) to daily summary in 'weewx.sdb'
Mar 13 06:26:04 localhost weewx[29634]: cheetahgenerator: Generated 9 files for report StandardReport in 1.71 seconds
Mar 13 06:26:06 localhost weewx[29634]: imagegenerator: Generated 12 images for StandardReport in 2.08 seconds
Mar 13 06:26:06 localhost weewx[29634]: copygenerator: copied 0 files to /var/www/weewx
Mar 13 06:26:08 localhost weewx[29634]: vantage: ip-read error: timed out
Mar 13 06:27:01 localhost weewx[29634]: manager: Added record 2019-03-13 06:27:00 CET (1552454820) to database 'weewx.sdb'
Mar 13 06:27:01 localhost rsyslogd0: action 'action 17' resumed (module 'builtin:ompipe') [try http://www.rsyslog.com/e/0 ]
Mar 13 06:27:01 localhost rsyslogd-2359: action 'action 17' resumed (module 'builtin:ompipe') [try http://www.rsyslog.com/e/2359 ]
Mar 13 06:27:01 localhost weewx[29634]: manager: Added record 2019-03-13 06:27:00 CET (1552454820) to daily summary in 'weewx.sdb'
Mar 13 06:27:03 localhost weewx[29634]: cheetahgenerator: Generated 9 files for report StandardReport in 1.69 seconds
Mar 13 06:27:05 localhost weewx[29634]: imagegenerator: Generated 12 images for StandardReport in 2.01 seconds
Mar 13 06:27:05 localhost weewx[29634]: copygenerator: copied 0 files to /var/www/weewx
Mar 13 06:27:07 localhost weewx[29634]: vantage: ip-read error: timed out
Mar 13 06:27:13 localhost weewx[29634]: vantage: ip-read error: timed out
Mar 13 06:27:19 localhost weewx[29634]: vantage: ip-read error: timed out
Mar 13 06:27:25 localhost weewx[29634]: vantage: ip-read error: timed out
Mar 13 06:27:25 localhost weewx[29634]: vantage: Unable to wake up console
Mar 13 06:27:25 localhost weewx[29634]: vantage: LOOP try #1; error: Unable to wake up Vantage console
Mar 13 06:27:31 localhost weewx[29634]: vantage: ip-read error: timed out
Mar 13 06:27:37 localhost weewx[29634]: vantage: ip-read error: timed out
Mar 13 06:27:43 localhost weewx[29634]: vantage: ip-read error: timed out
Mar 13 06:27:49 localhost weewx[29634]: vantage: ip-read error: timed out
Mar 13 06:27:49 localhost weewx[29634]: vantage: Unable to wake up console
Mar 13 06:27:49 localhost weewx[29634]: vantage: LOOP try #2; error: Unable to wake up Vantage console
Mar 13 06:27:55 localhost weewx[29634]: vantage: ip-read error: timed out
Mar 13 06:28:01 localhost weewx[29634]: vantage: ip-read error: timed out
Mar 13 06:28:01 localhost CRON[29949]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 06:28:07 localhost weewx[29634]: vantage: ip-read error: timed out
Mar 13 06:28:11 localhost weewx[29634]: vantage: ip-read error: [Errno 104] Connection reset by peer
Mar 13 06:28:11 localhost weewx[29634]: vantage: Unable to wake up console
Mar 13 06:28:11 localhost weewx[29634]: vantage: LOOP try #3; error: Unable to wake up Vantage console
Mar 13 06:28:11 localhost weewx[29634]: vantage: ip-write error: [Errno 32] Broken pipe
Mar 13 06:28:11 localhost weewx[29634]: vantage: ip-write error: [Errno 32] Broken pipe
Mar 13 06:28:11 localhost weewx[29634]: vantage: ip-write error: [Errno 32] Broken pipe
Mar 13 06:28:11 localhost weewx[29634]: vantage: ip-write error: [Errno 32] Broken pipe
Mar 13 06:28:11 localhost weewx[29634]: vantage: Unable to wake up console
Mar 13 06:28:11 localhost weewx[29634]: vantage: LOOP try #4; error: Unable to wake up Vantage console
Mar 13 06:28:11 localhost weewx[29634]: vantage: LOOP max tries (4) exceeded.
Mar 13 06:28:11 localhost weewx[29634]: engine: Main loop exiting. Shutting engine down.
Mar 13 06:28:11 localhost weewx[29634]: engine: Shutting down StdReport thread
Mar 13 06:28:11 localhost weewx[29634]: vantage: ip-write error: [Errno 32] Broken pipe
Mar 13 06:28:11 localhost weewx[29634]: engine: Caught WeeWxIOError: Max tries exceeded while getting LOOP data.
Mar 13 06:28:11 localhost weewx[29634]:     ****  Waiting 60 seconds then retrying...
Mar 13 06:29:11 localhost weewx[29634]: engine: retrying...
Mar 13 06:29:11 localhost weewx[29634]: engine: Using configuration file /etc/weewx/weewx.conf
Mar 13 06:29:11 localhost weewx[29634]: engine: Loading station type Vantage (weewx.drivers.vantage)
Mar 13 06:29:17 localhost weewx[29634]: vantage: ip-read error: timed out
Mar 13 06:29:23 localhost weewx[29634]: vantage: ip-read error: timed out
Mar 13 06:29:29 localhost weewx[29634]: vantage: ip-read error: timed out
Mar 13 06:29:35 localhost weewx[29634]: vantage: ip-read error: timed out
Mar 13 06:29:35 localhost weewx[29634]: vantage: Unable to wake up console
Mar 13 06:29:35 localhost weewx[29634]: import of driver failed: Unable to wake up Vantage console (<class 'weewx.WakeupError'>)
Mar 13 06:29:35 localhost weewx[29634]: engine: Unable to load driver: Unable to wake up Vantage console
Mar 13 06:29:35 localhost weewx[29634]:     ****  Exiting...
Mar 13 06:30:01 localhost CRON[29954]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 06:30:01 localhost CRON[29955]: (root) CMD (/usr/lib/armbian/armbian-truncate-logs)
Mar 13 06:32:01 localhost CRON[29964]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 06:34:02 localhost CRON[29968]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 06:35:01 localhost CRON[29972]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Mar 13 06:36:01 localhost CRON[29975]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 06:38:01 localhost CRON[29979]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 06:39:01 localhost CRON[29984]: (root) CMD (  [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Mar 13 06:39:01 localhost CRON[29985]: (root) CMD (  [ -x /usr/lib/php5/sessionclean ] && /usr/lib/php5/sessionclean)
Mar 13 06:39:01 localhost systemd[1]: Starting Clean php session files...
Mar 13 06:39:01 localhost systemd[1]: Started Clean php session files.
Mar 13 06:40:01 localhost CRON[30035]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 06:42:01 localhost CRON[30039]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 06:44:01 localhost CRON[30043]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 06:45:01 localhost CRON[30048]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Mar 13 06:45:01 localhost CRON[30049]: (root) CMD (/usr/lib/armbian/armbian-truncate-logs)
Mar 13 06:46:01 localhost CRON[30057]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 06:48:01 localhost CRON[30061]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 06:50:01 localhost CRON[30065]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 06:52:01 localhost CRON[30069]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 06:54:01 localhost CRON[30073]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 06:55:01 localhost CRON[30077]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Mar 13 06:56:01 localhost CRON[30080]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 06:57:55 localhost kernel: [642493.559909] RTL871X: send eapol packet
Mar 13 06:57:55 localhost wpa_supplicant[1260]: wlan1: WPA: Group rekeying completed with 40:7d:0f:7e:ad:80 [GTK=TKIP]
Mar 13 06:57:55 localhost kernel: [642493.562499] RTL871X: set group key camid:6, addr:40:7d:0f:7e:ad:80, kid:2, type:TKIP
Mar 13 06:58:01 localhost CRON[30084]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 07:00:01 localhost CRON[30090]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 07:00:02 localhost CRON[30089]: (root) CMD (/usr/lib/armbian/armbian-truncate-logs)
Mar 13 07:02:01 localhost CRON[30099]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 07:04:01 localhost CRON[30103]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 07:05:01 localhost CRON[30107]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Mar 13 07:06:01 localhost CRON[30110]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 07:08:01 localhost CRON[30114]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 07:09:01 localhost CRON[30119]: (root) CMD (  [ -x /usr/lib/php5/sessionclean ] && /usr/lib/php5/sessionclean)
Mar 13 07:09:01 localhost CRON[30120]: (root) CMD (  [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Mar 13 07:09:01 localhost systemd[1]: Starting Clean php session files...
Mar 13 07:09:02 localhost systemd[1]: Started Clean php session files.
Mar 13 07:10:01 localhost CRON[30170]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 07:12:01 localhost CRON[30174]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 07:14:01 localhost CRON[30178]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 07:15:01 localhost CRON[30183]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Mar 13 07:15:01 localhost CRON[30184]: (root) CMD (/usr/lib/armbian/armbian-truncate-logs)
Mar 13 07:16:01 localhost CRON[30192]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 07:17:01 localhost CRON[30196]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar 13 07:18:01 localhost CRON[30206]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 07:20:01 localhost CRON[30210]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 07:22:01 localhost CRON[30214]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 07:24:01 localhost CRON[30218]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 07:25:01 localhost CRON[30222]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Mar 13 07:26:01 localhost CRON[30225]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 07:28:01 localhost CRON[30229]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 07:30:01 localhost CRON[30234]: (root) CMD (/usr/lib/armbian/armbian-truncate-logs)
Mar 13 07:30:01 localhost CRON[30235]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 07:32:01 localhost CRON[30244]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 07:34:01 localhost CRON[30248]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 07:35:01 localhost CRON[30252]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Mar 13 07:36:01 localhost CRON[30255]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 07:38:01 localhost CRON[30260]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 07:39:01 localhost CRON[30267]: (root) CMD (  [ -x /usr/lib/php5/sessionclean ] && /usr/lib/php5/sessionclean)
Mar 13 07:39:02 localhost CRON[30266]: (root) CMD (  [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Mar 13 07:39:02 localhost systemd[1]: Starting Clean php session files...
Mar 13 07:39:02 localhost systemd[1]: Started Clean php session files.
Mar 13 07:40:01 localhost CRON[30318]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 07:42:01 localhost CRON[30322]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 07:44:01 localhost CRON[30326]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 07:45:01 localhost CRON[30332]: (root) CMD (/usr/lib/armbian/armbian-truncate-logs)
Mar 13 07:45:01 localhost CRON[30331]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Mar 13 07:46:01 localhost CRON[30340]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 07:48:01 localhost CRON[30344]: (root) CMD (/home/jmviper/compsht35.sh)
Mar 13 07:48:55 localhost systemd[1]: Starting user-0.slice.
Mar 13 07:48:55 localhost systemd[1]: Created slice user-0.slice.
Mar 13 07:48:55 localhost systemd[1]: Starting User Manager for UID 0...
Mar 13 07:48:55 localhost systemd[1]: Starting Session 8165 of user root.
Mar 13 07:48:55 localhost systemd[1]: Started Session 8165 of user root.
Mar 13 07:48:55 localhost systemd[30354]: Starting Paths.
Mar 13 07:48:55 localhost systemd[30354]: Reached target Paths.
Mar 13 07:48:55 localhost systemd[30354]: Starting Timers.
Mar 13 07:48:55 localhost systemd[30354]: Reached target Timers.
Mar 13 07:48:55 localhost systemd[30354]: Starting Sockets.
Mar 13 07:48:55 localhost systemd[30354]: Reached target Sockets.
Mar 13 07:48:55 localhost systemd[30354]: Starting Basic System.
Mar 13 07:48:55 localhost systemd[30354]: Reached target Basic System.
Mar 13 07:48:55 localhost systemd[30354]: Starting Default.
Mar 13 07:48:55 localhost systemd[30354]: Reached target Default.
Mar 13 07:48:55 localhost systemd[30354]: Startup finished in 126ms.
Mar 13 07:48:55 localhost systemd[1]: Started User Manager for UID 0.
Mar 13 07:49:36 localhost systemd[1]: Stopping LSB: weewx weather system...
Mar 13 07:49:36 localhost weewx[30459]: Stopping weewx weather system: weewx not running....
Mar 13 07:49:36 localhost systemd[1]: Starting LSB: weewx weather system...
Mar 13 07:49:36 localhost weewx[30478]: engine: Initializing weewx version 3.9.1
Mar 13 07:49:36 localhost weewx[30478]: engine: Using Python 2.7.9 (default, Sep 26 2018, 00:51:08) #012[GCC 4.9.2]
Mar 13 07:49:36 localhost weewx[30478]: engine: Platform Linux-3.4.113-sun8i-armv7l-with-debian-8.11
Mar 13 07:49:36 localhost weewx[30478]: engine: Locale is 'LC_CTYPE=es_ES.UTF-8;LC_NUMERIC=es_ES.UTF-8;LC_TIME=es_ES.UTF-8;LC_COLLATE=es_ES.UTF-8;LC_MONETARY=es_ES.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=es_ES.UTF-8;LC_NAME=es_ES.UTF-8;LC_ADDRESS=es_ES.UTF-8;LC_TELEPHONE=es_ES.UTF-8;LC_MEASUREMENT=es_ES.UTF-8;LC_IDENTIFICATION=es_ES.UTF-8'
Mar 13 07:49:36 localhost weewx[30478]: engine: pid file is /var/run/weewx.pid
Mar 13 07:49:37 localhost weewx[30482]: engine: Using configuration file /etc/weewx/weewx.conf
Mar 13 07:49:37 localhost weewx[30482]: engine: Loading station type Vantage (weewx.drivers.vantage)
Mar 13 07:49:37 localhost systemd[1]: Started LSB: weewx weather system.
Mar 13 07:49:37 localhost weewx[30469]: Starting weewx weather system: weewx.
Mar 13 07:49:43 localhost weewx[30482]: vantage: ip-read error: timed out
Mar 13 07:49:49 localhost weewx[30482]: vantage: ip-read error: timed out
Mar 13 07:49:55 localhost weewx[30482]: vantage: ip-read error: timed out
Mar 13 07:50:01 localhost weewx[30482]: vantage: ip-read error: timed out
Mar 13 07:50:01 localhost weewx[30482]: vantage: Unable to wake up console
Mar 13 07:50:01 localhost weewx[30482]: import of driver failed: Unable to wake up Vantage console (<class 'weewx.WakeupError'>)
Mar 13 07:50:01 localhost weewx[30482]: engine: Unable to load driver: Unable to wake up Vantage console
Mar 13 07:50:01 localhost weewx[30482]:     ****  Exiting...

Here is the log when error happens. If you need something else just let me know it

Thanks

Thomas Keffer

unread,
Mar 13, 2019, 9:04:08 AM3/13/19
to weewx-user
Thanks.

Normally, when a persistent error occurs in the driver, WeeWX restarts from the top. The exception is that restart itself --- if the WeeWX engine cannot load the driver at all, it exits, the theory being that there is a configuration problem.

If you are confident that the driver has been configured correctly (in this case, that you have the correct IP address), then you can set a flag to have the engine try to reload the driver indefinitely. Add the following to the top of the configuration file weewx.conf.

Change this

# This section is for general configuration information.

# Set to 1 for extra debug info, otherwise comment it out or set to zero
debug = 0

to this

# This section is for general configuration information.

loop_on_init = True

# Set to 1 for extra debug info, otherwise comment it out or set to zero
debug = 0


This will not fix the problem --- it merely tells WeeWX to keep trying. To fix the problem, you're going to have to figure out why your WLIP logger keeps losing connectivity.

-tk


--

jmviper

unread,
Mar 13, 2019, 9:40:11 AM3/13/19
to weewx-user
 
I've already tried loop_on_init (searching for answers before) and effectively it didn't fix the problem.
I know that the problem is related to VVP cause though weewx is trying to communicate with IP machine in which runs VVP it is still sending loops (without asking for them weewx  who is trying to connect or is exited)

VVP has the option to Restart Virtual console but after restart it listens just a second and again starts to send loops, being the only solution as I mentioned before restart VVP and weewx. 

Orange pi loses connection with router just a while and VVP instead of stopping sending loops it goes on and on.

If there's no solution I think I can't do anything.

Thanks again


Thomas Keffer

unread,
Mar 13, 2019, 10:34:15 AM3/13/19
to weewx-user
I do not know what "VVP" is. Some sort of VPN?

-tk

jmviper

unread,
Mar 13, 2019, 10:54:56 AM3/13/19
to weewx-user
 VVP is how I call Virtual VP ... Sorry for the inconvenience :)

Thomas Keffer

unread,
Mar 13, 2019, 10:57:08 AM3/13/19
to weewx-user
OK, what's a Virtual VP? A Virtual VantagePro? If so, what makes it virtual?

On Wed, Mar 13, 2019 at 7:54 AM jmviper <skylin...@gmail.com> wrote:
 VVP is how I call Virtual VP ... Sorry for the inconvenience :)

--

jmviper

unread,
Mar 13, 2019, 11:27:35 AM3/13/19
to weewx-user
VirtualVP is an application that is collecting data from a Davis vantage console and let communications through Virtual COM Ports or TCP/IP with several weather programs like weewx.


Webpage:


I think a lot of people uses it to have more than one program connected to a single Davis console

The program is discontinued since 2010 when I think LOOP2 went out in Davis communications (firmware > 1.90)

Searching on google I've found some threads related to, for example:


Perhaps the problem is the way is waked up the console because weewx in some minutes that is recorded in the database says:

mar 13 16:21:01 orangepipc weewx[908]: manager: Added record 2019-03-13 16:21:00 CET (1552490...sdb'
mar 13 16:21:03 orangepipc weewx[908]: cheetahgenerator: Generated 9 files for report Standar...onds
mar 13 16:21:05 orangepipc weewx[908]: imagegenerator: Generated 12 images for StandardReport...onds
mar 13 16:21:05 orangepipc weewx[908]: copygenerator: copied 0 files to /var/www/weewx
mar 13 16:22:02 orangepipc weewx[908]: manager: Added record 2019-03-13 16:22:00 CET (1552490...sdb'
mar 13 16:22:02 orangepipc weewx[908]: manager: Added record 2019-03-13 16:22:00 CET (1552490...sdb'
mar 13 16:22:04 orangepipc weewx[908]: cheetahgenerator: Generated 9 files for report Standar...onds
mar 13 16:22:06 orangepipc weewx[908]: imagegenerator: Generated 12 images for StandardReport...onds
mar 13 16:22:06 orangepipc weewx[908]: copygenerator: copied 0 files to /var/www/weewx
mar 13 16:22:08 orangepipc weewx[908]: vantage: ip-read error: timed out


Thomas Keffer

unread,
Mar 13, 2019, 11:35:07 AM3/13/19
to weewx-user
Oh. 

I'm afraid that I cannot help you. The problem is almost surely related to VVP --- something I know nothing about.

jmviper

unread,
Mar 13, 2019, 12:07:22 PM3/13/19
to weewx-user

Some time ago I ask for help with realtime guages running with weewx through VVP:



Gary helped me doing some modification in that script ignoring lost contact. Perhaps it is not applicable to the way weewx is collecting data.

Thank you anyway for your help

Jacques Terrettaz

unread,
Mar 13, 2019, 1:07:48 PM3/13/19
to weewx-user
Hi,

I used in the past VVP with 2 weather softwares (Weather Display and Weatherlink) . The 2 softwares were initially connected to VVP via TCP/IP, but I had quite often network errors and I needed each time to restart VVP to restore the connectivity.  
I finally used the virtual serial ports for connection, and no more problems.

Therefore, I suspect that the network layer of VVP is buggy...

Are you running weewx on the same PC as VVP?


jmviper

unread,
Mar 13, 2019, 2:42:31 PM3/13/19
to weewx-user

Hi Jacques


They're in differents machines. VVP is running on a Windows 10 computer in the same local network (192.168.1.xxx) that orange pi is running weewx.

I'm gonna test with Cumulus MX on the orange pi in a different TCP/IP port to see if it also loses connection to VVP at the same time weewx does.


Peter Fletcher

unread,
Mar 14, 2019, 11:19:25 AM3/14/19
to weewx-user
I am running weewx on a Raspberry Pi with a Vantage Pro 2, and I have recently switched from using a USB logger to using a WiFiLogger (which is a relatively new third party device which emulates a WeatherLinkIP, but has a number of additional features. I am not running VVP, but I have see the same intermittent (every 1-3 days) and unrecovered weewx crashes with Vantage IP-read errors that you describe. Restarting weewx manually was almost always successful (occasionally I have had to do it twice, for no obvious reason). I tried a number of different approaches to restarting weewx automatically without success, but I have now converted it to a systemd unit and added the appropriate commands to the unit file to restart it on failure, and this seems to have solved the problem (I still see occasional crashes, but systemd successfully restarts the daemon). I had to do a fair amount of spelunking to find a 'recipe' for converting weewx to a native systemd service, so let me know if you want to try this and I will write up the results of my research and post them here.

jmviper

unread,
Mar 14, 2019, 2:43:55 PM3/14/19
to weewx-user

I have basics in linux so I have some idea about systemd (I've heard of it) but I don't know much of it


I have contrab restarting weewx every three hours but with no success when this issue happens.

If you wish you can share your code just to test and perhaps to help someone else.

Thanks

Peter Fletcher

unread,
Mar 14, 2019, 4:51:37 PM3/14/19
to weewx-user
OK. If you want to get a better understanding of systemd and what you are doing, I suggest you read the excellent article by Justin Ellingwood at https://www.digitalocean.com/community/tutorials/systemd-essentials-working-with-services-units-and-the-journal, together with the continuation articles which are linked to in its 'Next Steps' section. The weewx Wiki also includes a brief and (IMHO) somewhat limited discussion of using systemd to run weewx at https://github.com/weewx/weewx/wiki/systemd. The process which I am about to describe draws and expands somewhat on that.
If you are going to use systemd directly to run weewx, you firat need to stop weewx and to disable and remove the configuration setup that normally uses sysv to run it automatically, as follows:

sudo /etc/init.d/weewx stop
sudo update-rc.d weewx remove
sudo rm /etc/init.d/weewx

You then need to create a systemd 'unit' file called /etc/systemd/system/weewx.service. Creating this requires root/su privileges, so you will need to use 'sudo' with your editor of choice. An example file is to be found at https://github.com/weewx/weewx/blob/master/util/systemd/weewx.service. Note that a number of file paths specified in the example file may need to be adjusted to correspond to where things are in your setup. I used the following version of the file, which includes a couple of additional parameters which I found necessary to get weewx to restart reliably after crashing. They are explained in the article I referred to first and in the man pages for systemd.

# systemd configuration for weewx

[Unit]
Description=weewx weather system
Requires=time-sync.target
After=time-sync.target
RequiresMountsFor=/home

[Service]
# the first and last filepaths in the next line may need to be modified, depending
# on where weewx's code and configuration files are on your system
ExecStart=/usr/bin/weewxd --daemon --pidfile=/var/run/weewx.pid /etc/weewx/weewx.conf
ExecReload=/bin/kill -HUP $MAINPID
Type=simple
PIDFile=/var/run/weewx.pid
# the next two lines are my additions to the file from he distribution
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target

Once you have created and checked the 'unit' file, you restart weewx as follows:

sudo systemctl enable weewx.service
sudo systemctl start weewx.service

weewx should now be running again and will be restarted automatically if/when the system reboots or if it fails while running.
Message has been deleted

jmviper

unread,
Mar 14, 2019, 6:06:18 PM3/14/19
to weewx-user
Ok done and running without problems. 

I always connect as root on the orangepipc (with armbian) and manage weewx with service weewx (start|stop|restart|reload)

One silly question .... though I suppose not.... a weewx upgrade will overwrite these changes ?? 

I hope this works well

Thanks again

Peter Fletcher

unread,
Mar 14, 2019, 6:24:25 PM3/14/19
to weewx-user


On Thursday, March 14, 2019 at 5:06:18 PM UTC-5, jmviper wrote:
Ok done and running without problems. 

I always connect as root on the orangepipc (with armbian) and manage weewx with service weewx (start|stop|restart|reload)
 
A systemd service is managed using systemctl, so you would now say:
sudo systemctl start|stop|restart|reload weewx.service
 

One silly question .... though I suppose not.... a weewx upgrade will overwrite these changes ?? 

 
No. You haven't changed the weewx code or configuration, just how and under whose control the program is started, so upgrading weewx will not affect the change to using systemd directly to run it.

John S

unread,
Nov 30, 2020, 2:09:59 PM11/30/20
to weewx-user
I've used your config for systemd and it solved my problem with the dreaded ip-read error. Thanks for the tip and tutorial!
J. Sergneri
Reply all
Reply to author
Forward
0 new messages