No logs at *ALL*??!

153 views
Skip to first unread message

MrPete

unread,
Mar 13, 2023, 10:27:27 PM3/13/23
to weewx-user
My weewx was running reasonably well for a year.
In Feb we left on a trip.
I returned, and learned weewx stopped working back on Feb 22
Here's the strange part: NOTHING is being logged.

/var/log/weewx.log has been empty since the end of January.

I run systemctl start weewx and it blows up early on (the exact reason doesn't matter at this point -- a server communication failure)

What seems important: systemctl status weewx sees the most recent error messages.

But *I simply cannot find the log file!!*

Any hints would be most welcome!
Pete

vince

unread,
Mar 13, 2023, 10:50:51 PM3/13/23
to weewx-user
Again - no description of the configuration.  C'mon folks....

What os ? If you have a /var/log/weewx.log you did something special to log to that.  Read that config file for where you set stuff to go to. In the absence of that try the FAQ and the 'where are my logs' item in it.

Tom Keffer

unread,
Mar 14, 2023, 7:40:17 AM3/14/23
to weewx...@googlegroups.com
Take a look at the section Where to find things in the User's Guide to locate your log.

--
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/fbd5b10d-53b7-4d19-a611-42b227c5adabn%40googlegroups.com.

Paul R Anderson

unread,
Mar 14, 2023, 9:24:43 AM3/14/23
to weewx...@googlegroups.com
Seems like your system uses systemd since you state that you tried "I run systemctl start weewx"
Based on that weewx seems to have a unit file name of "weewx"
Under Systemd you can use journalctl to query the contents of the systemd journal.
You can pass it a unit file name, and start stop ranges alone with a lot of other options.
You should be able to see all logging activity since 2023 02 01 with:

sudo journalctl -u weewx.service --since "2023-02-01"

where -u is the unit name, --since is a date in YYYY-MM-DD format
Also you can redirect output to a file to save it
 sudo journalctl -u weewx.service --since "2023-02-01">/var/tmp/weewx.log


michael.k...@gmx.at

unread,
Mar 15, 2023, 3:14:31 AM3/15/23
to weewx-user
I'd just try if  /var/log/weewxd.log log exists and has current entries.
For whatever reason after having weewx logging to  /var/log/weewx.log, it changed to /var/log/weewxd.log some months ago.

vince

unread,
Mar 15, 2023, 4:21:13 AM3/15/23
to weewx-user
[...vent mode on, I guess...]
We are seeing these kinds of threads all too often these days...

A post essentially saying "my standard logs from systemd are there, but my old custom logs are gone - where are they?" is an impossible ask.

Given the original description saying something broke 23 days ago, it's entirely possible any logs were logrotated to /dev/null by now.   There's no way to possibly guess what the original poster customized. For all we know that log was in tmpfs and a reboot made them go poof.  Impossible to help with such a skeletal problem description.
  • No standard and requested twice 'how to report a problem' information has been provided.
  • No info on his customizations has been provided
  • We seem to be expected to read minds.
At some point if you decide to set up a custom setup, you have to be willing+able to support that custom setup...

No sympathy here.

MrPete

unread,
Mar 20, 2023, 4:22:12 PM3/20/23
to weewx-user
NOT "custom logs". I turned on `debug=1` -- if that's customization, ok.

Paul Anderson nailed it. 

I knew nothing about systemd logging. Now I do. 

As a person with some significant background in computing (yet new to this environment), I suspect the following might be confusing to more than a few people new to weewx..

Here is the extent of the documentation help for those who happen to have a system using systemd/journald:

"WeeWX logs many events to the system log. On Debian systems, this is /var/log/syslog, on SuSE, /var/log/messages. Your system may use yet another place. When troubleshooting the system, be sure to check it!"

:-D


vince

unread,
Mar 20, 2023, 4:42:30 PM3/20/23
to weewx-user
You said "/var/log/weewx.log has been empty since the end of January."   That file is not created in a vanilla default installation. That means you did something to choose to make that configuration happen. I suspect you might have followed this wiki page (link).  It is very likely you configured rsyslogd to put weewx logs someplace custom.  It's also possible you didn't enable rsyslogd to run at boot so if your system rebooted it might not even be running.

You've provided zero information about your system.  Nothing about its os or version.  Nothing about its logging.  Nothing about your weewx installation (version, package-or-setup etc.).   In the absence of any real information, there is really not much we can do to help you out other than to point you to the docs of where to look for the usual places.

I do not know what "nailed it" means.

Re: logs - this is in the FAQ (link), in the User's Guide if you pick your os on (this section).  Other User's Guide pointer is (here) and there are a variety of other places logging is mentioned.

Re: operating systems being confusing - that is not a weewx problem.  Each os does things differently.  You have to understand your os enough to know where to look and how logging work on your chosen os.



MrPete

unread,
Mar 24, 2023, 1:43:45 PM3/24/23
to weewx-user
@vince, thanks for those thoughts. I will add more detail so you don't need to guess on what is likely let alone real...

* Paul Anderson "nailed it" in concluding that my system is running systemd / journald (and journalctl). As I said: "...nailed it. I knew nothing about systemd logging. Now I do..." That was a HUGE "aha!" moment for me!

* As of March 13 when I started this thread, I hadn't custom configured any aspect of logging. (I since did discover the page you linked, and now I do have a logrotate-enabled weewxd.log file ;)... but that's immaterial to the original question.)

* This VM (in ProxMox 7 VE fwiw) is running a straight install of Ubuntu 20.04 LTS (and weewx 4.10.2, not that it matters AFAIK?). 

* I had no idea my setup is unusual. That's exactly why I asked the question. Until this situation, I was under the impression that Ubuntu is derived from, and essentially similar to, Debian. I've got several Debian VM's but thought I'd try something more stable, hence my choice to use Ubuntu LTS. As I'm sure you know better than me, the weewx install for Ubuntu is literally identical to that for Debian. All of my other Linux instances (VM, NAS, and other) have what I consider a typical logging setup (various files in /var/log). So I expected this to function exactly the same. Not knowing there was something different, how would I even suspect something about the logging system???

A suggestion: apparently systemd, and journald/journalctl, are the up-and-coming 'new' logging methodology for linux distros (only around since 2015 LOL!) It may help to eventually mention `journalctl` and/or other associated commands in one or more of the documentation areas, eg FAQ, User's Guide, etc. (As of this moment, the following google searches find no mention: site:weewx.com journalctl ... or site:github.com/weewx journalctl) 

(BTW, the github record shows that weewx itself must understand the os enough to know where to look, and how logging works. There was a `journald` related patch just last year, and quite a few systemd-related items.  If weewx needs updating for compatibility, I'm not surprised that the docs might need updating as well.)

vince

unread,
Mar 24, 2023, 4:59:42 PM3/24/23
to weewx-user
Still lost what you're getting at, nor if you solved your own problem somehow (and how, for the next guy).

Bottom line is you have to understand your os and how it logs.   You also have to completely describe your setup so we can try to help.  That's why we always ask.


Most common os will log to /var/log/syslog or /var/log/messages or both.    Sometimes you need to add a syslog daemon package to the core os (rsyslog or syslog-ng or others) and enable 'that' to make logging to those files happen, especially if you are systemd based like modern debian/ubuntu.

Your mention of weewx.log tells me you have added a syslog package configured to put things now.  No os does that by default.  I'm guessing you have rsyslog installed.  You can check with "dpkg -l | grep syslog"

On a systemd-based os (modern debian(ish) and redhat(ish)) you should learn journalctl as well.   The systemd borg has been increasingly consuming everything everywhere.  We don't control that.

What I asked multiple times for was a basic description of your setup.
A good problem description would have included:
  • you're running ubuntu 22.04 LTS
  • you're running weewx 4.10.2 in a proxmox vm
  • (you STILL have not said if you installed weewx via apt from a package, or if you ran setup.py to install that way)
  • you have rsyslog installed and configured to log weewx to /var/log/weewx.log
  • that log is empty for at least 3 weeks now
  • but system status weewx is showing some recent logs
  • why is my weewx.log empty ?
If you'd provided that as a description of your setup, my assessment would have been that you'd added rsyslog log ago and manually started it, and that the problem was likely that you didn't enable it to start on boot.   You should see output similar to this example from a pi.

pi@pi4:~ $ systemctl status rsyslog
● rsyslog.service - System Logging Service
     Loaded: loaded (/lib/systemd/system/rsyslog.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2022-09-12 18:58:43 PDT; 6 months 10 days ago
TriggeredBy: ● syslog.socket
       Docs: man:rsyslogd(8)
             man:rsyslog.conf(5)
             https://www.rsyslog.com/doc/
   Main PID: 421 (rsyslogd)
      Tasks: 4 (limit: 4915)
        CPU: 5min 41.717s
     CGroup: /system.slice/rsyslog.service
             └─421 /usr/sbin/rsyslogd -n -iNONE

Warning: journal has been rotated since unit was started, output may be incomplete.

If your system shows empty yet enabled+running, then I'd guess your logrotate setup nuked the file but kept the filehandle open, rather than doing a proper log rotation.  It happens.

Reply all
Reply to author
Forward
0 new messages