Web page will not refresh after update to 5.0

369 views
Skip to first unread message

Jim Wilkerson

unread,
Jan 18, 2024, 1:20:05 AM1/18/24
to weewx-user
After an update of Weewx 4.10.2  to 5.0, the data on the web page 

http://<local IP>/weewx/index.html

no longer refreshes.

Summary data:

uname -a
Linux linux-3wjh 5.14.21-150500.55.39-default #1 SMP PREEMPT_DYNAMIC Tue Dec 5 10:06:35 UTC 2023 (2e4092e) x86_64 x86_64 x86_64 GNU/Linux

openSUSE Leap  15.5

~> weewxd --version
5.0.0

~> python3 --version
Python 3.6.15

systemctl status weewx
● weewx.service - WeeWX
     Loaded: loaded (/usr/lib/systemd/system/weewx.service; enabled; vendor preset: disabled)
     Active: active (running) since Wed 2024-01-17 19:21:18 EST; 16min ago
       Docs: https://weewx.com/docs
   Main PID: 9772 (python3)
      Tasks: 1 (limit: 4915)
     CGroup: /system.slice/weewx.service
             └─ 9772 python3 /usr/share/weewx/weewxd.py /etc/weewx/weewx.conf

Weewx shows to be running OK as seen in the attached logs file.

If I roll back to 4.10.2, the web page refreshes as normal.


Troubleshooting_5.0.txt

Jim Wilkerson

unread,
Jan 18, 2024, 1:36:43 AM1/18/24
to weewx-user
Adding logs after roll back to 4.10.2.
Rollback_5.0_to_4.10.2.txt
Message has been deleted

vince

unread,
Jan 18, 2024, 2:01:43 AM1/18/24
to weewx-user
Jim please set debug=1 and restart weewx. For logs you might try to do ‘sudo journalctl -u weewx -n 200’ so we see the last 200 lines and not a truncated log,. We need to see your reports actually run and where they are being written to. My wild guess is your v5 is writing to a different place than your v4 does.

On Wednesday, January 17, 2024 at 5:49:58 PM UTC-8 gjr80 wrote:
Unfortunately the log extracts you have provided lack detail and are truncated and consequently of not much help. Please try again noting the advice in the How to get a good, useful log section of the Help! Posting to weewx user wiki page. Make sure your log extract covers the full WeeWX startup and at least two archive intervals of activity. 

Gary

Jim Wilkerson

unread,
Jan 18, 2024, 3:10:16 AM1/18/24
to weewx-user
Set debug=1   in /etc/weewx/weewx.conf

(2) reports, 21:30 and 22:00 EST

Attached are the requested outputs.

The database appears to have been updated in the same place:

/var/lib/weewx # ls  -l
total 22452
-rw-r--r-- 1 root root 22990848 Jan 17 22:00 weewx.sdb
Troubleshooting_5.0-2.txt

vince

unread,
Jan 18, 2024, 6:02:58 AM1/18/24
to weewx-user
Files seem to be in /var/www/html/weewx for 4.10.2 but you are not providing enough logs to see where they are being written to for v5.

Try "sudo journalctl -xe -n 200 -u weewx" with v5 running.  Hit 'q' since you'll be in a pager.

Basically I'm looking for the reportengine lines.  Mine looks like this (your path will differ but hopefully it's /var/www/html/weewx for v5 as well)
Jan 17 21:50:23 pi4 weewxd[11819]: INFO weewx.cheetahgenerator: Generated 12 files for report Belchertown in 4.35 seconds
Jan 17 21:50:23 pi4 weewxd[11819]: INFO weewx.reportengine: Copied 3 files to /home/pi/weewx-data/public_html/vp2/belchertown

Jim Wilkerson

unread,
Jan 19, 2024, 12:16:20 AM1/19/24
to weewx-user
The logs I attached from my previous post are from a 5.0 installation.  My one point is that I sue the openSUSE normal installation update via YaST but the config file is still showing version 4.10.2.

~> weewxd --version
5.0.0

shows the current running version.

Also, I see debug enabled:

2024-01-17T21:18:28.763125-05:00 linux-3wjh weewxd[31248]: INFO __main__: Initializing weewxd version 5.0.0
2024-01-17T21:18:28.763396-05:00 linux-3wjh weewxd[31248]: INFO __main__: Command line: /usr/share/weewx/weewxd.py /etc/weewx/weewx.conf
2024-01-17T21:18:28.763495-05:00 linux-3wjh weewxd[31248]: INFO __main__: Using Python 3.6.15 (default, Sep 23 2021, 15:41:43) [GCC]
2024-01-17T21:18:28.763590-05:00 linux-3wjh weewxd[31248]: INFO __main__: Located at /usr/bin/python3
2024-01-17T21:18:28.773695-05:00 linux-3wjh weewxd[31248]: INFO __main__: Platform Linux-5.14.21-150500.55.39-default-x86_64-with-glibc2.3.4
2024-01-17T21:18:28.773884-05:00 linux-3wjh weewxd[31248]: INFO __main__: Locale: 'en_US.UTF-8'
2024-01-17T21:18:28.774001-05:00 linux-3wjh weewxd[31248]: INFO __main__: Entry path: /usr/share/weewx/weewxd.py
2024-01-17T21:18:28.774104-05:00 linux-3wjh weewxd[31248]: INFO __main__: WEEWX_ROOT: /
2024-01-17T21:18:28.774196-05:00 linux-3wjh weewxd[31248]: INFO __main__: Configuration file: /etc/weewx/weewx.conf
2024-01-17T21:18:28.774289-05:00 linux-3wjh weewxd[31248]: INFO __main__: User module: /etc/weewx/bin/user
2024-01-17T21:18:28.774790-05:00 linux-3wjh weewxd[31248]: INFO __main__: Debug: 1

but I do not see any debug level entries when I run

sudo journalctl -r -u weewx

Reverting back to 4.10.2, then running that command with debug=1, I do see entries:

Jan 17 23:01:49 linux-3wjh python3[17385]: weewx[17385] DEBUG __main__:     ****      _recv = self.socket.recv(_N)

So, what config file is 5.0.0 using on openSUSE Leap 15.5?

matthew wall

unread,
Jan 19, 2024, 12:30:51 AM1/19/24
to weewx-user
On Thursday, January 18, 2024 at 7:16:20 PM UTC-5 wil...@gmail.com wrote:
The logs I attached from my previous post are from a 5.0 installation.  My one point is that I sue the openSUSE normal installation update via YaST but the config file is still showing version 4.10.2.

when you upgrade weewx, you upgrade weewx, not your config file or your skins.

when you upgrade weewx, it does not touch your config file.  so the 'version = xxx' will be whatever it was when you first installed it, or whatever it was upgraded to when you explicitly upgraded the config file, for example by doing 'weectl station upgrade --what config'.
 
the same is true for the version string that you see in skins.

vince

unread,
Jan 19, 2024, 2:42:53 AM1/19/24
to weewx-user
Ignore the version in weewx.conf, it's where your .conf file started with (notionally)  - the one you see in syslog is the running version.

I'd suggest you install rsyslog and copy the util/rsyslog/weewx.conf file into place (and reset rsyslog) and then you'll have traditional syslogging rather than the systemd hell requiring journalctl and the like.  If you enable rsyslog your logs will be old-school and present in /var/log/weewx/weewx.log which is much easier to find things in.  Highly recommend doing that.

Jim Wilkerson

unread,
Jan 19, 2024, 11:28:31 PM1/19/24
to weewx-user
Fixed.

So when I upgraded from 4.10.2 to 5.0 via openSUSE YaST, the previously populated /etc/weewx/skins folder, under which held the Seasons folder and then the required index.html.tmpl file; was wiped out and replaced with just a Seasons folder that has an index.html.tmpl.rpmsave file only in it.

So I rolled back to 4.10.2, which restored the /skins contents, then tar'd it up; reinstalled 5.0, then restored the /skins folder contents.

Edited the restored /etc/weewx/skins/Seasons/index.html.tmpl and added as shown

<!DOCTYPE html>
<html lang="$lang">
  <head>
    <meta http-equiv="refresh" content="300">   <<<--- Line that was recommended
    <meta charset="UTF-8">
    <title>$station.location</title>
    <link rel="icon" type="image/png" href="favicon.ico" />
    <link rel="stylesheet" type="text/css" href="seasons.css"/>
    #if $station.station_url
    <link rel="canonical" href="$station.station_url/$filename" />
    #end if
    <script src="seasons.js"></script>
  </head>

The web page is now working/refreshing as expected.

Reply all
Reply to author
Forward
0 new messages