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.

Bug 1285642

Summary: journald.conf - changed default for ForwardToSyslog parameter
Product: Red Hat Enterprise Linux 7 Reporter: adam winberg <adam.winberg>
Component: systemdAssignee: systemd-maint
Status: CLOSED ERRATA QA Contact: Branislav Blaškovič <bblaskov>
Severity: high Docs Contact:
Priority: urgent    
Version: 7.2CC: bblaskov, chorn, cww, dmoessne, dshaw, fkrska, jscotka, juanluisvaladas, lnykryn, msekleta, pdwyer, pvrabec, sven, systemd-maint-list, systemd-maint
Target Milestone: rcKeywords: Reopened, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: systemd-219-20.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1328780 (view as bug list) Environment:
Last Closed: 2016-11-04 00:47:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1203710, 1289485, 1313485, 1328780    

Description adam winberg 2015-11-26 07:04:50 UTC
Description of problem:
RHEL7.2 seems to change the default value for journald's 'ForwardToSyslog' parameter. This is set in /etc/systemd/journald.conf, and was pre-7.2 set by default to 'yes'. In 7.2 it is set by default to 'no'. 

Since default value was 'yes' before, we did not bother setting this explicitly. After upgrading to 7.2, rsyslog does not get any logs via the '/run/systemd/journal/syslog' socket. 

I found no mention of this in the release notes. 

Version-Release number of selected component (if applicable):
systemd-219-19.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1. -
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Lukáš Nykrýn 2015-11-26 16:05:08 UTC
We kept the upstream behavior change, but it should not matter, we are not using that syslog socket at all, rsyslog reads directly journal data.

Comment 2 adam winberg 2015-11-27 06:30:01 UTC
well thats weird, because our rsyslog logging stopped working right after update to 7.2, and started working again after settting 'ForwardToSyslog=yes' in journald.conf and restarting systemd-journald. 

systemd drops a 'listen.conf' file in /etc/rsyslog.d/ with contents:

$SystemLogSocketName /run/systemd/journal/syslog

And according to RHEL7 official sysadmin guide ("Interaction of Rsyslog and Journal") this socket is very much used. 

Maybe I'm misunderstanding something.

Comment 3 Juan-Luis de Sousa-Valadas 2015-12-01 09:29:14 UTC
Our rsyslog stopped working as well after updating to RHEL 7.2 (We have no relation with Adam).

We fixed it by running:

mkdir -p /run/systemd/journal/
restorecon -Rv /run/systemd/journal/
#(The following may be an overkill)
systemctl restart rsyslog
systemctl restart systemd-journald.socket
systemctl restart systemd-journald

I must be missing something as well because systemd drops the listen.conf and also /usr/lib/systemd/system/syslog.socket

If it's not supposed to do it that way, then something else has a problem.

Comment 4 Lukáš Nykrýn 2015-12-01 12:06:22 UTC
Do you have logs from that update?
I have tried that couple a times and besides some small issues with watchdog, it was working fine after the update.

Comment 5 Tomas Heinrich 2015-12-07 12:55:19 UTC
(In reply to adam winberg from comment #2)
> well thats weird, because our rsyslog logging stopped working right after
> update to 7.2, and started working again after settting
> 'ForwardToSyslog=yes' in journald.conf and restarting systemd-journald. 

Could you post your rsyslog.conf if it has any changes?

> systemd drops a 'listen.conf' file in /etc/rsyslog.d/ with contents:
> 
> $SystemLogSocketName /run/systemd/journal/syslog

Yes, to be optionally used if one doesn't want to query the journal via imjournal. The default rsyslog.conf doesn't use this socket.

> And according to RHEL7 official sysadmin guide ("Interaction of Rsyslog and
> Journal") this socket is very much used. 

Could you post a link to the documentation stating this?

Comment 6 adam winberg 2015-12-07 12:58:56 UTC
(In reply to Tomas Heinrich from comment #5)
> > well thats weird, because our rsyslog logging stopped working right after
> > update to 7.2, and started working again after settting
> > 'ForwardToSyslog=yes' in journald.conf and restarting systemd-journald. 
> 
> Could you post your rsyslog.conf if it has any changes?
as per the instruction in the redhat documentation (see url below) we have added:
$ModLoad imuxsock
$OmitLocalLogging off

  
> > And according to RHEL7 official sysadmin guide ("Interaction of Rsyslog and
> > Journal") this socket is very much used. 
> 
> Could you post a link to the documentation stating this?

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/s1-interaction_of_rsyslog_and_journal.html

Comment 7 Tomas Heinrich 2015-12-07 13:30:36 UTC
(In reply to adam winberg from comment #6)
> (In reply to Tomas Heinrich from comment #5)
> > > well thats weird, because our rsyslog logging stopped working right after
> > > update to 7.2, and started working again after settting
> > > 'ForwardToSyslog=yes' in journald.conf and restarting systemd-journald. 
> > 
> > Could you post your rsyslog.conf if it has any changes?

> as per the instruction in the redhat documentation (see url below) we have
> added:
> $ModLoad imuxsock
> $OmitLocalLogging off

That paragraph starts with "As an alternative...".


> > > And according to RHEL7 official sysadmin guide ("Interaction of Rsyslog and
> > > Journal") this socket is very much used. 

Yes, it is used - after you've changed the configuration.

> > Could you post a link to the documentation stating this?
> 
> https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/
> html/System_Administrators_Guide/s1-interaction_of_rsyslog_and_journal.html


So, as I understand it, the defaults work and there's no outstanding bug.
If there was no mention of the change to the systemd defaults in release notes, that's unfortunate.

Comment 8 adam winberg 2015-12-08 09:49:43 UTC
The admin guide also states: 
"Compared to imjournal the socket input currently offers more features, such as ruleset binding or filtering."

which would be the reason we chose this configuration and, i would presume, several other of your customers.

Unfortunate with the release notes, yes. Also, the admin guide is no longer correct as it does not inform users that journald.conf also needs to be changed for this to work.

Comment 10 Lukáš Nykrýn 2015-12-10 12:44:59 UTC
devel_ack for reverting the mentioned change.

Comment 16 Branislav Blaškovič 2016-08-15 13:49:19 UTC
Tested using /CoreOS/systemd/Regression/journald-default-ForwardToSyslog-value

NEW VERSION:
:: [   LOG    ] :: Package versions:
:: [   LOG    ] ::   systemd-219-26.el7.x86_64
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Sanity test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: File '/etc/systemd/journald.conf' should contain '#ForwardToSyslog=yes' 
:: [   LOG    ] :: Duration: 0s
:: [   LOG    ] :: Assertions: 1 good, 0 bad
:: [   PASS   ] :: RESULT: Sanity test

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Regression test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Command 'RAND_STR=testing-13462' (Expected 0, got 0)
:: [   PASS   ] :: Command 'logger testing-13462' (Expected 0, got 0)
:: [   PASS   ] :: File '/var/log/messages' should contain 'testing-13462' 
:: [   LOG    ] :: Duration: 1s
:: [   LOG    ] :: Assertions: 3 good, 0 bad
:: [   PASS   ] :: RESULT: Regression test

OLD VERSION:
:: [   LOG    ] :: Package versions:
:: [   LOG    ] ::   systemd-219-19.el7.x86_64
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Sanity test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   FAIL   ] :: File '/etc/systemd/journald.conf' should contain '#ForwardToSyslog=yes' 
:: [   LOG    ] :: Duration: 0s
:: [   LOG    ] :: Assertions: 0 good, 1 bad
:: [   FAIL   ] :: RESULT: Sanity test

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Regression test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Command 'RAND_STR=testing-6800' (Expected 0, got 0)
:: [   PASS   ] :: Command 'logger testing-6800' (Expected 0, got 0)
:: [   FAIL   ] :: File '/var/log/messages' should contain 'testing-6800' 
:: [   LOG    ] :: Duration: 0s
:: [   LOG    ] :: Assertions: 2 good, 1 bad
:: [   FAIL   ] :: RESULT: Regression test

Comment 18 errata-xmlrpc 2016-11-04 00:47:04 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://rhn.redhat.com/errata/RHBA-2016-2216.html