Discussion:
[courier-users] journald logging
Bernd Plagge
2017-03-21 09:12:09 UTC
Permalink
Hi Sam,
thanks for a great product!

Times are changing and with the introduction of systemd also comes journald.
Seems that running syslog in addition to journald is not very good.

So, I switched syslog off.
Now I find imap and pop messages in the log but no delivery result or messages about incoming mails. It seems that half of the Courier messages does not make it into the journal.

Are there any settings I've overseen? Courier logging is turned on but maybe there are additional journald settings.

Any help is appreciated.
Cheers,

Bernard
--
Bernd Plagge - プラゲ ベェアント
First Choice Internet Ltd., Tokyo - ファヌスト・チョむス・むンタヌネット(有)
mail: ***@choicenet.ne.jp - url: http://www.choicenet.ne.jp
Sam Varshavchik
2017-03-21 11:03:04 UTC
Permalink
Post by Bernd Plagge
Hi Sam,
thanks for a great product!
Times are changing and with the introduction of systemd also comes journald.
Seems that running syslog in addition to journald is not very good.
So, I switched syslog off.
Now I find imap and pop messages in the log but no delivery result or
messages about incoming mails. It seems that half of the Courier messages
does not make it into the journal.
Are there any settings I've overseen? Courier logging is turned on but maybe
there are additional journald settings.
I'm not familiar with this aspect of systemd.

All messages from Courier get logged the same way, to the "mail" facility.
The only difference is that messages from the main courier daemon get sent
directly to syslog, while other daemons log to standard error, which is
piped to courierlogger, which reads them and syslog()s them.

I don't see anything obvious by perusing the various man pages.
Gordon Messmer
2017-03-21 16:58:31 UTC
Permalink
Post by Bernd Plagge
Now I find imap and pop messages in the log but no delivery result or messages about incoming mails. It seems that half of the Courier messages does not make it into the journal.
I'm seeing all of the expected logs, including courierd entries, in the
journal on CentOS 7 hosts. Courier was built and installed using rpm
and its included spec file.
Bernd Plagge
2017-03-22 08:32:10 UTC
Permalink
Subject: Re: [courier-users] journald logging
Date: Tue, 21 Mar 2017 09:58:31 -0700
Content-Transfer-Encoding: 7bit
Now I find imap and pop messages in the log but no delivery result or messages about incoming mails. It seems that half of the Courier >messages does not make it into the journal.
I'm seeing all of the expected logs, including courierd entries, in the
journal on CentOS 7 hosts. Courier was built and installed using rpm
and its included spec file.
Hi Gordon,

I'm running Courier 0.73.1-1.6 on Debian 8. Not sure if this makes a difference.

It seems that you're running journal without syslog, rsyslog or syslog-ng. Is this correct?
Does this require particular journald.conf settings?
Do you happen to have a link to the configuration description.

Thanks,
Bernd
--
Bernd Plagge - プラゲ ベェアント
Gordon Messmer
2017-03-23 20:56:55 UTC
Permalink
Post by Bernd Plagge
It seems that you're running journal without syslog, rsyslog or syslog-ng. Is this correct?
The default configuration for CentOS 7 runs journald as the primary log
recipient ("lsof /dev/log" will show systemd and systemd-journal), and
rsyslogd using journald as a message source ("sModLoad imjournal"
appears in rsyslog.conf).

The journal's content doesn't depend on rsyslogd running. I see the
same log patterns with rsyslogd running that I do when rsyslogd is stopped.
Post by Bernd Plagge
Does this require particular journald.conf settings?
It shouldn't.
Post by Bernd Plagge
Do you happen to have a link to the configuration description.
Not that I can find.
Bernd Plagge
2017-03-25 00:47:42 UTC
Permalink
Thanks Gordon!
On Fri, 24 Mar 2017 20:17:20 +0000
Post by Bernd Plagge
It seems that you're running journal without syslog, rsyslog or syslog-ng. Is this correct?
The default configuration for CentOS 7 runs journald as the primary log
recipient ("lsof /dev/log" will show systemd and systemd-journal), and
rsyslogd using journald as a message source ("sModLoad imjournal"
appears in rsyslog.conf).
The journal's content doesn't depend on rsyslogd running. I see the
same log patterns with rsyslogd running that I do when rsyslogd is stopped.
Post by Bernd Plagge
Does this require particular journald.conf settings?
It shouldn't.
Post by Bernd Plagge
Do you happen to have a link to the configuration description.
Not that I can find.
--
Bernd Plagge - プラゲ ベェアント
Bernd Plagge
2017-03-25 13:10:30 UTC
Permalink
The issue has been resolved. Here are the details for the record.
Goal was: use journald logging without additional syslog/rsyslog files

Linux-version: Debian 8.7 (jessie)

Two conditions must be met:
1) /dev/log must be a symlink to /run/systemd/journal/dev-log
(/run/systemd/journal/dev-log did exist but /dev/log was no symlink)
-> remove /dev/log and create the link
-> ln -s /run/systemd/jurnal/dev/log /dev/log

2) If you mask syslog-ng or rsyslog and then remove the packages syminks in /etc/systemd/system/ are not removed)
-> manually remove /etc/systemd/system/syslog-ng -> /dev/null and/or /etc/systemd/system/rsyslog -> /dev/null

Now restart socket and service:
1) restart the journald socket
-> systemctl restart systemd-journald.socket

2) restart the journald service
-> systemctl restart systemd-journald.service

Finally check with journalctl -f that logging works.

Cheers,
Bernd

On Fri, 24 Mar 2017 20:17:20 +0000
Subject: Re: [courier-users] journald logging
Date: Thu, 23 Mar 2017 13:56:55 -0700
Content-Transfer-Encoding: 7bit
Post by Bernd Plagge
It seems that you're running journal without syslog, rsyslog or syslog-ng. Is this correct?
The default configuration for CentOS 7 runs journald as the primary log
recipient ("lsof /dev/log" will show systemd and systemd-journal), and
rsyslogd using journald as a message source ("sModLoad imjournal"
appears in rsyslog.conf).
The journal's content doesn't depend on rsyslogd running. I see the
same log patterns with rsyslogd running that I do when rsyslogd is stopped.
Post by Bernd Plagge
Does this require particular journald.conf settings?
It shouldn't.
Post by Bernd Plagge
Do you happen to have a link to the configuration description.
Not that I can find.
--
Bernd Plagge - プラゲ ベェアント
Loading...