WeeWx 5.2 Upgrade Woes
Well my long nightmare is over. Typing this up for others as they may encounter the same thing.
My setup:
Raspberry Pi 4
Debian 13 trixie
t3.micro EC2 in AWS
EcoWitt Pippboy
EcoWitt GW1000
WeeWx 5.2
Belchertown 1.4
GW1000 0.6.3
Python 3.13.5
The main issue was that WeeWX runs as the weewx system user, whose home directory is actually /var/lib/weewx (not /home/weewx like I had thought and assumed). SSH was looking for keys in /var/lib/weewx/.ssh, but my keys were in /home/weewx/.ssh. So when I had WeeWX try to rsync to my EC2 server, it couldn’t find any valid private key and I’d get a Permission denied (publickey) error.
Other issues I ran into and things I learned. New commands to check logging instead of using tail: sudo systemctl status weewx sudo journalctl -u weewx -f Were both helpful especially when I had debug turned on. That helped me identify that at least the driver was polling the EcoWitt correctly.
I had to verify directory ownership and permissions: ls -la /var/www/html /var/www/html/weewx was owned by the weewx user and group.
I kept getting rsync errors: DEBUG weeutil.rsyncupload: rsyncupload: cmd: [[‘rsync’, ‘–archive’, ‘–stats’, ‘-e’, ‘ssh’, ‘/var/www/html/’, ‘farts@toots:/var/www/html’]] Tested SSH directly: sudo -u weewx ssh fart@toots “echo ok” And got: Permission denied (publickey)
Ran a verbose SSH check: sudo -u weewx ssh -vvv farts@toots “echo ok” And saw: weewx user’s home directory is - /var/lib/weewx, not /home/weewx SSH searched for keys in /var/lib/weewx/.ssh and saw NOTHING.
Created proper SSH directory: sudo mkdir -p /var/lib/weewx/.ssh sudo chown weewx:weewx /var/lib/weewx/.ssh sudo chmod 700 /var/lib/weewx/.ssh
Copied the working private key: sudo cp /home/weewx/.ssh/id_rsa /var/lib/weewx/.ssh/id_rsa sudo chown weewx:weewx /var/lib/weewx/.ssh/id_rsa sudo chmod 600 /var/lib/weewx/.ssh/id_rsa
Made sure my EC2 had the right key: sudo -u weewx ssh-keygen -y -f /var/lib/weewx/.ssh/id_rsa Pasted that line into /home/ubuntu/.ssh/authorized_keys on my EC2. Fixed the permissions there: chmod 700 ~/.ssh chmod 600 ~/.ssh/authorized_keys chown farty:pants ~/.ssh ~/.ssh/authorized_keys
Then retested - sudo -u weewx ssh tootsgalore@crappedmypants “echo ok” and got an OK.
After rsync was fixed I was getting this: INFO weewx.cheetahgenerator: Generated N files for report Belchertown INFO weewx.reportengine: Copied files to /var/www/html
But a sudo systemctl restart weewx fixed that issue.
OK Im done, whew. Time for other projects now.