Hi, I have the following configuration in /etc/rsyslog.conf # grep messages /etc/rsyslog.conf *.info;mail.none;authpriv.none;cron.none;local3.none;local6.none /var/log/messages # grep local /etc/rsyslog.conf *.info;mail.none;authpriv.none;cron.none;local3.none;local6.none /var/log/messages local7.* /var/log/boot.log local6.* /var/log/snmpd.log local3.* /var/log/dhcpd.log /etc/dhcp/dhcpd.conf has log-facility local3; In one machine dhcp logs get only in /var/log/dhcpd.conf In another machine (same OS/same patches) dhcp logs get both in /var/log/dhcpd.conf and /var/log/messages. It seems that *.info does the harm. If I remove it then I don't have dhcp logs in /var/log/messages but also no logs... root 31573 0.0 0.0 29936 1396 ? Ssl 13:57 0:00 /sbin/rsyslogd -n -c 5 -f /etc/rsyslog.conf Any ideas? regards, Giannis
Are you sure dhcpd doesn't produce messages with any other facility? This can happen according to the man page (dhcpd.conf(5)). You can also do a simple test: On the affected machine, add to /etc/rsyslog.conf: local3.error /tmp/l3.err *.error;local3.none /tmp/not-l3.err and run: $ logger -p local3.error msg-l3.err $ logger -p local4.error msg-not-l3.err This simple scenario should represent the core of the problem. Each message should end up only in the respective file.
Apparently the problem was in dhcpd and not in rsyslog. It needed the startup option -q in /etc/sysconfig/dhcpd ... Your test worked as it should. thanks Giannis
(In reply to comment #2) > Apparently the problem was in dhcpd and not in rsyslog. > It needed the startup option -q in /etc/sysconfig/dhcpd Hmmm, the -q (quiet) also partly solves the problem I've seen on F16 and that is that /var/log/messages now contains each dhcpd log message twice (where one of them has [PID] and one not), see for example this: Feb 21 18:41:13 zepelin dhcpd: Internet Systems Consortium DHCP Server 4.2.3-P2 Feb 21 18:41:13 zepelin dhcpd[13500]: Internet Systems Consortium DHCP Server 4.2.3-P2 Feb 21 18:41:13 zepelin dhcpd: Copyright 2004-2012 Internet Systems Consortium. Feb 21 18:41:13 zepelin dhcpd[13500]: Copyright 2004-2012 Internet Systems Consortium. Feb 21 18:41:13 zepelin dhcpd: All rights reserved. Feb 21 18:41:13 zepelin dhcpd[13500]: All rights reserved. I have no idea what causes this as it was ok with F15. I'll try to finally investigate this more.
So I hopefully solved the problem described in previous comment. dhcpd logs all output using syslog(3) and also sends log messages to the standard error descriptor. Logging to stderr could be omited either by using "-q" or (as I understand the "-f" and "-d" description in dhcpd(8)) by using "-f". Problem is that "-f" and "-d" behaves the same which I think is bug. I reported that upstream and built new packages [1] with a fix. But I have no idea why in F16 (unlike F15) /var/log/messages contains messages that dhcpd writes to stderr. I guess it's something to do with systemd. Or does Tomas have any clue ? Anyway I hope the fix solves also the Kapetanakis' problem because it should now work the same way as with the "-q" switch. [1] http://koji.fedoraproject.org/koji/taskinfo?taskID=3810301
(In reply to comment #4) > dhcpd logs all output using syslog(3) and also sends log messages to the > standard error descriptor. > But I have no idea why in F16 (unlike F15) /var/log/messages contains messages > that dhcpd writes to stderr. > I guess it's something to do with systemd. > Or does Tomas have any clue ? Precisely. The change in f16 is mentioned here: https://bugzilla.redhat.com/show_bug.cgi?id=734547#c2
dhcp-4.2.3-22.P2.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/dhcp-4.2.3-22.P2.fc17
Package dhcp-4.2.3-22.P2.fc17: * should fix your issue, * was pushed to the Fedora 17 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing dhcp-4.2.3-22.P2.fc17' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-4532/dhcp-4.2.3-22.P2.fc17 then log in and leave karma (feedback).
dhcp-4.2.3-23.P2.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/dhcp-4.2.3-23.P2.fc17
dhcp-4.2.3-24.P2.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.
dhcp-4.2.3-8.P2.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/dhcp-4.2.3-8.P2.fc16
dhcp-4.2.3-8.P2.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.
(In reply to Jiri Popelka from comment #4) > dhcpd logs all output using syslog(3) and also sends log messages to the > standard error descriptor. > Logging to stderr could be omited either by using "-q" or (as I understand > the "-f" and "-d" description in dhcpd(8)) by using "-f". > Problem is that "-f" and "-d" behaves the same which I think is bug. After discussion with upstream we decided to not change the "-f" behavior. I've added 'StandardError=null' to *.service files which should fix the original problem just fine. http://pkgs.fedoraproject.org/cgit/dhcp.git/commit/?id=6756a54bda978fadccc376f5853f3aced7136b91