I've been running Weewx since last November on a RPi3 with an RTC 
installed, and an mSATA-USB interface board plugged into one of the RPi3's 
ports carrying a Samsung 850 EVO 250GB SSD.  Power to the SSD is from the 
RPI3 power brick via the standard power plug.  The power is plugged into a 
large APC_BackUps UPS for stability.  Essentially, its Weewx on an RPi3 
that boots from its microSD card as usual, but has its "/" on the SSD.  I 
enabled and run nginx web server (leaner than Apache2) to send my graphs 
and reports to my pubic website provided by my ISP.  Ran like this for 
weeks uninterrupted, reliably reporting my Davis Vantage Pro2 weather 
station data to my website.  I started with a pure Raspbian / Debian Linux 
OS before installing Weewx, per the website instructions.

Then in late January, I started seeing a funny problem: the RPi3's WiFi 
carrier would suddenly be lost - and not re-established - causing FTP 
uploads to fail, and knocking out my SSH access (its a headless system, and 
I disabled the RPi3's VNCserver).  Without a way to see what is going on or 
to issue commands, I have no choice but to pull the RPI3's power plug, wait 
a few seconds, and plug it back in.  I make sure to time the unplugging to 
be away from on-the-5-minute-intervals (my archive setting) to prevent a 
write corruption problem, but its only a matter of time before this action 
eventually zorch's my SD card.  Yes I have a backup of both the SD card and 
my SSD weather data.

Meanwhile, the Weewx thread that gathers station data and stuffs it into 
the database continues unabated in the background, unaware that its link to 
the world is down.  I've checked my in-home WiFi system (Apple Airport 
Extreme, the tower version), and the only device on it with a problem is 
the Weewx RPi3.  All other WiFi devices are happy.  My ISP isn't reporting 
any outages (not necessarily meaningful).  

I can't find a record of doing so, but I THINK I did an apt-get 
update/dist-upgrade of the system before this new behaviour surfaced.  And 
I may have been trying some of the functions that read the RPi3's gpio pins 
before the problem started - but I'm not sure.  I notice that Weewx is 
still registered under the Squeeze release repository, but assume that 
isn't related to my problems.

Hmmm, my update command just found a bunch of new updates - I've installed 
them and rebooted the system to see if they help in any way.  I checked, 
and "uname -a" results in no changes to the OS due to the update.

I ran Weewx with debug=1 for a couple days, but the problem didn't occur. 
 Of course, when I reset debug=0, the problem returned.  What this means, I 
don't know.  One thing I noticed during debug=1 ... it sure slowed down ssh 
login and listing syslog responses - Weewx writes a LOT of info when in 
debug mode.

Here's some info on my system that might help somebody see my problem and 
help me return my system to its previous excellent health:

*pi@RPi3-3-Weewx*:*~ $* uname -a
Linux RPi3-3-Weewx 4.9.68-v7+ #1064 SMP Tue Dec 12 15:08:24 GMT 2017 armv7l 
GNU/Linux


*pi@RPi3-3-Weewx*:*~ $* lsusb    [ SSD listed as USB Device 004, shown by 
me in blue text ]

Bus 001 Device 006: ID 051d:0002 American Power Conversion Uninterruptible 
Power Supply

Bus 001 Device 005: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x 
UART Bridge / myAVR mySmartUSB light

*Bus 001 Device 004: ID 045b:0229 Hitachi, Ltd *

Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 
Fast Ethernet Adapter

Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


*pi@RPi3-3-Weewx*:*~ $* /etc/init.d/weewx status

*●* weewx.service - LSB: weewx weather system

   Loaded: loaded (/etc/init.d/weewx; generated; vendor preset: enabled)

   Active: *active (running)* since Mon 2018-02-05 21:43:45 MST; 3h 5min ago

     Docs: man:systemd-sysv-generator(8)

  Process: 388 ExecStart=/etc/init.d/weewx start (code=exited, 
status=0/SUCCESS)

   CGroup: /system.slice/weewx.service

           └─786 python /usr/bin/weewxd --daemon 
--pidfile=/var/run/weewx.pid /etc/weewx/weewx.conf



Part of the early startup syslog entries:

Feb  5 21:43:45 RPi3-3-Weewx weewx[468]: engine: Initializing weewx version 
3.8.0

Feb  5 21:43:45 RPi3-3-Weewx weewx[468]: engine: Using Python 2.7.13 
(default, Nov 24 2017, 17:33:09) #012[GCC 6.3.0 20170516]

Feb  5 21:43:45 RPi3-3-Weewx weewx[468]: engine: Platform 
Linux-4.9.68-v7+-armv7l-with-debian-9.3

Feb  5 21:43:45 RPi3-3-Weewx weewx[468]: engine: Locale is 'en_CA.UTF-8'

Feb  5 21:43:45 RPi3-3-Weewx weewx[468]: engine: pid file is 
/var/run/weewx.pid

Feb  5 21:43:45 RPi3-3-Weewx weewx[388]: Starting weewx weather system: 
weewx.

Feb  5 21:43:45 RPi3-3-Weewx systemd[1]: Started LSB: weewx weather system.

Feb  5 21:43:45 RPi3-3-Weewx weewx[786]: engine: Using configuration file 
/etc/weewx/weewx.conf

Feb  5 21:43:45 RPi3-3-Weewx weewx[786]: engine: Loading station type 
Vantage (weewx.drivers.vantage)




Finally, here's the part of the syslog data that shows the transition from 
running perfectly to losing WiFi connection (red string emphasized by me, 
shows sudden loss of carrier after hours of running fine) ... 


(hours of entries like the following six lines ... )


Feb  5 20:10:20 RPi3-3-Weewx weewx[791]: manager: Added record 2018-02-05 
20:10:00 MST (1517886600) to database 'weewx.sdb'

Feb  5 20:10:20 RPi3-3-Weewx weewx[791]: manager: Added record 2018-02-05 
20:10:00 MST (1517886600) to daily summary in 'weewx.sdb'

Feb  5 20:10:21 RPi3-3-Weewx weewx[791]: cheetahgenerator: Generated 14 
files for report StandardReport in 1.42 seconds

Feb  5 20:10:22 RPi3-3-Weewx weewx[791]: imagegenerator: Generated 12 
images for StandardReport in 1.11 seconds

Feb  5 20:10:22 RPi3-3-Weewx weewx[791]: copygenerator: copied 0 files to 
/var/www/html/weewx

Feb  5 20:10:30 RPi3-3-Weewx weewx[791]: ftpgenerator: ftp'd 26 files in 
7.84 seconds

Feb  5 20:15:20 RPi3-3-Weewx weewx[791]: manager: Added record 2018-02-05 
20:15:00 MST (1517886900) to database 'weewx.sdb'

Feb  5 20:15:20 RPi3-3-Weewx weewx[791]: manager: Added record 2018-02-05 
20:15:00 MST (1517886900) to daily summary in 'weewx.sdb'

Feb  5 20:15:21 RPi3-3-Weewx weewx[791]: cheetahgenerator: Generated 14 
files for report StandardReport in 1.37 seconds

Feb  5 20:15:22 RPi3-3-Weewx weewx[791]: imagegenerator: Generated 12 
images for StandardReport in 1.09 seconds

Feb  5 20:15:22 RPi3-3-Weewx weewx[791]: copygenerator: copied 0 files to 
/var/www/html/weewx

Feb  5 20:15:30 RPi3-3-Weewx weewx[791]: ftpgenerator: ftp'd 26 files in 
7.51 seconds

Feb  5 20:17:01 RPi3-3-Weewx CRON[3461]: (root) CMD (   cd / && run-parts 
--report /etc/cron.hourly)

*Feb  5 20:19:25 RPi3-3-Weewx dhcpcd[365]: wlan0: carrier lost*

Feb  5 20:19:25 RPi3-3-Weewx dhcpcd[365]: wlan0: deleting address 
fe80::561e:f56c:a2fe:9d27

Feb  5 20:19:25 RPi3-3-Weewx avahi-daemon[352]: Withdrawing address record 
for fe80::561e:f56c:a2fe:9d27 on wlan0.

Feb  5 20:19:25 RPi3-3-Weewx avahi-daemon[352]: Leaving mDNS multicast 
group on interface wlan0.IPv6 with address fe80::561e:f56c:a2fe:9d27.

Feb  5 20:19:25 RPi3-3-Weewx avahi-daemon[352]: Interface wlan0.IPv6 no 
longer relevant for mDNS.

Feb  5 20:19:25 RPi3-3-Weewx dhcpcd[365]: wlan0: deleting default route via 
192.168.1.1

Feb  5 20:19:25 RPi3-3-Weewx dhcpcd[365]: wlan0: deleting route to 
192.168.1.0/24

Feb  5 20:19:25 RPi3-3-Weewx avahi-daemon[352]: Withdrawing address record 
for 192.168.1.183 on wlan0.

Feb  5 20:19:25 RPi3-3-Weewx avahi-daemon[352]: Leaving mDNS multicast 
group on interface wlan0.IPv4 with address 192.168.1.183.

Feb  5 20:19:25 RPi3-3-Weewx avahi-daemon[352]: Interface wlan0.IPv4 no 
longer relevant for mDNS.

Feb  5 20:19:27 RPi3-3-Weewx ntpd[538]: Deleting interface #4 wlan0, 
fe80::561e:f56c:a2fe:9d27%3#123, interface stats: received=0, sent=0, 
dropped=0, active_time=75257 secs

Feb  5 20:19:27 RPi3-3-Weewx ntpd[538]: Deleting interface #5 wlan0, 
192.168.1.183#123, interface stats: received=506, sent=508, dropped=0, 
active_time=75252 secs

Feb  5 20:19:27 RPi3-3-Weewx ntpd[538]: 144.217.65.182 local addr 
192.168.1.183 -> <null>

Feb  5 20:19:27 RPi3-3-Weewx ntpd[538]: 99.224.6.96 local addr 
192.168.1.183 -> <null>

Feb  5 20:19:27 RPi3-3-Weewx ntpd[538]: 199.182.221.110 local addr 
192.168.1.183 -> <null>

Feb  5 20:19:27 RPi3-3-Weewx ntpd[538]: 144.217.65.184 local addr 
192.168.1.183 -> <null>

Feb  5 20:20:20 RPi3-3-Weewx weewx[791]: manager: Added record 2018-02-05 
20:20:00 MST (1517887200) to database 'weewx.sdb'

Feb  5 20:20:20 RPi3-3-Weewx weewx[791]: manager: Added record 2018-02-05 
20:20:00 MST (1517887200) to daily summary in 'weewx.sdb'

Feb  5 20:20:21 RPi3-3-Weewx weewx[791]: cheetahgenerator: Generated 14 
files for report StandardReport in 1.39 seconds

Feb  5 20:20:22 RPi3-3-Weewx weewx[791]: imagegenerator: Generated 12 
images for StandardReport in 1.10 seconds

Feb  5 20:20:22 RPi3-3-Weewx weewx[791]: copygenerator: copied 0 files to 
/var/www/html/weewx

Feb  5 20:20:22 RPi3-3-Weewx weewx[791]: ftpupload: Unable to connect or 
log into server : [Errno -3] Temporary failure in name resolution

Feb  5 20:20:22 RPi3-3-Weewx weewx[791]: ftpupload: Unable to connect or 
log into server : [Errno -3] Temporary failure in name resolution

Feb  5 20:20:22 RPi3-3-Weewx weewx[791]: ftpupload: Unable to connect or 
log into server : [Errno -3] Temporary failure in name resolution

Feb  5 20:20:22 RPi3-3-Weewx weewx[791]: ftpupload: Attempted 3 times to 
connect to server www3.telus.net. Giving up.



What the heck is dhcpcd doing to Weewx, and why??


The last four lines are repeated everytime FTP tries to upload new data to 
my website, until I pull the plug.


ANY help or suggestions gratefully accepted.  If you need to see some 
syslog output or system info, just ask: I'm no guru but I can input command 
line instructions with the best of them.


[ Apologies for the long post ]


Rod

-- 
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.

Reply via email to