Weewx don't work anymore after SD card restore, I don't know why?

210 views
Skip to first unread message

Thomas Hackler

unread,
Feb 17, 2024, 4:35:25 AMFeb 17
to weewx-user
Hello,
I use weewx on a raspberry Pi 4. My system crashed and I had to go back to an SD card image from January. It was a state were weewx was runing normally.
But now I don't know why weewx is not working anymore.
I get no reaction for commands like

sudo /etc/init.d/weewx stop
sudo /etc/init.d/weewx start

debug = 1 and I don't see something in syslog:

sudo tail -f /var/log/syslog | grep weewx

in January I had a weewx 4 and with apt upgrade I guess I changed to version 5 now but this was not a problem during my last update.

Any ideas? Thank you!

Regards
Thomas

Thomas Hackler

unread,
Feb 17, 2024, 4:39:13 AMFeb 17
to weewx-user
here are some more information, something seems to be wrong with the gw1000 driver, but I changed nothing:

pi@raspberrypi:~ $ systemctl status weewx*
● weewx.service - WeeWX
     Loaded: loaded (/lib/systemd/system/weewx.service; enabled; vendor preset:>
     Active: failed (Result: exit-code) since Sat 2024-02-17 10:18:36 CET; 17mi>
       Docs: https://weewx.com/docs
    Process: 606 ExecStart=weewxd /etc/weewx/weewx.conf (code=exited, status=4)
   Main PID: 606 (code=exited, status=4)
        CPU: 621ms

Feb 17 10:18:36 raspberrypi weewxd[606]: CRITICAL weewx.engine:     ****      s>
Feb 17 10:18:36 raspberrypi weewxd[606]: CRITICAL weewx.engine:     ****    Fil>
Feb 17 10:18:36 raspberrypi weewxd[606]: CRITICAL weewx.engine:     ****      r>
Feb 17 10:18:36 raspberrypi weewxd[606]: CRITICAL weewx.engine:     ****    Fil>
Feb 17 10:18:36 raspberrypi weewxd[606]: CRITICAL weewx.engine:     ****      r>
Feb 17 10:18:36 raspberrypi weewxd[606]: CRITICAL weewx.engine:     ****  user.>
Feb 17 10:18:36 raspberrypi weewxd[606]: CRITICAL __main__: Unable to load driv>
Feb 17 10:18:36 raspberrypi weewxd[606]: CRITICAL __main__:     ****  Exiting...
Feb 17 10:18:36 raspberrypi systemd[1]: weewx.service: Main process exited, cod>
Feb 17 10:18:36 raspberrypi systemd[1]: weewx.service: Failed with result 'exit>
lines 1-18/18 (END)...skipping...
● weewx.service - WeeWX
     Loaded: loaded (/lib/systemd/system/weewx.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Sat 2024-02-17 10:18:36 CET; 17min ago
       Docs: https://weewx.com/docs
    Process: 606 ExecStart=weewxd /etc/weewx/weewx.conf (code=exited, status=4)
   Main PID: 606 (code=exited, status=4)
        CPU: 621ms

Thomas Hackler

unread,
Feb 17, 2024, 4:41:33 AMFeb 17
to weewx-user
pi@raspberrypi:~ $ apt policy weewx
weewx:
  Installed: 5.0.2-1
  Candidate: 5.0.2-1

michael.k...@gmx.at

unread,
Feb 17, 2024, 4:53:49 AMFeb 17
to weewx-user
It will definitely help if you'd attach the log files as a whole, it
see>
ms >
the>
 lo>
g ab>
ove is not showing all the relevant data.

Thomas Hackler

unread,
Feb 17, 2024, 4:58:48 AMFeb 17
to weewx-user
I am sorry:

pi@raspberrypi:~ $ systemctl status weewx
● weewx.service - WeeWX
     Loaded: loaded (/lib/systemd/system/weewx.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Sat 2024-02-17 10:18:36 CET; 38min ago

       Docs: https://weewx.com/docs
    Process: 606 ExecStart=weewxd /etc/weewx/weewx.conf (code=exited, status=4)
   Main PID: 606 (code=exited, status=4)
        CPU: 621ms

Feb 17 10:18:36 raspberrypi weewxd[606]: CRITICAL weewx.engine:     ****      self.mac = self.get_mac_address()
Feb 17 10:18:36 raspberrypi weewxd[606]: CRITICAL weewx.engine:     ****    File "/etc/weewx/bin/user/gw1000.py", line 3625, in get_mac_address
Feb 17 10:18:36 raspberrypi weewxd[606]: CRITICAL weewx.engine:     ****      return self.send_cmd_with_retries('CMD_READ_STATION_MAC')
Feb 17 10:18:36 raspberrypi weewxd[606]: CRITICAL weewx.engine:     ****    File "/etc/weewx/bin/user/gw1000.py", line 3808, in send_cmd_with_retries
Feb 17 10:18:36 raspberrypi weewxd[606]: CRITICAL weewx.engine:     ****      raise GW1000IOError(_msg)
Feb 17 10:18:36 raspberrypi weewxd[606]: CRITICAL weewx.engine:     ****  user.gw1000.GW1000IOError: Failed to obtain response to command 'CMD_READ_STATION_MAC' after 3 attempts
Feb 17 10:18:36 raspberrypi weewxd[606]: CRITICAL __main__: Unable to load driver: Failed to obtain response to command 'CMD_READ_STATION_MAC' after 3 attempts

Feb 17 10:18:36 raspberrypi weewxd[606]: CRITICAL __main__:     ****  Exiting...
Feb 17 10:18:36 raspberrypi systemd[1]: weewx.service: Main process exited, code=exited, status=4/NOPERMISSION
Feb 17 10:18:36 raspberrypi systemd[1]: weewx.service: Failed with result 'exit-code'.

Tom Keffer

unread,
Feb 17, 2024, 6:03:44 PMFeb 17
to weewx...@googlegroups.com
You have given very little information, but you are probably suffering from a permissions problem. WeeWX V5 runs as user 'weewx' (instead of 'root'), which doesn't always have the permissions it needs to run weewxd.

Read the wiki article Understanding permissions. Pay particular attention to the section How to fix device permissions. See if they help.

-tk

--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/a6f61017-ac4c-473b-a999-119806e7f062n%40googlegroups.com.

gjr80

unread,
Feb 17, 2024, 8:04:29 PMFeb 17
to weewx-user
Your Ecowitt gateway driver issue is that the driver is unable to contact your gateway device, this is causing WeeWX to exit. This could be due to any number of reasons, it's impossible to say much more without seeing the full log from startup to failure. Refer to the How to get a good, useful log section of the Help! Posting to weewx-user Wiki page for how to get a good log extract. Note that you will likely need to use the instructions for journalctl rather than syslog.

Gary

Thomas Hackler

unread,
Feb 18, 2024, 4:13:28 AMFeb 18
to weewx-user
Hello,
thank you for your help!
I don't know why but now weewx seems to work again but something is still wrong.
Attached you can find a complete log file. I had another issue on my Pi which I solved now, I run out of space on the SD card, maybe this effected the access to the gw1000 driver.
My neo WX skin works, the standard season skin don't show me pictures for today.
If I use these commandos there is no reaction in syslog:

sudo /etc/init.d/weewx start 
sudo /etc/init.d/weewx stop 
sudo /etc/init.d/weewx restart

i cannot start or stop weewx.

I think with the permissions everything is ok?

pi@raspberrypi:~ $ groups
pi adm dialout cdrom sudo audio video plugdev games users input render netdev lpadmin weewx gpio i2c spi iobroker

pi@raspberrypi:~ $ grep User /usr/lib/systemd/system/weewx.service
User=weewx

After I restored the SD card with my old image from January I replaced the weewx.sdb with the newer one, but this should have no effect or not ?

Do you need more information ?
log.txt

gjr80

unread,
Feb 18, 2024, 5:01:53 AMFeb 18
to weewx-user
A couple of things. First, you appear to be using systemd and if you are running a WeeWX v5 Debian install you should be using systemctl and to start/stop and otherwise control the WeeWX service.

Second, your log extract covers just over one minute with WeeWX already running. That really is not enough log for us to be of any help. You need to capture the full WeeWX startup, this contains important config information. You also need a longer log extract, if your archive interval is five minutes then we need to see at least 10 minutes of log.

Gary

PS. For what it is worth I see no problems in the log extract that was posted.

Thomas Hackler

unread,
Feb 18, 2024, 3:25:40 PMFeb 18
to weewx-user
ok thanks, I was not ready for version 5 and start reading the docs
attached there is a 15 minutes log, I guess now is everything working
My edge browser didn't show me the actual pictures from the season skin, neo wx is working
but firefox show me both
thanks for the support and documentation (helps to learn a lot)

Thomas Hackler

unread,
Feb 18, 2024, 3:26:07 PMFeb 18
to weewx-user
log2.txt

gjr80

unread,
Feb 18, 2024, 11:45:00 PMFeb 18
to weewx-user
That is a very good log extract. From that extract WeeWX seems to be running just fine with no errors. The lines similar to:
Feb 18 21:05:40 raspberrypi weewxd[35139]: DEBUG weewx.reportengine: Cannot read localization file /etc/weewx/skins/neowx-material/lang/en.conf for report 'StandardReport': Config file not found: "/etc/weewx/skins/neowx-material/lang/en.conf".
Feb 18 21:05:40 raspberrypi weewxd[35139]: DEBUG weewx.reportengine: **** Using defaults instead.
mean than an English language config file could not be found and the defaults are being used instead. If your skin files are being generated in the correct language you can ignore this.

The neowx-material SyntaxWarnings are exactly that, a warning and do not appear to be causing a problem. If they are causing a problem then you should take this up with the neowx-material author.

If your system is running error free and you are having problems viewing current pages/plots in a browser the first thing to do is to clear the browser cache. How you do this varies from browser to browser.

A few additional comments. First you seem to have the neowx-material skin being run under the StandardReport report. This is not a problem as the report name merely needs to be a unique (compared to other report names) string. However, considering that WeeWX ships with a skin called Standard that is run under a report named StandardReport you might find it less confusing (especially if you need outside help in the future) to give the report that runs the neowx-material skin a more descriptive name, eg Neowx-MaterialReport.

The order of your enabled reports under [StdReport] in weewx.conf appears to be SeasonsReport, FTP, StandardReport (which runs the neowx-material skin). Again this runs without error, but it means you Seasons skin files are generated, your files are uploaded by FTP then the neowx-material skin files are generated. The result is that when the FTP report uploads your files it uploads the just generated Seasons skin file, but it then uploads the previously generated neowx-material skin files. In other words, on you web server you will see the current Seasons skin files but your neowx-material files will always be at least five minutes old. Under [StdReport] the order of the report stanzas matters. I suspect you would be better off changing the order of your enabled reports to SeasonsReportStandardReport,FTP.

Finally, your driver version is 0.4.2KW, I have no idea where you sourced this driver from as I have never released such a version and have no idea what modifications may have been made to the driver. The current Ecowitt gateway (nee GW1000) driver is v0.6.0, so depending on your requirements you might want source a more up to date version.

Gary

Thomas Hackler

unread,
Feb 21, 2024, 9:57:58 AMFeb 21
to weewx-user
thanks for the detailed help

I changed the order as you suggested

Do you mean that I should change this part in my weewx.conf:

[[StandardReport]]
skin = neowx-material

in

[Neowx-Material-Report]]
skin = neowx-material

Weewx will have no problem that there is no entrance [[StandardReport]] anymore ?

the reason of the different driver version could be that I got this driver from a german weather station forum and it is not a one from you.


not all sensors where supported in the past and so this modified version were made

I plan to install a complete new and clean system for my raspberry pi, then I would go further with driver version 0.6.0
I hope that this cause no problems with the databse and all the things

gjr80

unread,
Feb 21, 2024, 3:27:06 PMFeb 21
to weewx-user
On Thursday 22 February 2024 at 00:57:58 UTC+10 Thomas Hackler wrote:
Do you mean that I should change this part in my weewx.conf:

[[StandardReport]]
skin = neowx-material

in

[Neowx-Material-Report]]
skin = neowx-material

Yes, the actual name is unimportant, but something descriptive will be useful when reading logs etc in the future.(I note a missing '[', I am guessing this is a copy/paste issue)
 
Weewx will have no problem that there is no entrance [[StandardReport]] anymore ?

No problem at all. WeeWX has no particular requirements of report stanza names other than within a given [StdReport] stanza the report names must be unique. Convention is to give the report a meaningful name, usually something that relates to the skin being used or purpose of the report.
 
the reason of the different driver version could be that I got this driver from a german weather station forum and it is not a one from you.


not all sensors where supported in the past and so this modified version were made

No problem, I was merely pointing out that the version of the driver being used appears to be based on the v0.4.2 driver, but the current driver version is v0.6.0 (actually v0.6.1 as of yesterday). There have been a number of bug fixes and new features introduced since v0.4.2, but knowing nothing about v0.4.2KW I suggested that you might want to find a more recent version from whatever source you wish.

I plan to install a complete new and clean system for my raspberry pi, then I would go further with driver version 0.6.0
I hope that this cause no problems with the database and all the things

Unlikely to be any problems, though if extra sensors were added to v0.4.2KW and they use a different naming convention/default mapping compared to the same sensors in say v0.6.1 then there could be issues. It really depends on what 'extras'  were added to v0.4.2KW.

Gary
Reply all
Reply to author
Forward
0 new messages