Bug 1139734 - logger does not work with rsyslog
Summary: logger does not work with rsyslog
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: rsyslog (Show other bugs)
(Show other bugs)
Version: 7.0
Hardware: Unspecified Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Tomas Heinrich
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-09 14:11 UTC by Eric Rich
Modified: 2018-12-06 18:01 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-09-10 15:51:01 UTC
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Article) 1188603 None None None Never

Description Eric Rich 2014-09-09 14:11:43 UTC
Description of problem:

Can not use logger or rsyslog logging frame work from with in a docker image. 

The following is suspected to be the issue: 

socket(PF_LOCAL, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 3
connect(3, {sa_family=AF_LOCAL, sun_path="/dev/log"}, 110) = -1 ENOENT (No such file or directory)

Version-Release number of selected component (if applicable): 0.11 from RHEL 7 

How reproducible: VERY

Steps to Reproduce:
1. docker run -it --rm rhel /bin/bash
2. yum -y install rsyslog
3. /usr/sbin/rsyslogd
4. logger "this is a test"

Actual results:
No log message appear in /var/log/messages

Expected results:
"this is a test" should appear in the log

Additional info:

Comment 2 Daniel Walsh 2014-09-09 14:25:31 UTC
Did rsyslogd not create the device?

Comment 3 Eric Rich 2014-09-09 14:37:58 UTC
(In reply to Daniel Walsh from comment #2)
> Did rsyslogd not create the device?

Nope, and when I ran an strace on rsyslog I did not see it fail in crating the device / socket.

Comment 4 Daniel Walsh 2014-09-10 12:08:45 UTC
After playing around with this for a while, I realized that rsyslog no longer listens on /dev/log by default it talks to journald, but journald is not running in your container, so you need to figure out how to get rsyslog to listen on /dev/log again.

Rsyslog guys how do I configure rsyslog to turn off journald support and back on /dev/log support?

Comment 5 Daniel Walsh 2014-09-10 14:23:26 UTC
Michal Schmidt says

In /etc/rsyslog.conf remove $ModLoad imjournal, set $OmitLocalLogging
to off and make sure $ModLoad imuxsock is present.

Comment 6 Tomas Heinrich 2014-09-10 15:06:10 UTC
(In reply to Daniel Walsh from comment #5)
> Michal Schmidt says
> 
> In /etc/rsyslog.conf remove $ModLoad imjournal, set $OmitLocalLogging
> to off and make sure $ModLoad imuxsock is present.

Also comment out:
$IMJournalStateFile imjournal.state

That should be about it.

This is a misconfiguration, not a bug.


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