Bug 770810 - syslog-ng problem with start by systemd
Summary: syslog-ng problem with start by systemd
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: syslog-ng
Version: 16
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Jose Pedro Oliveira
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-29 09:40 UTC by Łukasz Trąbiński
Modified: 2012-01-15 20:32 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-01-15 20:32:59 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Łukasz Trąbiński 2011-12-29 09:40:01 UTC
Description of problem:


Problem with starting syslog-ng by systemd

Version-Release number of selected component (if applicable):


How reproducible:

[root@portraits multi-user.target.wants]# systemctl start syslog-ng.service 
[root@portraits multi-user.target.wants]# systemctl status syslog-ng.service 
syslog-ng.service - System Logger Daemon
          Loaded: loaded (/lib/systemd/system/syslog-ng.service; enabled)
          Active: failed since Thu, 29 Dec 2011 10:38:04 +0100; 5s ago
         Process: 2069 ExecStart=/sbin/syslog-ng -F -p /var/run/syslogd.pid  (code=exited, status=1/FAILURE)
         Process: 2065 ExecStartPre=/bin/systemctl stop systemd-kmsg-syslogd.service (code=exited, status=0/SUCCESS)
          CGroup: name=systemd:/system/syslog-ng.service

Manual stating by:
/sbin/syslog-ng -F -p /var/run/syslogd.pid
works OK.

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Jose Pedro Oliveira 2011-12-29 23:58:07 UTC
Lukasz,

Please add the output of the following commands:

 1) rpm -q rsyslog syslog-ng systemd

 2) ps aux | grep syslog

and answer the following questions:

 1) did you perform a fresh Fedora installation? or just upgrade it?

 2) was syslog-ng already installed? and running?

 3) have you stopped the rsyslog daemon before starting syslog-ng?

/jpo

Comment 2 cowan.ml 2012-01-06 15:47:15 UTC
I'm seeing the identical problem...

[root@XXX ~]# rpm -q rsyslog syslog-ng systemd
package rsyslog is not installed
syslog-ng-3.2.5-2.fc16.x86_64
systemd-37-3.fc16.x86_64

[root@XXX ~]# ps aux | grep syslog
root         1  0.0  0.3  44580 12008 ?        Ss   Jan05   0:02 /bin/systemd --log-level info --log-target syslog-or-kmsg --system --dump-core --show-status=0 --sysv-console=0 --deserialize 22
root     29656  0.0  0.0   6676   788 pts/4    S+   10:44   0:00 grep --color=auto syslog

fresh install

syslog-ng installed in kickstart

rsyslog never installed

Comment 3 Jose Pedro Oliveira 2012-01-06 20:27:38 UTC
(In reply to comment #2)
---[snip]---
> fresh install
> 
> syslog-ng installed in kickstart
> 
> rsyslog never installed

This is the expected behavior: in your case you need to enable syslog-ng manually in the kickstart script (systemctl enable syslog-ng.service).

Syslog-ng not being the default syslog daemon must not start automatically upon installation, i.e, the system sysadmin needs to enable it manually. This allows users to have both rsyslog and syslog-ng installed and choose which one to run.  The most common post-installation operations that will need to be performed are:

  systemctl disable rsyslog.service 
  systemctl enable syslog-ng.service 
  systemctl stop rsyslog.service 
  systemctl start syslog-ng.service
  [rpm -e rsyslog]

/jpo

Comment 4 cowan.ml 2012-01-06 21:49:12 UTC
rsyslog was never installed (- in kickstart).
syslog-ng is chkconfig'd on in kickstart; although that's useless now.
Looks like syslog-ng was already enabled, perhaps manually at some point.

Did everything suggested, no change.

-matt

----------------------------------------------------------------------
# systemctl status syslog-ng.service
syslog-ng.service - System Logger Daemon
          Loaded: loaded (/lib/systemd/system/syslog-ng.service; enabled)
          Active: failed since Fri, 06 Jan 2012 15:46:31 -0500; 10s ago
         Process: 2152 ExecStart=/sbin/syslog-ng $SYSLOGNG_OPTIONS (code=exited, status=2)
         Process: 2149 ExecStartPre=/bin/systemctl stop systemd-kmsg-syslogd.service (code=exited,\
 status=0/SUCCESS)
          CGroup: name=systemd:/system/syslog-ng.service

# rpm -e rsyslog
error: package rsyslog is not installed

# grep syslog install.log
14:20:22 Installing syslog-ng-3.2.4-8.fc16.x86_64

# systemctl stop rsyslog.service
# systemctl disable rsyslog.service
Failed to issue method call: No such file or directory

# systemctl enable syslog-ng.service
# systemctl start syslog-ng.service
# systemctl status syslog-ng.service
syslog-ng.service - System Logger Daemon
          Loaded: loaded (/lib/systemd/system/syslog-ng.service; enabled)
          Active: failed since Fri, 06 Jan 2012 16:32:23 -0500; 7s ago
         Process: 2658 ExecStart=/sbin/syslog-ng $SYSLOGNG_OPTIONS (code=exited, status=2)
         Process: 2656 ExecStartPre=/bin/systemctl stop systemd-kmsg-syslogd.service (code=exited,\
 status=0/SUCCESS)
          CGroup: name=systemd:/system/syslog-ng.service
----------------------------------------------------------------------

also

# systemctl |grep syslog
syslog-ng.service         loaded failed failed        System Logger Daemon
syslog.socket             loaded active listening     Syslog Socket
syslog.target             loaded active active        Syslog

if that's helpful.

Comment 5 Jose Pedro Oliveira 2012-01-07 01:48:44 UTC
(In reply to comment #4)
> rsyslog was never installed (- in kickstart).
> syslog-ng is chkconfig'd on in kickstart; although that's useless now.

Not entirely: it should call systemctl.

> Looks like syslog-ng was already enabled, perhaps manually at some point.

Most likely enabled by the chkconfig commands in yours kickstart file.

> 
> Did everything suggested, no change.
> 
> -matt

Would you mind attach the kickstart file? I will try to reproduce the problem locally.

/jpo

PS - You should use syslog-ng 3.2.5 that is available in the updates repo instead of the 3.2.4 version available in the base repo (see https://bugzilla.redhat.com/show_bug.cgi?id=742624)

Comment 6 phisto 2012-01-11 12:51:55 UTC
The same bug on FC16 with kernel 3.1.7-1.fc16.x86_64 after update from (syslog-ng-3.2.4-8.fc16.x86_64 and syslog-ng-libdbi-3.2.4-8.fc16.x86_64) to (syslog-ng -3.2.5-2.fc16.x86_64 and syslog-ng-libdbi-3.2.5-2.fc16.x86_64).

Comment 7 cowan.ml 2012-01-11 18:13:50 UTC
I got a chance to reinstall, same kickstart, and it's working fine now. :(
I dunno what happened to get into that state, maybe an update as in comment 6.

Was running 3.2.5-2, see comment 2.
The 3.2.4 in comment 4 shows what was installed when the system was built.
This time around it built with 3.2.5-2, updates handled in kickstart.

-matt

Comment 8 Jose Pedro Oliveira 2012-01-12 01:05:01 UTC
(In reply to comment #7)
> I got a chance to reinstall, same kickstart, and it's working fine now. :(
> I dunno what happened to get into that state, maybe an update as in comment 6.
> 
> Was running 3.2.5-2, see comment 2.
> The 3.2.4 in comment 4 shows what was installed when the system was built.
> This time around it built with 3.2.5-2, updates handled in kickstart.

Great.

/jpo

PS - syslog-ng-3.2.5-2 was pushed to the stable repositories on 2011-12-24 at 20:51:46.

Comment 9 Jose Pedro Oliveira 2012-01-12 01:10:50 UTC
(In reply to comment #6)
> The same bug on FC16 with kernel 3.1.7-1.fc16.x86_64 after update from
> (syslog-ng-3.2.4-8.fc16.x86_64 and syslog-ng-libdbi-3.2.4-8.fc16.x86_64) to
> (syslog-ng -3.2.5-2.fc16.x86_64 and syslog-ng-libdbi-3.2.5-2.fc16.x86_64).

Please try to answer as many questions as we can from comment #1 and also add output of the following commands:

 *  rpm -V syslog-ng 
 *  systemctl status syslog-ng.service


/jpo

Comment 10 Jose Pedro Oliveira 2012-01-12 01:32:00 UTC
Note about custom syslog-ng configurations files
------------------------------------------------

People with custom syslog-ng configurations will most likely face upgrade  problems due to the unix socket type mismatch between systemd and syslog-ng old configuration file:

 * systemd creates /dev/log as unix-dgram
 * syslog-ng < 3.2.5 expected /dev/log to be unix-stream (configuration file)

If you use 'unix-stream ("/dev/log")' in one of your log messages sources, you will need to manually change it to 'unix-dgram ("/dev/log")'.


Example:
-----------
...
 source s_sys {
 	file ("/proc/kmsg" program_override("kernel: "));
-	unix-stream ("/dev/log");
+	unix-dgram ("/dev/log");
 	internal();
 	# udp(ip(0.0.0.0) port(514));
 };
...
----------

/jpo

Comment 11 phisto 2012-01-12 04:10:08 UTC
> - unix-stream ("/dev/log");
> + unix-dgram ("/dev/log");

This is solved problem.

Comment 12 Reuben Farrelly 2012-01-12 23:18:55 UTC
Resolved for me also with the unix-stream to dgram change in the syslog-ng config file.  Perhaps this could be added to the FC16 Common Bugs or else FC16 Release Notes ?

Comment 13 Jose Pedro Oliveira 2012-01-13 01:34:39 UTC
I've just added an entry to the Common Bugs wiki page
(https://fedoraproject.org/wiki/Common_F16_bugs#systemd-syslog-ng-problems).
Feel free to make improvements to to text.

Comment 14 Jose Pedro Oliveira 2012-01-15 20:32:59 UTC
Closing this ticket.

Summary:
  i) use the syslog-ng-3.2.5-2 RPMS and
 ii) read https://fedoraproject.org/wiki/Common_F16_bugs#systemd-syslog-ng-problems


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