That edit seems to have fixed it thanks Matthew. Here's the log snippet from starting WeeWX with the edited interceptor.py (0.11 not the 0.8 I was using earlier) then stopping MySQL, and starting MySQL after WeeWX said it would wait 2 minutes to retry.
Regards, Steve. Oct 9 04:24:02 rpi3 weewx[4138]: engine: Initializing weewx version 3.6.0 Oct 9 04:24:02 rpi3 weewx[4138]: engine: Using Python 2.7.9 (default, Sep 17 2016, 20:26:04) #012[GCC 4.9.2] Oct 9 04:24:02 rpi3 weewx[4138]: engine: Platform Linux-4.4.21-v7+-armv7l-with-debian-8.0 Oct 9 04:24:02 rpi3 weewx[4138]: engine: pid file is /var/run/weewx.pid Oct 9 04:24:02 rpi3 weewx[4142]: engine: Using configuration file /home/weewx/weewx.conf Oct 9 04:24:02 rpi3 weewx[4142]: engine: Loading station type Interceptor (user.interceptor) Oct 9 04:24:02 rpi3 weewx[4142]: interceptor: MainThread: driver version is 0.11 Oct 9 04:24:02 rpi3 weewx[4142]: interceptor: MainThread: driver will listen on :55 Oct 9 04:24:02 rpi3 weewx[4142]: interceptor: MainThread: sensor map: None Oct 9 04:24:02 rpi3 weewx[4142]: engine: StdConvert target unit is 0x10 Oct 9 04:24:02 rpi3 weewx[4142]: wxcalculate: The following values will be calculated: barometer=prefer_hardware, windchill=prefer_hardware, dewpoint=prefer_hardware, appTemp=prefer_hardware, rainRate=prefer_hardware, windrun=prefer_hardware, heatindex=prefer_hardware, maxSolarRad=prefer_hardware, humidex=prefer_hardware, pressure=prefer_hardware, inDewpoint=prefer_hardware, ET=prefer_hardware, altimeter=prefer_hardware, cloudbase=prefer_hardware Oct 9 04:24:02 rpi3 weewx[4142]: wxcalculate: The following algorithms will be used for calculations: altimeter=aaNOAA, maxSolarRad=RS Oct 9 04:24:02 rpi3 weewx[4142]: cmon: service version is 0.7 Oct 9 04:24:02 rpi3 weewx[4142]: cmon: sysinfo: Linux rpi3 4.4.21-v7+ #911 SMP Thu Sep 15 14:22:38 BST 2016 armv7l Oct 9 04:24:02 rpi3 weewx[4142]: cmon: cpuinfo: CPU implementer: 0x41 Oct 9 04:24:02 rpi3 weewx[4142]: cmon: cpuinfo: Features: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 Oct 9 04:24:02 rpi3 weewx[4142]: cmon: cpuinfo: CPU architecture: 7 Oct 9 04:24:02 rpi3 weewx[4142]: cmon: cpuinfo: BogoMIPS: 76.80 Oct 9 04:24:02 rpi3 weewx[4142]: cmon: cpuinfo: Hardware: BCM2709 Oct 9 04:24:02 rpi3 weewx[4142]: cmon: cpuinfo: CPU revision: 4 Oct 9 04:24:02 rpi3 weewx[4142]: cmon: cpuinfo: CPU part: 0xd03 Oct 9 04:24:02 rpi3 weewx[4142]: cmon: cpuinfo: model name: ARMv7 Processor rev 4 (v7l) Oct 9 04:24:02 rpi3 weewx[4142]: cmon: cpuinfo: Serial: 0000000033f8990c Oct 9 04:24:02 rpi3 weewx[4142]: cmon: cpuinfo: processor: 3 Oct 9 04:24:02 rpi3 weewx[4142]: cmon: cpuinfo: CPU variant: 0x0 Oct 9 04:24:02 rpi3 weewx[4142]: cmon: cpuinfo: Revision: a22082 Oct 9 04:24:02 rpi3 weewx[4142]: engine: Archive will use data binding wx_binding Oct 9 04:24:02 rpi3 weewx[4142]: engine: Record generation will be attempted in 'software' Oct 9 04:24:02 rpi3 weewx[4142]: engine: Using archive interval of 300 seconds (specified in weewx configuration) Oct 9 04:24:02 rpi3 weewx[4142]: engine: Using binding 'wx_binding' to database 'weewx' Oct 9 04:24:02 rpi3 weewx[4142]: manager: Starting backfill of daily summaries Oct 9 04:24:02 rpi3 weewx[4142]: manager: Daily summaries up to date Oct 9 04:24:02 rpi3 weewx[4142]: restx: StationRegistry: Station will be registered. Oct 9 04:24:02 rpi3 weewx[4142]: restx: Wunderground-PWS: Data for station IVICTORI391 will be posted Oct 9 04:24:02 rpi3 weewx[4142]: engine: Starting up weewx version 3.6.0 Oct 9 04:24:02 rpi3 weewx[4142]: engine: Starting main packet loop. Oct 9 04:24:25 rpi3 weewx[4142]: interceptor: MainThread: skipping rain measurement of 6.31: no last rain Oct 9 04:25:35 rpi3 weewx[4142]: manager: added record 2016-10-09 04:25:00 AEDT (1475947500) to database 'weewx' Oct 9 04:25:36 rpi3 weewx[4142]: manager: added record 2016-10-09 04:25:00 AEDT (1475947500) to daily summary in 'weewx' Oct 9 04:25:36 rpi3 weewx[4142]: restx: Wunderground-PWS: Published record 2016-10-09 04:25:00 AEDT (1475947500) Oct 9 04:25:41 rpi3 weewx[4142]: cheetahgenerator: Generated 10 files for report StandardReport in 5.50 seconds Oct 9 04:25:43 rpi3 weewx[4142]: genimages: Generated 13 images for StandardReport in 1.24 seconds Oct 9 04:25:43 rpi3 weewx[4142]: reportengine: copied 16 files to /www/weather Oct 9 04:25:46 rpi3 weewx[4142]: restx: StationRegistry: Published record 2016-10-09 04:25:00 AEDT (1475947500) Oct 9 04:30:33 rpi3 weewx[4142]: engine: Shutting down StdReport thread Oct 9 04:30:33 rpi3 weewx[4142]: interceptor: MainThread: shutting down server thread Oct 9 04:30:34 rpi3 weewx[4142]: engine: Caught database OperationalError: (2006, 'MySQL server has gone away') Oct 9 04:30:34 rpi3 weewx[4142]: **** Waiting 2 minutes then retrying... Oct 9 04:32:34 rpi3 weewx[4142]: engine: retrying... Oct 9 04:32:34 rpi3 weewx[4142]: engine: Using configuration file /home/weewx/weewx.conf Oct 9 04:32:34 rpi3 weewx[4142]: engine: Loading station type Interceptor (user.interceptor) Oct 9 04:32:34 rpi3 weewx[4142]: interceptor: MainThread: driver version is 0.11 Oct 9 04:32:34 rpi3 weewx[4142]: interceptor: MainThread: driver will listen on :55 Oct 9 04:32:34 rpi3 weewx[4142]: interceptor: MainThread: sensor map: None Oct 9 04:32:34 rpi3 weewx[4142]: engine: StdConvert target unit is 0x10 Oct 9 04:32:34 rpi3 weewx[4142]: wxcalculate: The following values will be calculated: barometer=prefer_hardware, windchill=prefer_hardware, dewpoint=prefer_hardware, appTemp=prefer_hardware, rainRate=prefer_hardware, windrun=prefer_hardware, heatindex=prefer_hardware, maxSolarRad=prefer_hardware, humidex=prefer_hardware, pressure=prefer_hardware, inDewpoint=prefer_hardware, ET=prefer_hardware, altimeter=prefer_hardware, cloudbase=prefer_hardware Oct 9 04:32:34 rpi3 weewx[4142]: wxcalculate: The following algorithms will be used for calculations: altimeter=aaNOAA, maxSolarRad=RS Oct 9 04:32:34 rpi3 weewx[4142]: cmon: service version is 0.7 Oct 9 04:32:34 rpi3 weewx[4142]: cmon: sysinfo: Linux rpi3 4.4.21-v7+ #911 SMP Thu Sep 15 14:22:38 BST 2016 armv7l Oct 9 04:32:34 rpi3 weewx[4142]: cmon: cpuinfo: CPU implementer: 0x41 Oct 9 04:32:34 rpi3 weewx[4142]: cmon: cpuinfo: Features: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 Oct 9 04:32:34 rpi3 weewx[4142]: cmon: cpuinfo: CPU architecture: 7 Oct 9 04:32:34 rpi3 weewx[4142]: cmon: cpuinfo: BogoMIPS: 76.80 Oct 9 04:32:34 rpi3 weewx[4142]: cmon: cpuinfo: Hardware: BCM2709 Oct 9 04:32:34 rpi3 weewx[4142]: cmon: cpuinfo: CPU revision: 4 Oct 9 04:32:34 rpi3 weewx[4142]: cmon: cpuinfo: CPU part: 0xd03 Oct 9 04:32:34 rpi3 weewx[4142]: cmon: cpuinfo: model name: ARMv7 Processor rev 4 (v7l) Oct 9 04:32:34 rpi3 weewx[4142]: cmon: cpuinfo: Serial: 0000000033f8990c Oct 9 04:32:34 rpi3 weewx[4142]: cmon: cpuinfo: processor: 3 Oct 9 04:32:34 rpi3 weewx[4142]: cmon: cpuinfo: CPU variant: 0x0 Oct 9 04:32:34 rpi3 weewx[4142]: cmon: cpuinfo: Revision: a22082 Oct 9 04:32:34 rpi3 weewx[4142]: engine: Archive will use data binding wx_binding Oct 9 04:32:34 rpi3 weewx[4142]: engine: Record generation will be attempted in 'software' Oct 9 04:32:34 rpi3 weewx[4142]: engine: Using archive interval of 300 seconds (specified in weewx configuration) Oct 9 04:32:34 rpi3 weewx[4142]: engine: Using binding 'wx_binding' to database 'weewx' Oct 9 04:32:34 rpi3 weewx[4142]: manager: Starting backfill of daily summaries Oct 9 04:32:34 rpi3 weewx[4142]: manager: Daily summaries up to date Oct 9 04:32:34 rpi3 weewx[4142]: restx: StationRegistry: Station will be registered. Oct 9 04:32:34 rpi3 weewx[4142]: restx: Wunderground-PWS: Data for station IVICTORI391 will be posted Oct 9 04:32:34 rpi3 weewx[4142]: engine: Starting up weewx version 3.6.0 Oct 9 04:32:34 rpi3 weewx[4142]: engine: Starting main packet loop. Oct 9 04:32:41 rpi3 weewx[4142]: interceptor: MainThread: skipping rain measurement of 6.31: no last rain Oct 9 04:35:38 rpi3 weewx[4142]: manager: added record 2016-10-09 04:35:00 AEDT (1475948100) to database 'weewx' Oct 9 04:35:38 rpi3 weewx[4142]: manager: added record 2016-10-09 04:35:00 AEDT (1475948100) to daily summary in 'weewx' Oct 9 04:35:38 rpi3 weewx[4142]: restx: Wunderground-PWS: Published record 2016-10-09 04:35:00 AEDT (1475948100) Oct 9 04:35:41 rpi3 weewx[4142]: cheetahgenerator: Generated 10 files for report StandardReport in 2.99 seconds Oct 9 04:35:42 rpi3 weewx[4142]: genimages: Generated 13 images for StandardReport in 1.18 seconds Oct 9 04:35:42 rpi3 weewx[4142]: reportengine: copied 16 files to /www/weather On Sunday, 9 October 2016 03:47:08 UTC+11, mwall wrote: > > >>> > ok, now i understand. > > the reason the fine offset would 'catch up' is because the fine offset > stations have a data logger. when the database write failed, weewx would > restart. that probably happened multiple times until the mysql server came > back. at that point, weewx reads the latest record, sees that it is older > than the records in the fine offset logger, and does a catch up. > > the interceptor will not be able to catch up, since there is no logger in > the observer hardware. > > however, the fact that the interceptor does not release the port is a bug. > > in the function Consumer.shutdown (around line 170 in interceptor.py > version 0.11), change this: > > def shutdown(self): > self._server.shutdown() > > to this: > > def shutdown(self): > self._server.shutdown() > self._server.server_close() > > start weewx, block the mysql server, see what happens. > > m > -- 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]. For more options, visit https://groups.google.com/d/optout.
