Unplanned upgrade from 4.10.2 to 5.0.1 broke it all...

219 views
Skip to first unread message

Rick M0LEP

unread,
Feb 7, 2024, 6:03:23 AM2/7/24
to weewx...@googlegroups.com
I had a working system with 4.10.2, and I had planned to leave it that
way, but somehow, weewx slipped into an "apt-get upgrade" this morning
and 5.0.1 got installed.

I'm (or at least I was) using the GW1100 driver and the Belchertown 1.2
skin.

I've tried downgrading back to 4.10.2, but I think that just made
matters worse, as the only message I get when trying to start weewx now
is:

Feb 7 10:51:29 duma systemd[1]: Started WeeWX.
Feb 7 10:51:30 duma weewxd[5454]: Traceback (most recent call last):
Feb 7 10:51:30 duma weewxd[5454]: File "/usr/share/weewx/weewxd", line 29, in <module>
Feb 7 10:51:30 duma weewxd[5454]: import user.extensions
Feb 7 10:51:30 duma weewxd[5454]: ModuleNotFoundError: No module named 'user.extensions'
Feb 7 10:51:30 duma systemd[1]: weewx.service: Main process exited, code=exited, status=1/FAILURE
Feb 7 10:51:30 duma systemd[1]: weewx.service: Failed with result 'exit-code'.

Where should I start trying to fix the mess?

Quite happy to do the upgrade if that's the best way.

--
73, Rick, M0LEP

Rory Gillies

unread,
Feb 7, 2024, 6:53:02 AM2/7/24
to weewx-user
I nearly did that as well, I thought you had to add a new repository for apt-get to pick up the new version, or is it in the original one now?

I take it you don't have a backup of your working 4.10.2 install? I have a simple cron job that copies all the various WeeWx locations and files to the ~/backups directory then rsyncs it to a NAS every night at 00:01, it's saved me a couple of times!

Rick M0LEP

unread,
Feb 7, 2024, 7:51:28 AM2/7/24
to weewx...@googlegroups.com
On Thu 08 Feb 'Rory Gillies' via weewx-user wrote:
> I nearly did that as well, I thought you had to add a new repository for
> apt-get to pick up the new version, or is it in the original one now?

Apparently it's in the main one now, at least for Debian bullseye...

> I take it you don't have a backup of your working 4.10.2 install? I have a
> simple cron job that copies all the various WeeWx locations and files to
> the ~/backups directory then rsyncs it to a NAS every night at 00:01, it's
> saved me a couple of times!

I'll need to burrow. I have the /etc/weewx backed up, so the
configuration should be restorable, and the database is backed up from
last night, but the extensions will need hunting down.

Having broken the system, I'm thinking it might just better to get 5.0.1
up and running, but I can't figure out what the 5.0.1 the .deb did to my
database and extensions...

Cheers,
Rick

matthew wall

unread,
Feb 7, 2024, 9:50:56 AM2/7/24
to weewx-user
sorry about the hassles.  i still have some sites running weewx 3.9 because they just work and i just want the data, not the putzing around with operating systems and drivers and firmware and whatever.

weewx 5 is the future, and we are trying to do it in a way so that it will still run on old hardware with limited memory and storage.  it turns out that part is pretty easy.  its the switch to 'best practice' of running as non-root that has a zillion corner cases.

anyway, in your case the reason your downgrade fails is because your extensions were moved aside.  so when you downgrade, v4 cannot find them.  shut down weewx, copy them from /usr/share/weewx/user.XXXX/* into /usr/share/weewx/user, then start weewx.

if you had problems running v5, please post the commands you made and the resulting errors.

m

Rick M0LEP

unread,
Feb 7, 2024, 10:20:26 AM2/7/24
to weewx...@googlegroups.com
On Thu 08 Feb matthew wall wrote:
> sorry about the hassles. i still have some sites running weewx 3.9
> because they just work and i just want the data, not the putzing
> around with operating systems and drivers and firmware and whatever.

Yeah. I was intending to leave mine running 4.10 until I had time to
sort out a smooth transition, but it got past me this morning... :/

> weewx 5 is the future, and we are trying to do it in a way so that it
> will still run on old hardware with limited memory and storage. it
> turns out that part is pretty easy. its the switch to 'best practice'
> of running as non-root that has a zillion corner cases.

Right. Looks like some permissions and ownerships need changing but
don't get changed (or obviously commented upon) during the upgrade
process. I finally spotted a lot of "[Errno 13] Permission denied"
messages in syslog...

If I can get 5.0.1 to work quickly, I'll go that way.

> anyway, in your case the reason your downgrade fails is because your
> extensions were moved aside. so when you downgrade, v4 cannot find them.
> shut down weewx, copy them from /usr/share/weewx/user.XXXX/* into
> /usr/share/weewx/user, then start weewx.

Thanks. Noted. What does 5.0.1 use instead?

> if you had problems running v5, please post the commands you made and
> the resulting errors.

Working on it. Will do. Thanks for your help.

--
73, Rick, M0LEP

Rick M0LEP

unread,
Feb 7, 2024, 10:31:38 AM2/7/24
to weewx...@googlegroups.com
On Thu 08 Feb Rick M0LEP wrote:
> On Thu 08 Feb matthew wall wrote:
>> weewx 5 is the future, and we are trying to do it in a way so that it
>> will still run on old hardware with limited memory and storage. it
>> turns out that part is pretty easy. its the switch to 'best practice'
>> of running as non-root that has a zillion corner cases.
>
> Right. Looks like some permissions and ownerships need changing but
> don't get changed (or obviously commented upon) during the upgrade
> process. I finally spotted a lot of "[Errno 13] Permission denied"
> messages in syslog...
>
> If I can get 5.0.1 to work quickly, I'll go that way.

The main issue seems to have been weewx not having write access to the
web directory. That's now resolved. and the site is apparently alive
again, and running 5.0.1. :)

--
73, Rick, M0LEP

matthew wall

unread,
Feb 7, 2024, 10:43:03 AM2/7/24
to weewx-user
On Wednesday, February 7, 2024 at 10:31:38 AM UTC-5 Rick Hewett wrote:
The main issue seems to have been weewx not having write access to the
web directory. That's now resolved. and the site is apparently alive
again, and running 5.0.1. :)

what is your web directory?

the installer changes permissions on /var/www/html/weewx, but it is not smart enough to parse a previously-installed config file for HTML_ROOT that is in another location.
 

matthew wall

unread,
Feb 7, 2024, 10:45:18 AM2/7/24
to weewx-user
On Wednesday, February 7, 2024 at 10:20:26 AM UTC-5 Rick Hewett wrote:
> anyway, in your case the reason your downgrade fails is because your
> extensions were moved aside. so when you downgrade, v4 cannot find them.
> shut down weewx, copy them from /usr/share/weewx/user.XXXX/* into
> /usr/share/weewx/user, then start weewx.

Thanks. Noted. What does 5.0.1 use instead?

/etc/weewx/bin/user

(i know - 'bin' in '/etc', extra 'bin' when '/etc/weewx/user' would suffice, putting python code in the /etc tree...)
 
Reply all
Reply to author
Forward
0 new messages