Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Systemd (journal) creates many files similar to `/var/log/journal/d6d244379c464a13a38ae1b05cab0c0a/user-22263`.
Later they are deleted.
### Expected behavior
When a file is deleted from disk, rsyslogd should close it prior to disk is full.
### Actual behavior
From the output of `lsof /var/log` you can see that rsyslog holds open many files. For example:
```
Apr 23 12:25:06 rsyslogd 62213 root 1469r REG 253,11 8388608 920711 /var/log/journal/d6d244379c464a13a38ae1b05cab0c0a/user-16328 (deleted)
Apr 23 12:25:06 rsyslogd 62213 root 1480r REG 253,11 8388608 917891 /var/log/journal/d6d244379c464a13a38ae1b05cab0c0a/user-19660 (deleted)
Apr 23 12:25:06 rsyslogd 62213 root 1487r REG 253,11 8388608 920573 /var/log/journal/d6d244379c464a13a38ae1b05cab0c0a/user-22769 (deleted)
...
...
```
This results to full disk.
### Steps to reproduce the behavior
This is `/etc/systemd/journald.conf`
```
[Journal]
SystemMaxUse=5G
SystemKeepFree=5G
```
### Environment
- rsyslog version: 8.24.0-34
- platform: RHEL 7
### Configuration
`/etc/rsyslog.conf`
```
$ModLoad imuxsock # provides support for local system logging (e.g. via logger command)
$ModLoad imjournal # provides access to the systemd journal
$WorkDirectory /var/lib/rsyslog
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
$OmitLocalLogging on
$IMJournalStateFile imjournal.state
*.info;mail.none;authpriv.none;cron.none;local1.none /var/log/messages
authpriv.* /var/log/secure
mail.* -/var/log/maillog
cron.* /var/log/cron
*.emerg :omusrmsg:*
uucp,news.crit /var/log/spooler
local7.* /var/log/boot.log
$MaxOpenFiles 4096
local1.* /var/log/dovecot/syslog
*.info @147.251.48.140
$SystemLogSocketName /run/systemd/journal/syslog
```
(In reply to Jiří Vymazal from comment #2)
>
> *** This bug has been marked as a duplicate of bug 1595840 ***
Hello, jvymazal,
I have faced the same problem recently and have been troubled for a long time. I asked for help in the rsyslog and systemd communities, but did not get the root cause.
BUG1595840 requires internal permissions to access. I would love to know the current status of this problem and how to solve it.
Hope you can help me.
thank you very much