On Wed, Apr 17, 2013 at 12:28 PM, Stefan Seyfried <stefan.seyfried@googlemail.com> wrote:
Am 14.04.2013 02:55, schrieb Cristian Rodríguez:
Ok Stefan:
So your syslog-ng losses messages on boot.. can you please test the following unit file and report back ?
save it as "syslog-ng.service" in /etc/systemd/system/
Does not it also need "systemctl enable syslog-ng.service", so that ...
[Unit] Description=System Logging Service Requires=var-run.mount Requires=syslog.socket After=var-run.mount Conflicts=rsyslog.service syslogd.service
[Service] Environment=SYSLOG_NG_PARAMS= ExecStartPre=/usr/sbin/syslog-ng-service-prepare EnvironmentFile=-/etc/sysconfig/syslog ExecStart=/usr/sbin/syslog-ng -F $SYSLOG_NG_PARAMS ExecReload=/bin/kill -HUP $MAINPID StandardOutput=null
[Install] WantedBy=multi-user.target Alias=syslog.service
... alias syslog.service is correctly created?
rebooted today,
susi:~ # journalctl -b | grep Forwarding Apr 17 08:46:05 susi.home.s3e.de systemd-journal[249]: Forwarding to syslog missed 112 messages. Apr 17 08:46:46 susi.home.s3e.de systemd-journal[249]: Forwarding to syslog missed 31 messages.
Before: Apr 17 08:45:41 susi.home.s3e.de systemd[1]: Starting Syslog Socket. Apr 17 08:45:41 susi.home.s3e.de systemd[1]: Listening on Syslog Socket. ... Apr 17 08:45:41 susi.home.s3e.de systemd[1]: Started Journal Service. Apr 17 08:45:41 susi.home.s3e.de systemd[1]: Starting Syslog. Apr 17 08:45:41 susi.home.s3e.de systemd[1]: Reached target Syslog.
susi:~ # ps xauwww|grep syslog-ng root 1022 0.0 0.0 211028 4196 ? Ssl 08:46 0:00 /usr/sbin/syslog-ng -F susi:~ # stat /proc/1022/ File: ‘/proc/1022/’ Size: 0 Blocks: 0 IO Block: 1024 directory Device: 3h/3d Inode: 14613 Links: 8 Access: (0555/dr-xr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2013-04-17 08:46:09.932639720 +0200 Modify: 2013-04-17 08:46:09.932639720 +0200 Change: 2013-04-17 08:46:09.932639720 +0200 Birth: -
So it looks like syslog-ng is only started after the first "Forwarding to syslog missed..." message.
Yes, it tries to start syslog.service when something connects to syslog socket. What "systemctl status syslog.service" show?
But I can tolerate this if it now keeps logging for longer than a few days (I rebooted because it again stopped doing that and apparently the only way to get things to work reliably with systemd is to reboot, at least if you don't want to do a PhD thesis on "booting linux" but just work with the box).
I understand correctly: there is no way to get rid of journal completely and just log to syslog like we always did (or passing the messages from syslog to journal instead of the other, non-working way round)? Would it be possible to let the journal only handle systemd but keep away from the tradiditonal syslog socket?
OK, but let's face it - before journald these messages were silently lost. Now you are at least aware of this and optionally can also collect and store them persistently. Why getting messages is worse than losing them? -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org