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.
Bug 1685901 - rsyslog floods log files when watching files through a symlink
Summary: rsyslog floods log files when watching files through a symlink
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: rsyslog
Version: 7.6
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Jiří Vymazal
QA Contact: Marek Tamaskovic
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-06 09:24 UTC by Aniket Bhavsar
Modified: 2019-08-06 12:48 UTC (History)
5 users (show)

Fixed In Version: rsyslog-8.24.0-37.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-06 12:48:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github rsyslog rsyslog pull 3307 0 'None' closed disable file vs directory error on symlinks 2020-08-25 01:13:44 UTC
Red Hat Product Errata RHSA-2019:2110 0 None None None 2019-08-06 12:48:36 UTC

Internal Links: 1810350

Description Aniket Bhavsar 2019-03-06 09:24:37 UTC
Description of problem:
rsyslog floods log files when watching files through a symlink

When using imfile to watch a file where the path contains a symlink, one error per second (every second, indefinitely) will be logged by rsyslog. While the file in question is still logged as expected, the log flooding is highly undesirable.

The relevant config looks like this:

$ModLoad imfile

$InputFileName /var/lib/mysql/mysql-slow.log
$InputFileTag mysqlslow-query:
$InputFileStateFile mysqlslow-query
$InputFileSeverity debug
$InputFileFacility local1
$InputRunFileMonitor

/var/lib/mysql is a symlink, like so:

# ls -l /var/lib/mysql
lrwxrwxrwx 1 root root 24 Aug 30  2017 /var/lib/mysql -> /mnt/edata/var/lib/mysql

As a result, we see this:

(...)
Feb 15 14:11:19 testabc rsyslogd: imfile: '/var/lib/mysql' is FILE but DIRECTORY expected - ignored [v8.24.0-34.el7]
Feb 15 14:11:20 testabc rsyslogd: imfile: '/var/lib/mysql' is FILE but DIRECTORY expected - ignored [v8.24.0-34.el7]
Feb 15 14:11:21 testabc rsyslogd: imfile: '/var/lib/mysql' is FILE but DIRECTORY expected - ignored [v8.24.0-34.el7]
(...)

When using /mnt/edata/var/lib/mysql/mysql-slow.log directly in the config file, we don't see the above. However, being able to use symlinks here is highly desirable.

Version-Release number of selected component (if applicable):
v8.24.0-34.el7

How reproducible:
Add a symbolic link to an existing log file.

Steps to Reproduce:
1. Define imfile module.
2. Create a symbolic link.
3. Check logs files for error like:

rsyslogd: imfile: '/var/lib/mysql' is FILE but DIRECTORY expected - ignored [v8.24.0-34.el7]

Actual results:
rsyslogd: imfile: '/var/lib/mysql' is FILE but DIRECTORY expected - ignored [v8.24.0-34.el7]

Expected results:
Logs should be generated without any errors.

Additional info:

Comment 8 errata-xmlrpc 2019-08-06 12:48:13 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:2110


Note You need to log in before you can comment on or make changes to this bug.