6 ms·
Yes, sorry if what I wrote was misleading. You can't replace journald with rsyslog, but the only complaints I hear about journald are that it's binary so you ha
by freedomben 7y ago
Yes, sorry if what I wrote was misleading. You can't replace journald with rsyslog, but the only complaints I hear about journald are that it's binary so you have to use journalctl to read them. By installing rsyslog you basically get the classic log behavior back. So technically under the hood you're still using journald, but you never have to know it.
- pferde 7y agoMy main complaint is that journald is unreliable and is losing log entries (or lines, if you will). I had an automation recipe that would start a bunch of cloud instances, configure them and start certain job via a systemd service unit, and collect logs from this job 24 hours later. Initially, we were pulling these logs via journald as logs for that service unit. But then we noticed that random lines (1-5 lines out of maybe 40 for a single job) would be missing in about half the instances. We ended up pulling those logs from files in /var/log instead, made courtesy of rsyslog. Not a single missed line. Again journald is unreliable and as a whole should be nuked from the orbit.
- freedomben 7y agoInteresting, this is the first time I've ever heard this. How long ago did this happen?
- pferde 7y agoSometimes between August and September, and it was on Suse Linux Enterprise Server 12. The lines would go missing mostly if the logs were collected two or three days later instead of immediately after the job finished (it was a job running for 24 hours), which leads me to think it had to do with journald expiring entries to save on disk space. A consistent log manager would expire them chronologically, but here the lines were missing from the middle or the end of the output, so not the oldest ones logged.
- newnewpdro 7y agoFiltering journal contents by metadata is known to be unreliable. It's not that the logs are missing, it's that they're not getting included by your query. The way journald associates log lines with process metadata is inherently racy. This situation has improved some with the metadata caching changes, but IIRC there are still some holes where processes can log without journald associating accurate/up-to-date metadata with the logged info.
- pferde 7y agoThat makes sense, I guess, in a rather warped and bizarre way. The point still stands - journald is unreliable, and after getting burnt like this it will be years before I start trusting it again.
- newnewpdro 7y agoFYI, in case you wanted to document your pain, it might help prioritize fixing it fully: https://github.com/systemd/systemd/issues/2913 https://github.com/systemd/systemd/issues/2913
- dannyw 7y agoGreat, so why don't we just keep text logs as text files?
- Yizahi 7y agoI concur. We also saw an issue with journald missing whole hours of logs, randomly, on our embedded platform. Couldn't replace all of them with log files due to SSD degradation (we actually calculated it we were missing target device lifespan, this is not a consumer problem of course). Basically we added log files where we could, plus remote logs and left journald as-is, it can't be replaced and can't be fixed.
- newnewpdro 7y agoThere are a whole lot more complaints than that for journald. The most common one (and one I share) is how slow it can be. `systemctl status foo.service` takes a significant amount of time on any of my machines thanks to the journal, and that's just the reader side. It used to be quite crashy with lots of CPU overhead, but that has improved over time, the metadata caching helped a bunch with the overhead. There was also a pretty embarrassing CVE not long ago: https://nvd.nist.gov/vuln/detail/CVE-2018-16865 https://nvd.nist.gov/vuln/detail/CVE-2018-16865
- deleted 7y ago[deleted]