Bug 791190 - rsyslog service start without any notice even if there are errors in log due to bad configuration
Summary: rsyslog service start without any notice even if there are errors in log due ...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: rsyslog
Version: 6.3
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Tomas Heinrich
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-16 12:43 UTC by Dalibor Pospíšil
Modified: 2016-09-20 04:50 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-06 13:08:10 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Dalibor Pospíšil 2012-02-16 12:43:53 UTC
Description of problem:

No error or warning appears while starting service if the configuration is erroneous.

Version-Release number of selected component (if applicable):

since at least rsyslog-4.6.2-3.el6.x86_64.rpm

How reproducible:

always

Steps to Reproduce:
1. Make sure ktah rsyslog-gssapi is not installed
2. configure rsyslog to use im gssapi:
$ModLoad imgssapi.so
$InputGSSServerRun 514
$InputGSSServerPermitPlainTCP on

3. service rsyslog start

Actual results:
status is OK even if in log is:

Feb 16 12:32:17 rhel62 kernel: imklog 4.6.2, log source = /proc/kmsg started.
Feb 16 12:32:17 rhel62 rsyslogd: [origin software="rsyslogd" swVersion="4.6.2" x-pid="12184" x-info="http://www.rsyslog.com"] (re)start
Feb 16 12:32:17 rhel62 rsyslogd-2066: could not load module '/lib64/rsyslog/imgssapi.so', dlopen: /lib64/rsyslog/imgssapi.so: cannot open shared object file: No such file or directory
 [try http://www.rsyslog.com/e/2066 ]
Feb 16 12:32:17 rhel62 rsyslogd: the last error occured in /etc/rsyslog.conf, line 79:"$ModLoad imgssapi.so"
Feb 16 12:32:17 rhel62 rsyslogd-3003: invalid or yet-unknown config file command - have you forgotten to load a module? [try http://www.rsyslog.com/e/3003 ]
Feb 16 12:32:17 rhel62 rsyslogd: the last error occured in /etc/rsyslog.conf, line 80:"$InputGSSServerRun 514"
Feb 16 12:32:17 rhel62 rsyslogd-3003: invalid or yet-unknown config file command - have you forgotten to load a module? [try http://www.rsyslog.com/e/3003 ]
Feb 16 12:32:17 rhel62 rsyslogd: the last error occured in /etc/rsyslog.conf, line 81:"$InputGSSServerPermitPlainTCP on"


Expected results:
at least some warrning

Additional info:

Comment 2 Tomas Heinrich 2012-02-21 12:14:44 UTC
I'm probably going to close this as WONTFIX.
Several reasons for this:

- By the time the configuration is parsed, the daemon had already
  forked and has no access to stderr. The warnings/errors are still
  logged, though.
- The syslogd configuration is rarely changed and the daemon provides
  an option (-N) to check the configuration file for errors.
- If you want the daemon to abort at any sign of misconfiguration,
  there's a configuration directive:
  http://www.rsyslog.com/doc/rsconf1_abortonuncleanconfig.html
  $AboortOnUncleanConfig
  Available since: 5.3.1+
  Default: off
- The philosophy of rsyslog is to proceed even if there are errors in
  the config file as a running syslogd is a vital part of the os.
- There's already an older bz arguing this point:
  https://bugzilla.redhat.com/show_bug.cgi?id=136141
  "syntax errors in syslogd.conf cause lost log messages without warning"


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