[weewx-user] Re: weewx stopped for no apparent reason
So, it happened again. Here is how the events seem to have unfolded, based on the logs: *** The last HTTP request seems to have gone out at 16:26 (so, before data stopped flowing) - there were no more HTTP requests after that - it was the last appearnce of http or HTTP from the weewx process in the logs: Jun 10 16:26:12 mythtv2 weewx[206240] DEBUG urllib3.connectionpool: http://vanta gevieww.lan:80 "GET /v1/current_conditions HTTP/1.1" 200 None *** The last every-5-minute record update was at 16:40 CDT Today: Jun 10 16:40:16 mythtv2 weewx[206240] INFO weewx.manager: Added record 2021-06-10 16:40:00 CDT (1623361200) to daily summary in 'weewx' *** UDP packets continued until 16:43, after which they stopped (presumably because the WLL box was in need of an HTTP "tickle"_ Jun 10 16:43:14 mythtv2 weewx[206240] DEBUG user.weatherlink_live.davis_broadcast: Received 394 bytes from ('192.168.42.75', 25447) Jun 10 16:43:14 mythtv2 weewx[206240] DEBUG user.weatherlink_live.packets: Trying to create UDP conditions packet Jun 10 16:43:14 mythtv2 weewx[206240] DEBUG user.weatherlink_live.data_host: Received new broadcast packet Jun 10 16:43:14 mythtv2 weewx[206240] DEBUG user.weatherlink_live.mappers: THMapping[['1']]: Observation not found in packet Jun 10 16:43:14 mythtv2 weewx[206240] DEBUG user.weatherlink_live.mappers: THIndoorMapping[[]]: Observation not found in packet Jun 10 16:43:14 mythtv2 weewx[206240] DEBUG user.weatherlink_live.mappers: BaroMapping[[]]: Observation not found in packet Jun 10 16:43:14 mythtv2 weewx[206240] DEBUG user.weatherlink_live.mappers: RainMapping[['1']]: Mapped: rainSize=0.01 Jun 10 16:43:14 mythtv2 weewx[206240] DEBUG user.weatherlink_live.mappers: RainM << SNIP more of the above >> Jun 10 16:43:14 mythtv2 weewx[206240] DEBUG user.weatherlink_live: Emitting push (broadcast) packet Jun 10 16:43:14 mythtv2 weewx[206240] DEBUG user.weatherlink_live.service: WllWindGustService: Updating record with dict: {'windGust': 2.62, 'windGustDir': 106} Jun 10 16:43:14 mythtv2 weewx[206240] DEBUG user.weatherlink_live: Waiting for new packet Jun 10 16:43:49 mythtv2 weewx[206240] message repeated 7 times: [ DEBUG user.weatherlink_live: Waiting for new packet] After that, no more UDP packets were flowing, and the WLL driver repeated the waiting for packet message from then on (this time is as I am posting) Jun 10 20:09:25 mythtv2 weewx[206240] message repeated 4 times: [ DEBUG user.weatherlink_live: Waiting for new packet] My diagnosis is that the most likely cause was that WLL didn't receive a needed HTTP request to keep data flowing, because either the WLL driver didn't send it for some reason, or the connection attempt failed or some such. Perhaps a cure/workaround would be this: one expects to see those UDP packets about every two seconds. If 15 (or maybe 30) have gone by, generate an error log entry and send an HTTP request - all one would have to do is put a counter in the place where it is issuing the Waiting message (regardless of whether debugging was enabled or not) . Also, if the code is relying on an HTTP TCP connection staying open between requests, it would be better to open a new TCP connection for each request (I haven't looked at the code.) JRJ On Wednesday, June 9, 2021 at 1:30:17 PM UTC-5 michael.s...@gmail.com wrote: > @JRJ: So, you're saying that WeeWX stopped generating reports but data > still was recorded in the database, correct? > If yes, it seems unlikely that it's a driver issue and more on the weewx > engine's side. > > cub...@gmail.com schrieb am Mittwoch, 9. Juni 2021 um 20:22:01 UTC+2: > >> @chris: yes, indeed, the issue on my system was that weewx stopped >> producing reports (and also there were no reporting-related messages in the >> log. I do am now running with debug set to 1 in the config. >> >> JRJ >> >> On Wednesday, June 9, 2021 at 12:09:08 PM UTC-5 cjsh...@gmail.com wrote: >> >>> JRJ: >>> >>> Are you saying that weewx stopped generating reports? My weewx stopped >>> generating reports, with no error messages, at 4:00 AM. Restarting service >>> weewx did not fix it. Rebooting my raspberry pi DID fix it. So, I added a >>> crontab entry to reboot my raspberry pi each morning: >>> 5 4 * * * /sbin/shutdown -r now >>> >>> So far, it has not happened again. I'm using a WMII, with serial port >>> connection, using Python3 and the latest version of the driver from >>> JayJaeger >>> >>> Chris Shaker >>> >>> On Wednesday, June 9, 2021 at 5:46:52 AM UTC-7 cub...@gmail.com wrote: >>> @michael: It should not be related to the SCP upload, which continues even after weewx has gone "night night". It is running from a cron, not under weewx. It merely copies the generated HTML/graphics up to another machine. It runs every 17 minutes. If it were, say, locking up a file and causing a report to fail there ought to be a message from Python about that, and there are no such
Re: [weewx-user] Re: help troubleshooting: weewx database stopped accepting data, out of the blue
In working through your troubleshooting you might want to keep in mind the event driven model used by WeeWX. The key event that kicks of activity within WeeWX is the arrival of a loop packet from the driver. The arrival of a new loop packet then kicks off a number of services that perform some action on, or in response to the arrival of that loop packet (eg apply QC limits, corrections etc). WeeWX then accumulates the resulting (perhaps modified) loop packet and awaits the next loop packet and then the process repeats. When using software record generation (as you are) if the loop packet that just arrived belongs to the next archive period this causes WeeWX to generate an archive record from the previously accumulated loop packets. This event then causes the generated archive record to be saved to database, reports to be run etc. Consequently when you have problems with few or no archive records being saved to database, one of the first things you look for are incoming loop packets. In your case look at the archive period from Jun 10 1130 to 1135: Jun 10 11:29:48 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: lines=[] Jun 10 11:30:00 Ubuntu20-WEEWX weewx[4066] message repeated 4 times: [ DEBUG user.sdr: lines=[]] Jun 10 11:30:01 Ubuntu20-WEEWX CRON[45270]: (root) CMD ([ -x /etc/init.d/anacron ] && if [ ! -d /run/systemd/system ]; then /usr/sbin/invoke-rc.d anacron start >/dev/null; fi) Jun 10 11:30:03 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: lines=[] Jun 10 11:30:36 Ubuntu20-WEEWX weewx[4066] message repeated 11 times: [ DEBUG user.sdr: lines=[]] Jun 10 11:30:37 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) MessageCallbackProvider data-> incoming topic: tele/BMP280/SENSOR, QOS: 0, retain: 0, payload: b'{"Time":"2021-06-10T11:30:37","BMP280":{"Temperature":20.9,"Pressure":977.1},"PressureUnit":"hPa","TempUnit":"C"}' Jun 10 11:30:37 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) TopicManager data-> incoming tele/BMP280/SENSOR: appTemp1: 20.9, barometer: 977.1 Jun 10 11:30:39 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: lines=[] Jun 10 11:31:18 Ubuntu20-WEEWX weewx[4066] message repeated 13 times: [ DEBUG user.sdr: lines=[]] Jun 10 11:31:21 Ubuntu20-WEEWX systemd[1]: Started Run anacron jobs. Jun 10 11:31:21 Ubuntu20-WEEWX anacron[45271]: Anacron 2.3 started on 2021-06-10 Jun 10 11:31:21 Ubuntu20-WEEWX anacron[45271]: Normal exit (0 jobs run) Jun 10 11:31:21 Ubuntu20-WEEWX systemd[1]: anacron.service: Succeeded. Jun 10 11:31:21 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: lines=[] Jun 10 11:31:36 Ubuntu20-WEEWX weewx[4066] message repeated 5 times: [ DEBUG user.sdr: lines=[]] Jun 10 11:31:37 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) MessageCallbackProvider data-> incoming topic: tele/BMP280/SENSOR, QOS: 0, retain: 0, payload: b'{"Time":"2021-06-10T11:31:37","BMP280":{"Temperature":20.9,"Pressure":977.1},"PressureUnit":"hPa","TempUnit":"C"}' Jun 10 11:31:37 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) TopicManager data-> incoming tele/BMP280/SENSOR: appTemp1: 20.9, barometer: 977.1 Jun 10 11:31:39 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: lines=[] Jun 10 11:32:36 Ubuntu20-WEEWX weewx[4066] message repeated 19 times: [ DEBUG user.sdr: lines=[]] Jun 10 11:32:37 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) MessageCallbackProvider data-> incoming topic: tele/BMP280/SENSOR, QOS: 0, retain: 0, payload: b'{"Time":"2021-06-10T11:32:37","BMP280":{"Temperature":20.9,"Pressure":977.1},"PressureUnit":"hPa","TempUnit":"C"}' Jun 10 11:32:37 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) TopicManager data-> incoming tele/BMP280/SENSOR: appTemp1: 20.9, barometer: 977.1 Jun 10 11:32:39 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: lines=[] Jun 10 11:33:36 Ubuntu20-WEEWX weewx[4066] message repeated 19 times: [ DEBUG user.sdr: lines=[]] Jun 10 11:33:37 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) MessageCallbackProvider data-> incoming topic: tele/BMP280/SENSOR, QOS: 0, retain: 0, payload: b'{"Time":"2021-06-10T11:33:37","BMP280":{"Temperature":20.9,"Pressure":977.1},"PressureUnit":"hPa","TempUnit":"C"}' Jun 10 11:33:37 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) TopicManager data-> incoming tele/BMP280/SENSOR: appTemp1: 20.9, barometer: 977.1 Jun 10 11:33:39 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: lines=[] Jun 10 11:34:36 Ubuntu20-WEEWX weewx[4066] message repeated 19 times: [ DEBUG user.sdr: lines=[]] Jun 10 11:34:37 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) MessageCallbackProvider data-> incoming topic: tele/BMP280/SENSOR, QOS: 0, retain: 0, payload: b'{"Time":"2021-06-10T11:34:37","BMP280":{"Temperature":20.9,"Pressure":977.1},"PressureUnit":"hPa","TempUnit":"C"}' Jun 10 11:34:37 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) TopicManager data-> incoming tele/BMP280/SENSOR: appTemp1: 20.9, barometer:
Re: [weewx-user] Re: help troubleshooting: weewx database stopped accepting data, out of the blue
I think I figured out what has been going on - low batteries my Acurite Atlas. I just changed the batteries in the Acurite Atlas, and the database is again getting periodic entries. I think this mystery is solved. Diagnosis: As I looked through the syslog, I noted that when there was no logging to the weewx.sdb file, there were long periods where there were no packets being received from the Acurite Atlas (even though there were packets coming in from MQTTSubscribe). Then, at 12:15, there were a couple of logged packets from the Atlas, and the weewx.sdb database got an entry! Jun 10 12:14:40 Ubuntu20-WEEWX weewx[3673] DEBUG user.sdr: lines=[] Jun 10 12:15:28 Ubuntu20-WEEWX weewx[3673] message repeated 16 times: [ DEBUG user.sdr: lines=[]] Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG user.sdr: lines=['{"time" : "2021-06-10 17:15:29", "model" : "Acurite-Atlas", "id" : 17, "channel" : "A", "sequence_num" : 0, "battery_ok" : 1, "message_type" : 37, "wind_avg_mi_h" : 3.000, "temperature_F" : 90.800, "humidity" : 47, "strike_count" : 241, "strike_distance" : 0, "exception" : 0, "raw_msg" : "c0116581ca9caf3ca0a8"}\n', '{"time" : "2021-06-10 17:15:29", "model" : "Acurite-Atlas", "id" : 17, "channel" : "A", "sequence_num" : 1, "battery_ok" : 1, "message_type" : 37, "wind_avg_mi_h" : 3.000, "temperature_F" : 90.800, "humidity" : 47, "strike_count" : 241, "strike_distance" : 0, "exception" : 0, "raw_msg" : "c4116581ca9caf3ca0ac"}\n', '{"time" : "2021-06-10 17:15:29", "model" : "Acurite-Atlas", "id" : 17, "channel" : "A", "sequence_num" : 2, "battery_ok" : 1, "message_type" : 37, "wind_avg_mi_h" : 3.000, "temperature_F" : 90.800, "humidity" : 47, "strike_count" : 241, "strike_distance" : 0, "exception" : 0, "raw_msg" : "c8116581ca9caf3ca0b0"}\n'] Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG user.sdr: packet={'outTemp': 90.8, 'outHumidity': 47.0, 'windSpeed': 3.0, 'Atlas_strike_count': 241, 'lightning_distance': 0, 'windBatteryStatus': 0, 'dateTime': 1623345329, 'usUnits': 1} Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG user.MQTTSubscribe: (Service) TopicManager data-> outgoing tele/BMP280/SENSOR: appTemp1: 20.9, barometer: 976.9, dateTime: 1623345277.4587064, usUnits: 16 Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG user.MQTTSubscribe: (Service) TopicManager data-> outgoing accumulated tele/BMP280/SENSOR: appTemp1: 69.62, barometer: 28.84784478875, dateTime: 1623345329, usUnits: 1 Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG user.MQTTSubscribe: (Service) data-> final packet is 2021-06-10 12:15:29 CDT (1623345329): appTemp1: 69.62, Atlas_strike_count: 241, barometer: 28.84784478875, dateTime: 1623345329, lightning_distance: 0, lightning_strike_count: 0, outHumidity: 47.0, outTemp: 90.8, usUnits: 1, windBatteryStatus: 0, windSpeed: 3.0 Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG user.MQTTSubscribe: (Service) data-> final record is 2021-06-10 12:15:00 CDT (1623345300): appTemp1: 69.488, Atlas_rain_total: 3.28, Atlas_strike_count: 241.0, barometer: 29.874321288124996, beaufort: 0.0, dateTime: 1623345300, interval: 5.0, lightning_distance: 0.0, lightning_strike_count: 0.0, luminosity: 3720.0, maxSolarRad: 947.8926188082237, radiation: 29.3508, rain: 0.0, rainRate: 0.0, usUnits: 1, UV: 1.0, windBatteryStatus: 0.0, windDir: None, windGust: 0.0, windGustDir: None, windSpeed: 0.0 Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] INFO weewx.manager: *Added record 2021-06-10 12:15:00 CDT (1623345300) to database 'weewx.sdb'* Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] INFO weewx.manager: Added record 2021-06-10 12:15:00 CDT (1623345300) to daily summary in 'weewx.sdb' I'd seen this no-database-entry behavior before, when I was setting up weewx on my Raspberry Pi. At that time, I concluded that when the main input to weewx (user.sdr in my case) doesn't have a data stream, then nothing gets written to the weewx.sdb, even if there are other live data sources, such as MQTTSubscribe. So, when the weewx.sdb isn't getting entries, the primary data input to weewx is likely iffy or off-line. On Thu, Jun 10, 2021 at 1:29 PM Eric K wrote: > Strangely, it posted data to the database around 12:15pm, and then stopped > again? > > Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG user.MQTTSubscribe: > (Service) data-> final record is 2021-06-10 12:15:00 CDT (1623345300): > appTemp1: 69.488, Atlas_rain_total: 3.28, Atlas_strike_count: 241.0, > barometer: 29.874321288124996, beaufort: 0.0, dateTime: 1623345300, > interval: 5.0, lightning_distance: 0.0, lightning_strike_count: 0.0, > luminosity: 3720.0, maxSolarRad: 947.8926188082237, radiation: 29.3508, > rain: 0.0, rainRate: 0.0, usUnits: 1, UV: 1.0, windBatteryStatus: 0.0, > windDir: None, windGust: 0.0, windGustDir: None, windSpeed: 0.0 > Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] INFO weewx.manager: Added > record 2021-06-10 12:15:00 CDT (1623345300) to database 'weewx.sdb' > Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] INFO weewx.manager: Added > record 2021-06-10
[weewx-user] Re: help troubleshooting: weewx database stopped accepting data, out of the blue
Strangely, it posted data to the database around 12:15pm, and then stopped again? Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG user.MQTTSubscribe: (Service) data-> final record is 2021-06-10 12:15:00 CDT (1623345300): appTemp1: 69.488, Atlas_rain_total: 3.28, Atlas_strike_count: 241.0, barometer: 29.874321288124996, beaufort: 0.0, dateTime: 1623345300, interval: 5.0, lightning_distance: 0.0, lightning_strike_count: 0.0, luminosity: 3720.0, maxSolarRad: 947.8926188082237, radiation: 29.3508, rain: 0.0, rainRate: 0.0, usUnits: 1, UV: 1.0, windBatteryStatus: 0.0, windDir: None, windGust: 0.0, windGustDir: None, windSpeed: 0.0 Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] INFO weewx.manager: Added record 2021-06-10 12:15:00 CDT (1623345300) to database 'weewx.sdb' Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] INFO weewx.manager: Added record 2021-06-10 12:15:00 CDT (1623345300) to daily summary in 'weewx.sdb' Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] ERROR weewx.restx: MQTT: Unexpected exception of type Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG weewx.reportengine: Running reports for latest time in the database. Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG weewx.reportengine: Report 'SeasonsReport' not enabled. Skipping. Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG weewx.reportengine: Report 'SmartphoneReport' not enabled. Skipping. Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG weewx.reportengine: Report 'MobileReport' not enabled. Skipping. Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG weewx.reportengine: Report 'StandardReport' not enabled. Skipping. Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG weewx.reportengine: Running report 'Belchertown' Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG weewx.reportengine: Found configuration file /home/weewx/skins/EricBelchertown/skin.conf for report 'Belchertown' Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG weewx.cheetahgenerator: Using search list ['weewx.cheetahgenerator.Almanac', 'weewx.cheetahgenerator.Station', 'weewx.cheetahgenerator.Current', 'weewx.cheetahgenerator.Stats', 'weewx.cheetahgenerator.UnitInfo', 'weewx.cheetahgenerator.Extras', 'weewx.cheetahgenerator.JSONHelpers', 'user.belchertown.getData'] Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] ERROR weewx.restx: *** Traceback (most recent call last): Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] ERROR weewx.restx: *** File "/home/weewx/bin/weewx/restx.py", line 381, in run_loop Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] ERROR weewx.restx: *** self.process_record(_record, dbmanager) Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] ERROR weewx.restx: *** File "/home/weewx/bin/user/mqtt.py", line 494, in process_record Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] ERROR weewx.restx: *** mc.connect(url.hostname, url.port) Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] ERROR weewx.restx: *** File "/usr/local/lib/python3.8/dist-packages/paho/mqtt/client.py", line 939, in connect Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] ERROR weewx.restx: *** self.connect_async(host, port, keepalive, Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] ERROR weewx.restx: *** File "/usr/local/lib/python3.8/dist-packages/paho/mqtt/client.py", line 1005, in connect_async Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] ERROR weewx.restx: *** raise ValueError('Invalid host.') Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] ERROR weewx.restx: *** ValueError: Invalid host. Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] CRITICAL weewx.restx: MQTT: Thread terminating. Reason: Invalid host. Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG weewx.manager: Daily summary version is 4.0 Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG weewx.restx: StationRegistry: Failed upload attempt 1: HTTP Error 502: Bad Gateway Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] INFO weewx.cheetahgenerator: Generated 11 files for report Belchertown in 0.33 seconds Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] INFO weewx.reportengine: Copied 2 files to /home/weewx/public_html Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG weewx.manager: Daily summary version is 4.0 Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] INFO weewx.restx: PWSWeather: Published record 2021-06-10 12:15:00 CDT (1623345300) Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG weewx.reportengine: Report 'FTP' not enabled. Skipping. Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG weewx.reportengine: Report 'RSYNC' not enabled. Skipping. Jun 10 12:15:34 Ubuntu20-WEEWX weewx[3673] INFO weewx.restx: Wunderground-PWS: Published record 2021-06-10 12:15:00 CDT (1623345300) Jun 10 12:15:36 Ubuntu20-WEEWX weewx[3673] DEBUG user.sdr: lines=[] On Thursday, June 10, 2021 at 12:53:59 PM UTC-5 Eric K wrote: > After running for a month without problems, it appears the weewx.sdb file > has stopped accepting data. > It happened about 11:30am today, without any warning or apparent cause. > > I'm pulling in data via the sdr driver primarily and also from >
[weewx-user] Re: weewx stopped for no apparent reason
@eric thread population is up to you, if you want to post on this one, that is fine with me. FYI, I have now been running a little over 1 full day with debug with the newer WeatherLinkLive driver with no untoward events - but note that the first one took over two days to occur. On Thursday, June 10, 2021 at 12:29:41 PM UTC-5 Eric K wrote: > @JRJ, it appears this (or something similar) has just happened on my weewx > 4.5.1 installation. > I suppose I should start a new thread on it. > I'll be watching yours to see if you find out whats going wrong! > > On Wednesday, June 9, 2021 at 2:29:39 PM UTC-5 cub...@gmail.com wrote: > >> @michael: No, that is not what I am saying. In fact, the converse is >> likely true: that it ALSO stopped recording data in the database, as there >> are no more messages of the sort "Added record ... to database" INFO level >> messages in my logs once this occurred, as can be seen in my original post >> - *all* messages out of weewx stopped at 03:15:18 in that example. (Of >> course it did also stop generating reports.) >> >> JRJ >> >> On Wednesday, June 9, 2021 at 1:30:17 PM UTC-5 michael.s...@gmail.com >> wrote: >> >>> @JRJ: So, you're saying that WeeWX stopped generating reports but data >>> still was recorded in the database, correct? >>> If yes, it seems unlikely that it's a driver issue and more on the weewx >>> engine's side. >>> >>> cub...@gmail.com schrieb am Mittwoch, 9. Juni 2021 um 20:22:01 UTC+2: >>> @chris: yes, indeed, the issue on my system was that weewx stopped producing reports (and also there were no reporting-related messages in the log. I do am now running with debug set to 1 in the config. JRJ On Wednesday, June 9, 2021 at 12:09:08 PM UTC-5 cjsh...@gmail.com wrote: > JRJ: > > Are you saying that weewx stopped generating reports? My weewx stopped > generating reports, with no error messages, at 4:00 AM. Restarting > service > weewx did not fix it. Rebooting my raspberry pi DID fix it. So, I added a > crontab entry to reboot my raspberry pi each morning: > 5 4 * * * /sbin/shutdown -r now > > So far, it has not happened again. I'm using a WMII, with serial port > connection, using Python3 and the latest version of the driver from > JayJaeger > > Chris Shaker > > On Wednesday, June 9, 2021 at 5:46:52 AM UTC-7 cub...@gmail.com wrote: > >> @michael: It should not be related to the SCP upload, which >> continues even after weewx has gone "night night". It is running from a >> cron, not under weewx. It merely copies the generated HTML/graphics up >> to >> another machine. It runs every 17 minutes. If it were, say, locking >> up >> a file and causing a report to fail there ought to be a message from >> Python >> about that, and there are no such messages. This same SCP was running >> with >> weewx version 3 for many months without issues - originally every 15 >> minutes, I changed it from 15 to 17 yesterday to put it out of sync from >> the report generation a bit it after the second failure, just in case. >> >> [It did occur to me to add a little mod akin to the RSYNC present in >> weewx itself, or to cut over to using then RSYNC under weewx after the >> rest of this gets straightened out.] >> >> I also verified that all of the files and directories are owned by >> and have the same group as the weewx process, and they are, so it should >> not be an issue of file permissions during report generation, either. >> >> Regarding the dev release driver, sure, I'll give that a try, and >> turn on more logging later today. >> >> JRJ >> >> On Wednesday, June 9, 2021 at 1:40:52 AM UTC-5 michael.s...@gmail.com >> wrote: >> >>> Nah, the logging level change doesn't matter, I've published a dev >>> release a few days ago making exactly that change. >>> >>> I'd suggest you to try the new driver version anyway since I also >>> made some changes regarding the HTTP interaction with the WLL. You >>> should >>> also enable debug logging so we get a more exhaustive look into what's >>> going on. >>> >>> My suspicion is that something's wrong with the report generation or >>> the SCP upload. Was the last iteration of the report actually uploaded >>> correctly? >>> >>> >>> >>> vince schrieb am Mittwoch, 9. Juni 2021 um 06:10:01 UTC+2: >>> On Tuesday, June 8, 2021 at 12:43:44 PM UTC-7 cub...@gmail.com wrote: > (Note: I did "tweaked" the WLL driver code to suppress the > "Emitting poll/(broadcast) messages by changing those two log calls > to > "log.debug"). I'd suggest running the unaltered driver and especially in this
[weewx-user] help troubleshooting: weewx database stopped accepting data, out of the blue
After running for a month without problems, it appears the weewx.sdb file has stopped accepting data. It happened about 11:30am today, without any warning or apparent cause. I'm pulling in data via the sdr driver primarily and also from MQTTSubscribe. >From the syslog, I can see that data is still coming in from the sdr and MQTTSubscribe, but it's not getting logged to the database, and thus the weewx webpage has N/A for all the temp and pressure values. Restarting weewx did not fix it. Shutting down weewx and restarting Ubuntu 20 did not fix it. I wonder if the database file got corrupted somehow? Is the sqlite database limited to around 5MB in size? My current sqlite database size info is: -rw-r--r-- 1 weewx weewx 4751360 Jun 10 11:35 weewx.sdb I was capturing the debug=1 level to the syslog file at that moment. Can anyone see any clues? Jun 10 11:27:32 Ubuntu20-WEEWX weewx[4066] INFO weewx.manager: Added record 2021-06-10 11:25:00 CDT (1623342300) to database 'weewx.sdb' Jun 10 11:27:32 Ubuntu20-WEEWX weewx[4066] INFO weewx.manager: Added record 2021-06-10 11:25:00 CDT (1623342300) to daily summary in 'weewx.sdb' Jun 10 11:27:32 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.restx: StationRegistry: wait interval (410100 < 604800) has not passed for record 2021-06-10 11:25:00 CDT (1623342300) Jun 10 11:27:32 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.reportengine: Running reports for latest time in the database. Jun 10 11:27:32 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.reportengine: Report 'SeasonsReport' not enabled. Skipping. Jun 10 11:27:32 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.reportengine: Report 'SmartphoneReport' not enabled. Skipping. Jun 10 11:27:32 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.reportengine: Report 'MobileReport' not enabled. Skipping. Jun 10 11:27:32 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.reportengine: Report 'StandardReport' not enabled. Skipping. Jun 10 11:27:32 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.reportengine: Running report 'Belchertown' Jun 10 11:27:32 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.reportengine: Found configuration file /home/weewx/skins/EricBelchertown/skin.conf for report 'Belchertown' Jun 10 11:27:32 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.cheetahgenerator: Using search list ['weewx.cheetahgenerator.Almanac', 'weewx.cheetahgenerator.Station', 'weewx.cheetahgenerator.Current', 'weewx.cheetahgenerator.Stats', 'weewx.cheetahgenerator.UnitInfo', 'weewx.cheetahgenerator.Extras', 'weewx.cheetahgenerator.JSONHelpers', 'user.belchertown.getData'] Jun 10 11:27:32 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.manager: Daily summary version is 4.0 Jun 10 11:27:33 Ubuntu20-WEEWX weewx[4066] INFO weewx.restx: PWSWeather: Published record 2021-06-10 11:25:00 CDT (1623342300) Jun 10 11:27:33 Ubuntu20-WEEWX weewx[4066] INFO weewx.cheetahgenerator: Generated 11 files for report Belchertown in 0.32 seconds Jun 10 11:27:33 Ubuntu20-WEEWX weewx[4066] INFO weewx.reportengine: Copied 2 files to /home/weewx/public_html Jun 10 11:27:33 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.manager: Daily summary version is 4.0 Jun 10 11:27:33 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.reportengine: Report 'FTP' not enabled. Skipping. Jun 10 11:27:33 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.reportengine: Report 'RSYNC' not enabled. Skipping. Jun 10 11:27:33 Ubuntu20-WEEWX weewx[4066] INFO weewx.restx: Wunderground-PWS: Published record 2021-06-10 11:25:00 CDT (1623342300) Jun 10 11:27:35 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: lines=[] Jun 10 11:27:37 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) MessageCallbackProvider data-> incoming topic: tele/BMP280/SENSOR, QOS: 0, retain: 0, payload: b'{"Time":"2021-06-10T11:27:37","BMP280":{"Temperature":20.8,"Pressure":977.1},"PressureUnit":"hPa","TempUnit":"C"}' Jun 10 11:27:37 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) TopicManager data-> incoming tele/BMP280/SENSOR: appTemp1: 20.8, barometer: 977.1 Jun 10 11:27:38 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: lines=[] Jun 10 11:27:43 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: lines=['{"time" : "2021-06-10 16:27:39", "model" : "Acurite-Atlas", "id" : 17, "channel" : "A", "sequence_num" : 2, "battery_ok" : 1, "message_type" : 39, "wind_avg_mi_h" : 2.000, "uv" : 1, "lux" : 3140, "strike_count" : 241, "strike_distance" : 0, "exception" : 0, "raw_msg" : "c811e78181823a3ca05a"}\n'] Jun 10 11:27:43 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: packet={'windSpeed': 2.0, 'UV': 1, 'luminosity': 3140, 'Atlas_strike_count': 241, 'lightning_distance': 0, 'windBatteryStatus': 0, 'dateTime': 1623342459, 'usUnits': 1} Jun 10 11:27:43 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) TopicManager data-> outgoing tele/BMP280/SENSOR: appTemp1: 20.8, barometer: 977.1, dateTime: 1623342457.4788659, usUnits: 16 Jun 10 11:27:43 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) TopicManager data-> outgoing accumulated tele/BMP280/SENSOR: appTemp1:
[weewx-user] Re: weewx stopped for no apparent reason
@JRJ, it appears this (or something similar) has just happened on my weewx 4.5.1 installation. I suppose I should start a new thread on it. I'll be watching yours to see if you find out whats going wrong! On Wednesday, June 9, 2021 at 2:29:39 PM UTC-5 cub...@gmail.com wrote: > @michael: No, that is not what I am saying. In fact, the converse is > likely true: that it ALSO stopped recording data in the database, as there > are no more messages of the sort "Added record ... to database" INFO level > messages in my logs once this occurred, as can be seen in my original post > - *all* messages out of weewx stopped at 03:15:18 in that example. (Of > course it did also stop generating reports.) > > JRJ > > On Wednesday, June 9, 2021 at 1:30:17 PM UTC-5 michael.s...@gmail.com > wrote: > >> @JRJ: So, you're saying that WeeWX stopped generating reports but data >> still was recorded in the database, correct? >> If yes, it seems unlikely that it's a driver issue and more on the weewx >> engine's side. >> >> cub...@gmail.com schrieb am Mittwoch, 9. Juni 2021 um 20:22:01 UTC+2: >> >>> @chris: yes, indeed, the issue on my system was that weewx stopped >>> producing reports (and also there were no reporting-related messages in the >>> log. I do am now running with debug set to 1 in the config. >>> >>> JRJ >>> >>> On Wednesday, June 9, 2021 at 12:09:08 PM UTC-5 cjsh...@gmail.com wrote: >>> JRJ: Are you saying that weewx stopped generating reports? My weewx stopped generating reports, with no error messages, at 4:00 AM. Restarting service weewx did not fix it. Rebooting my raspberry pi DID fix it. So, I added a crontab entry to reboot my raspberry pi each morning: 5 4 * * * /sbin/shutdown -r now So far, it has not happened again. I'm using a WMII, with serial port connection, using Python3 and the latest version of the driver from JayJaeger Chris Shaker On Wednesday, June 9, 2021 at 5:46:52 AM UTC-7 cub...@gmail.com wrote: > @michael: It should not be related to the SCP upload, which continues > even after weewx has gone "night night". It is running from a cron, not > under weewx. It merely copies the generated HTML/graphics up to another > machine. It runs every 17 minutes. If it were, say, locking up a file > and causing a report to fail there ought to be a message from Python > about > that, and there are no such messages. This same SCP was running with > weewx > version 3 for many months without issues - originally every 15 minutes, I > changed it from 15 to 17 yesterday to put it out of sync from the report > generation a bit it after the second failure, just in case. > > [It did occur to me to add a little mod akin to the RSYNC present in > weewx itself, or to cut over to using then RSYNC under weewx after the > rest of this gets straightened out.] > > I also verified that all of the files and directories are owned by and > have the same group as the weewx process, and they are, so it should not > be > an issue of file permissions during report generation, either. > > Regarding the dev release driver, sure, I'll give that a try, and turn > on more logging later today. > > JRJ > > On Wednesday, June 9, 2021 at 1:40:52 AM UTC-5 michael.s...@gmail.com > wrote: > >> Nah, the logging level change doesn't matter, I've published a dev >> release a few days ago making exactly that change. >> >> I'd suggest you to try the new driver version anyway since I also >> made some changes regarding the HTTP interaction with the WLL. You >> should >> also enable debug logging so we get a more exhaustive look into what's >> going on. >> >> My suspicion is that something's wrong with the report generation or >> the SCP upload. Was the last iteration of the report actually uploaded >> correctly? >> >> >> >> vince schrieb am Mittwoch, 9. Juni 2021 um 06:10:01 UTC+2: >> >>> On Tuesday, June 8, 2021 at 12:43:44 PM UTC-7 cub...@gmail.com >>> wrote: >>> (Note: I did "tweaked" the WLL driver code to suppress the "Emitting poll/(broadcast) messages by changing those two log calls to "log.debug"). >>> >>> >>> I'd suggest running the unaltered driver and especially in this case >>> so you get the maximum logging so the author can help you. >>> >>> If you start changing his code, eventually it'll be "you changed it, >>> you own the results good or bad" when he can't recreate the issue >>> because >>> your code has diverged from the authoritative version. >>> >>> -- 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
Re: [weewx-user] Included Alpha Channel graphic Images
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, 9 Jun 2021 13:16:08 -0700 (PDT) José Cervera wrote: > It would be quite a detail that in future versions the possibility of > adding hexadecimal colors with Alpha channel will be included. The Phenology extension to WeeWX comes equipped with an alternate image generator that does composition with transparency. o http://lacusveris.com/Phenology/phenology_image_generator.shtml - -- .. Be Seeing You, .. Chuck Rhode, Sheboygan, WI, USA .. Weather: http://LacusVeris.com/WX .. 81° — Wind Calm -BEGIN PGP SIGNATURE- iF0EARECAB0WIQT+MY/5I/LMPSswTbVg2/xipKOWUgUCYMIyHgAKCRBg2/xipKOW UrldAJ9D1ExR09TVs1MqI9vcudQpuAqn3wCbBvhc4aJ4sP0WfeTawfQHMFJoSn8= =sDxA -END PGP SIGNATURE- -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/20210610103910.0544a0de%40wealthy.